Skip to content

Conversation

@matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Oct 23, 2025

Description

(Temporarily building on top of PR #2625)

Move from Black to Ruff.

As this will be a huge commit this should get ignored afterwards in a .git-blame-ignore-revs file.

Addresses parts of Issue #2624

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Move formatting from Black to Ruff.
* Apply Ruff check fixes to codebase.
* Apply Ruff formatting to codebase.
* Add ruff-format to pre-commit checks.
* Update style badge to Ruff.

kratsg and others added 10 commits October 22, 2025 12:43
Sonnet 4's summary:

> The mypy error occurred because the transpose() method on line 659 was
> returning a value that mypy inferred as Any, while the function signature
> declared it should return ArrayLike. Mypy's no-any-return rule flags when
> you return an Any value from a function with a specific return type annotation.
@matthewfeickert matthewfeickert self-assigned this Oct 23, 2025
@matthewfeickert matthewfeickert added docs Documentation related style Changes that do not affect the meaning of the code pre-commit Related to pre-commit hooks labels Oct 23, 2025
@matthewfeickert matthewfeickert added the type checking Related to types and type checking label Oct 23, 2025
@github-project-automation github-project-automation bot moved this to In progress in pyhf v0.8.0 Oct 23, 2025
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

❌ Patch coverage is 98.34983% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.13%. Comparing base (2320c9c) to head (5872f17).

Files with missing lines Patch % Lines
src/pyhf/readxml.py 92.85% 2 Missing and 2 partials ⚠️
src/pyhf/optimize/mixins.py 77.77% 1 Missing and 1 partial ⚠️
src/pyhf/optimize/opt_minuit.py 83.33% 1 Missing and 1 partial ⚠️
src/pyhf/parameters/utils.py 75.00% 0 Missing and 1 partial ⚠️
src/pyhf/utils.py 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2627      +/-   ##
==========================================
- Coverage   98.23%   98.13%   -0.11%     
==========================================
  Files          65       65              
  Lines        4198     4179      -19     
  Branches      592      455     -137     
==========================================
- Hits         4124     4101      -23     
- Misses         45       47       +2     
- Partials       29       31       +2     
Flag Coverage Δ
contrib 98.01% <98.18%> (+0.03%) ⬆️
doctest 98.13% <98.34%> (+0.03%) ⬆️
unittests-3.10 96.31% <97.68%> (+0.03%) ⬆️
unittests-3.11 96.31% <97.68%> (+0.03%) ⬆️
unittests-3.12 96.31% <97.68%> (+0.03%) ⬆️
unittests-3.13 96.31% <97.68%> (+0.03%) ⬆️
unittests-3.8 ?
unittests-3.9 96.36% <97.85%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation related pre-commit Related to pre-commit hooks style Changes that do not affect the meaning of the code type checking Related to types and type checking

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

2 participants