Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: [pre-commit.ci] pre-commit autoupdate #2240

Merged
merged 5 commits into from
Jul 5, 2023

Conversation

pre-commit-ci[bot]
Copy link
Contributor

@pre-commit-ci pre-commit-ci bot commented Jul 4, 2023

updates:

* Update pre-commit hooks:
   - github.com/astral-sh/ruff-pre-commit: v0.0.270 → v0.0.276
   - github.com/asottile/blacken-docs: 1.13.0 → 1.14.0
   - github.com/pre-commit/mirrors-mypy: v1.3.0 → v1.4.1
   - github.com/codespell-project/codespell: v2.2.4 → v2.2.5
* Add ClassVar type hint and apply isort.
   - Avoid RUF012 Mutable class attributes should be annotated with `typing.ClassVar`.

@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.25 ⚠️

Comparison is base (a25f196) 98.30% compared to head (7b79183) 98.05%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2240      +/-   ##
==========================================
- Coverage   98.30%   98.05%   -0.25%     
==========================================
  Files          69       69              
  Lines        4533     4534       +1     
  Branches      802      802              
==========================================
- Hits         4456     4446      -10     
- Misses         45       54       +9     
- Partials       32       34       +2     
Flag Coverage Δ
contrib 97.88% <100.00%> (+<0.01%) ⬆️
doctest ?
unittests-3.10 ?
unittests-3.11 96.31% <100.00%> (+<0.01%) ⬆️
unittests-3.8 96.33% <100.00%> (+<0.01%) ⬆️
unittests-3.9 96.36% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
src/pyhf/workspace.py 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@matthewfeickert
Copy link
Member

Pre-commit is failing with:

...
ruff.....................................................................Failed
- hook id: ruff
- exit code: 1

src/pyhf/workspace.py:287:19: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
Found 1 error.

black-jupyter............................................................Passed
blacken-docs.............................................................Passed
mypy with Python 3.8.....................................................Failed
- hook id: mypy
- exit code: 1

src/pyhf/tensor/numpy_backend.py:257: error: Unused "type: ignore" comment  [unused-ignore]
src/pyhf/tensor/numpy_backend.py:257: error: Returning Any from function declared to return "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]"  [no-any-return]
src/pyhf/tensor/numpy_backend.py:257: note: Error code "no-any-return" not covered by "type: ignore" comment
src/pyhf/tensor/numpy_backend.py:257: error: Module has no attribute "product"  [attr-defined]
src/pyhf/tensor/numpy_backend.py:257: note: Error code "attr-defined" not covered by "type: ignore" comment
Found 3 errors in 1 file (checked 72 source files)

mypy with Python 3.11....................................................Failed
- hook id: mypy
- exit code: 1

src/pyhf/tensor/numpy_backend.py:257: error: Unused "type: ignore" comment  [unused-ignore]
src/pyhf/tensor/numpy_backend.py:257: error: Returning Any from function declared to return "_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]"  [no-any-return]
src/pyhf/tensor/numpy_backend.py:257: note: Error code "no-any-return" not covered by "type: ignore" comment
src/pyhf/tensor/numpy_backend.py:257: error: Module has no attribute "product"  [attr-defined]
src/pyhf/tensor/numpy_backend.py:257: note: Error code "attr-defined" not covered by "type: ignore" comment
Found 3 errors in 1 file (checked 72 source files)
...

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.270 → v0.0.276](astral-sh/ruff-pre-commit@v0.0.270...v0.0.276)
- [github.com/asottile/blacken-docs: 1.13.0 → 1.14.0](adamchainz/blacken-docs@1.13.0...1.14.0)
- [github.com/pre-commit/mirrors-mypy: v1.3.0 → v1.4.1](pre-commit/mirrors-mypy@v1.3.0...v1.4.1)
- [github.com/codespell-project/codespell: v2.2.4 → v2.2.5](codespell-project/codespell@v2.2.4...v2.2.5)
@matthewfeickert matthewfeickert self-assigned this Jul 5, 2023
@matthewfeickert matthewfeickert added the chore Other changes that don't modify src or test files label Jul 5, 2023
@matthewfeickert
Copy link
Member

The corrections that I've pushed aren't showing up on this branch for some reason. :?

* 5995515f (HEAD -> pre-commit-ci-update-config, origin/pre-commit-ci-update-config) Try to pass ruff
* b6506c3f Apply isort
* 0b65e4d4 Update ruff in additional_dependencies
* 09063f22 chore: [pre-commit.ci] pre-commit autoupdate
* a25f196f (origin/main, origin/HEAD, main) fix: Replace deprecated np.product by np.prod (#2242)

@matthewfeickert matthewfeickert added the need-to-backport tmp label until can be backported to patch release branch label Jul 5, 2023
@matthewfeickert matthewfeickert merged commit b654be9 into main Jul 5, 2023
@matthewfeickert matthewfeickert deleted the pre-commit-ci-update-config branch July 5, 2023 15:24
matthewfeickert added a commit that referenced this pull request Aug 16, 2023
@matthewfeickert matthewfeickert removed the need-to-backport tmp label until can be backported to patch release branch label Aug 16, 2023
matthewfeickert added a commit that referenced this pull request Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Other changes that don't modify src or test files
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants