Skip to content

Conversation

@pre-commit-ci
Copy link
Contributor

@pre-commit-ci pre-commit-ci bot commented Jul 7, 2025

pre-commit-ci bot added 2 commits July 7, 2025 20:40
updates:
- [github.com/pycqa/flake8: 7.2.0 → 7.3.0](PyCQA/flake8@7.2.0...7.3.0)
- [github.com/pre-commit/mirrors-mypy: v1.15.0 → v1.16.1](pre-commit/mirrors-mypy@v1.15.0...v1.16.1)
- [github.com/rbubley/mirrors-prettier: v3.5.3 → v3.6.2](rbubley/mirrors-prettier@v3.5.3...v3.6.2)
@cobaltt7 cobaltt7 added the skip news Pull requests that don't need a changelog entry. label Jul 9, 2025
@cobaltt7
Copy link
Collaborator

cobaltt7 commented Jul 9, 2025

src/black/cache.py:45:5: error: Returning Any from function declared to return "Path" [no-any-return]

return cache_dir

@cobaltt7
Copy link
Collaborator

_black_version.py does not exist at lint time. Mypy is set to ignore the missing import, but __version__ ends up with type Any. After concating the vesion to the path, cache_dir is also Any, and can't return Any if the function is defined to return something else.
Something was changed in python/mypy#18538 to cause this error.

I added typing stubs for _black_version to fix this issue. I was also now able to remove it from the ignore_missing_imports list.

@cobaltt7 cobaltt7 added C: dependencies C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases labels Jul 11, 2025
@JelleZijlstra JelleZijlstra merged commit b085473 into main Jul 11, 2025
54 of 55 checks passed
@JelleZijlstra JelleZijlstra deleted the pre-commit-ci-update-config branch July 11, 2025 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: dependencies C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases skip news Pull requests that don't need a changelog entry.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants