-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add flake-pyi PYI033 "Do not use type comments in stubs" #3302
Add flake-pyi PYI033 "Do not use type comments in stubs" #3302
Conversation
ea05f84
to
df50951
Compare
I think this is also a case where people like want this for .py files, too, at least on 3.7+ (https://docs.python.org/3/whatsnew/3.7.html#pep-563-postponed-evaluation-of-annotations) On that note, does none of the tools upgrade all type comments to type annotations automatically? I looked in pyupgrade and googled but couldn't find anything
df50951
to
5e3481c
Compare
@@ -206,6 +206,8 @@ Options: | |||
Run in watch mode by re-running whenever files change | |||
--fix-only | |||
Fix any fixable lint violations, but don't report on leftover violations. Implies `--fix` | |||
--ignore-noqa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure how this got in here, should this be here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh strange. Builds should fail if cargo dev generate-all
produces any changed files. Lemme look into it.
// I couldn't find any PEP on the exact syntax (the closest being | ||
// https://peps.python.org/pep-0484/#type-comments), but every case I saw used | ||
// `# type:` verbatim so this seems to be the right thing to pick | ||
if comment.starts_with("# type:") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this also be true for # type: ignore
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently yes; are there any cases where you need # type: ignore
in a .pyi file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish ignore comments wouldn't be needed in stubs but they are used. Here is an example from typeshed https://github.com/python/typeshed/blob/45f0a5e7e47a23d6be67cfce429c4f2c0de62a29/stdlib/builtins.pyi#L565
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the example! i'll except those then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All our flake8-pyi tests for this rule are in this file FYI, if that helps :)
https://github.com/PyCQA/flake8-pyi/blob/main/tests/type_comments.pyi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth looking at the flake8-pyi
source and seeing how they handle this?
In particular, they have this regex, which omits ignore
comments:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops thanks i somehow used them for Y006 but then forgot that those also exist for Y033.
thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw i had to do two regexes since rust regex doesn't support look around
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @AlexWaygood for the helpful comment :)
There's a tool called com2ann which seems popular for this use-case. It's come up in Ruff before, though I've tried to cut scope at "tools that support one-time 2-to-3 conversion" :) |
Maybe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! One suggestion on the docstring.
/// ## What it does | ||
/// Do not use type comments (e.g. `x = 1 # type: int`) in stubs, even if | ||
/// the stub supports Python 2. Always use annotations instead (e.g. | ||
/// `x: int = 1`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this paragraph would make sense in the ## Why is it bad?
section, since ## What it does?
tends to be a description of what it's checking rather than alternatives etc. So e.g.:
/// ## What it does
/// Checks for the use of type comments (e.g., `x = 1 # type: int`) in stub
/// files.
///
/// ## Why is this bad?
/// Stub (`.pyi`) files should always use type annotations directly, rather
/// than type comments, even if they're intended to support Python 2, since
/// stub files are not executed at runtime.
///
/// ## Example
/// ```python
/// x = 1 # type: int
/// ```
///
/// Use instead:
/// ```python
/// x: int = 1
/// ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've also added the # type: ignore
exception
Co-authored-by: Charlie Marsh <[email protected]>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://togithub.com/charliermarsh/ruff) | `^0.0.253` -> `^0.0.254` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.254/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.254/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.254/compatibility-slim/0.0.253)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.254/confidence-slim/0.0.253)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.254`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.254) [Compare Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.253...v0.0.254) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Rules - \[`pyupgrade`] Replace tuples with type union in isinstance or issubclass calls by [@​martinlehoux](https://togithub.com/martinlehoux) in [https://github.com/charliermarsh/ruff/pull/3280](https://togithub.com/charliermarsh/ruff/pull/3280) - \[`flake8-pyi`] Add flake-pyi PYI033 "Do not use type comments in stubs" by [@​konstin](https://togithub.com/konstin) in [https://github.com/charliermarsh/ruff/pull/3302](https://togithub.com/charliermarsh/ruff/pull/3302) - \[`flake8-pyi`] PYI006 bad version info comparison by [@​konstin](https://togithub.com/konstin) in [https://github.com/charliermarsh/ruff/pull/3291](https://togithub.com/charliermarsh/ruff/pull/3291) - \[`pycodestyle`] feat(E251,E252): add rules by [@​carlosmiei](https://togithub.com/carlosmiei) in [https://github.com/charliermarsh/ruff/pull/3274](https://togithub.com/charliermarsh/ruff/pull/3274) - \[`pycodestyle`] feat(E211): add rule + autofix by [@​carlosmiei](https://togithub.com/carlosmiei) in [https://github.com/charliermarsh/ruff/pull/3313](https://togithub.com/charliermarsh/ruff/pull/3313) - \[`pycodestyle`] feat(e225,226,227,228): add rules by [@​carlosmiei](https://togithub.com/carlosmiei) in [https://github.com/charliermarsh/ruff/pull/3300](https://togithub.com/charliermarsh/ruff/pull/3300) - \[`pycodestyle`] feat(W191): add indentation_contains_tabs by [@​carlosmiei](https://togithub.com/carlosmiei) in [https://github.com/charliermarsh/ruff/pull/3249](https://togithub.com/charliermarsh/ruff/pull/3249) - Redirect `RUF004` to `B026` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3293](https://togithub.com/charliermarsh/ruff/pull/3293) ##### CLI - Add a `--ignore-noqa` CLI flag to force-ignore noqa directives by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3296](https://togithub.com/charliermarsh/ruff/pull/3296) ##### Settings - Implement `property-decorators` configuration option for pydocstyle by [@​staticssleever668](https://togithub.com/staticssleever668) in [https://github.com/charliermarsh/ruff/pull/3311](https://togithub.com/charliermarsh/ruff/pull/3311) - Always include `@classmethod` and `@staticmethod` in decorator lists by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3314](https://togithub.com/charliermarsh/ruff/pull/3314) - Detect quote style ignoring docstrings by [@​bz2](https://togithub.com/bz2) in [https://github.com/charliermarsh/ruff/pull/3306](https://togithub.com/charliermarsh/ruff/pull/3306) ##### Bug Fixes - Deduplicate SIM116 errors by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3260](https://togithub.com/charliermarsh/ruff/pull/3260) - Don't flag keyword-based logging format strings by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3261](https://togithub.com/charliermarsh/ruff/pull/3261) - Avoid raising TRY200 violations within new scopes by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3275](https://togithub.com/charliermarsh/ruff/pull/3275) - Use expression span for yoda-conditions fixes by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3276](https://togithub.com/charliermarsh/ruff/pull/3276) - Avoid PEP 585 rewrites when builtins are shadowed by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3286](https://togithub.com/charliermarsh/ruff/pull/3286) - Ignore unused imports in ModuleNotFoundError blocks by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3288](https://togithub.com/charliermarsh/ruff/pull/3288) - Treat function type annotations within classes as runtime-required by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3312](https://togithub.com/charliermarsh/ruff/pull/3312) - Extend `RET503` autofixes to "end of statement", including comments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3324](https://togithub.com/charliermarsh/ruff/pull/3324) - Handle empty NamedTuple and TypedDict conversions by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3251](https://togithub.com/charliermarsh/ruff/pull/3251) - Use `identifier_range` for a few more rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3254](https://togithub.com/charliermarsh/ruff/pull/3254) - Match non-lowercase with S105 again by [@​scop](https://togithub.com/scop) in [https://github.com/charliermarsh/ruff/pull/3258](https://togithub.com/charliermarsh/ruff/pull/3258) - Abort when unable to fix relative imports past module root by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3319](https://togithub.com/charliermarsh/ruff/pull/3319) - Use presence of convention-specific sections during docstring inference by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3325](https://togithub.com/charliermarsh/ruff/pull/3325) - Treat callables within type definitions as default-non-types by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3329](https://togithub.com/charliermarsh/ruff/pull/3329) - Explicitly put `Path(...)` in Pathlib violations by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [https://github.com/charliermarsh/ruff/pull/3333](https://togithub.com/charliermarsh/ruff/pull/3333) #### New Contributors - [@​rouge8](https://togithub.com/rouge8) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3277](https://togithub.com/charliermarsh/ruff/pull/3277) - [@​staticssleever668](https://togithub.com/staticssleever668) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3311](https://togithub.com/charliermarsh/ruff/pull/3311) - [@​bz2](https://togithub.com/bz2) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3306](https://togithub.com/charliermarsh/ruff/pull/3306) - [@​evanrittenhouse](https://togithub.com/evanrittenhouse) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3333](https://togithub.com/charliermarsh/ruff/pull/3333) **Full Changelog**: astral-sh/ruff@v0.0.253...v0.0.254 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/ixm-one/pytest-cmake-presets). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNTQuNyIsInVwZGF0ZWRJblZlciI6IjM0LjE1NC43In0=--> Signed-off-by: Renovate Bot <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://togithub.com/charliermarsh/ruff) | `==0.0.253` -> `==0.0.254` | [![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.254/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.254/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.254/compatibility-slim/0.0.253)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.254/confidence-slim/0.0.253)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.254`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.254) [Compare Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.253...v0.0.254) <!-- Release notes generated using configuration in .github/release.yml at main --> ##### What's Changed ##### Rules - \[`pyupgrade`] Replace tuples with type union in isinstance or issubclass calls by [@​martinlehoux](https://togithub.com/martinlehoux) in [https://github.com/charliermarsh/ruff/pull/3280](https://togithub.com/charliermarsh/ruff/pull/3280) - \[`flake8-pyi`] Add flake-pyi PYI033 "Do not use type comments in stubs" by [@​konstin](https://togithub.com/konstin) in [https://github.com/charliermarsh/ruff/pull/3302](https://togithub.com/charliermarsh/ruff/pull/3302) - \[`flake8-pyi`] PYI006 bad version info comparison by [@​konstin](https://togithub.com/konstin) in [https://github.com/charliermarsh/ruff/pull/3291](https://togithub.com/charliermarsh/ruff/pull/3291) - \[`pycodestyle`] feat(E251,E252): add rules by [@​carlosmiei](https://togithub.com/carlosmiei) in [https://github.com/charliermarsh/ruff/pull/3274](https://togithub.com/charliermarsh/ruff/pull/3274) - \[`pycodestyle`] feat(E211): add rule + autofix by [@​carlosmiei](https://togithub.com/carlosmiei) in [https://github.com/charliermarsh/ruff/pull/3313](https://togithub.com/charliermarsh/ruff/pull/3313) - \[`pycodestyle`] feat(e225,226,227,228): add rules by [@​carlosmiei](https://togithub.com/carlosmiei) in [https://github.com/charliermarsh/ruff/pull/3300](https://togithub.com/charliermarsh/ruff/pull/3300) - \[`pycodestyle`] feat(W191): add indentation_contains_tabs by [@​carlosmiei](https://togithub.com/carlosmiei) in [https://github.com/charliermarsh/ruff/pull/3249](https://togithub.com/charliermarsh/ruff/pull/3249) - Redirect `RUF004` to `B026` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3293](https://togithub.com/charliermarsh/ruff/pull/3293) ##### CLI - Add a `--ignore-noqa` CLI flag to force-ignore noqa directives by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3296](https://togithub.com/charliermarsh/ruff/pull/3296) ##### Settings - Implement `property-decorators` configuration option for pydocstyle by [@​staticssleever668](https://togithub.com/staticssleever668) in [https://github.com/charliermarsh/ruff/pull/3311](https://togithub.com/charliermarsh/ruff/pull/3311) - Always include `@classmethod` and `@staticmethod` in decorator lists by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3314](https://togithub.com/charliermarsh/ruff/pull/3314) - Detect quote style ignoring docstrings by [@​bz2](https://togithub.com/bz2) in [https://github.com/charliermarsh/ruff/pull/3306](https://togithub.com/charliermarsh/ruff/pull/3306) ##### Bug Fixes - Deduplicate SIM116 errors by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3260](https://togithub.com/charliermarsh/ruff/pull/3260) - Don't flag keyword-based logging format strings by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3261](https://togithub.com/charliermarsh/ruff/pull/3261) - Avoid raising TRY200 violations within new scopes by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3275](https://togithub.com/charliermarsh/ruff/pull/3275) - Use expression span for yoda-conditions fixes by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3276](https://togithub.com/charliermarsh/ruff/pull/3276) - Avoid PEP 585 rewrites when builtins are shadowed by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3286](https://togithub.com/charliermarsh/ruff/pull/3286) - Ignore unused imports in ModuleNotFoundError blocks by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3288](https://togithub.com/charliermarsh/ruff/pull/3288) - Treat function type annotations within classes as runtime-required by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3312](https://togithub.com/charliermarsh/ruff/pull/3312) - Extend `RET503` autofixes to "end of statement", including comments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3324](https://togithub.com/charliermarsh/ruff/pull/3324) - Handle empty NamedTuple and TypedDict conversions by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3251](https://togithub.com/charliermarsh/ruff/pull/3251) - Use `identifier_range` for a few more rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3254](https://togithub.com/charliermarsh/ruff/pull/3254) - Match non-lowercase with S105 again by [@​scop](https://togithub.com/scop) in [https://github.com/charliermarsh/ruff/pull/3258](https://togithub.com/charliermarsh/ruff/pull/3258) - Abort when unable to fix relative imports past module root by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3319](https://togithub.com/charliermarsh/ruff/pull/3319) - Use presence of convention-specific sections during docstring inference by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3325](https://togithub.com/charliermarsh/ruff/pull/3325) - Treat callables within type definitions as default-non-types by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/3329](https://togithub.com/charliermarsh/ruff/pull/3329) - Explicitly put `Path(...)` in Pathlib violations by [@​evanrittenhouse](https://togithub.com/evanrittenhouse) in [https://github.com/charliermarsh/ruff/pull/3333](https://togithub.com/charliermarsh/ruff/pull/3333) ##### New Contributors - [@​rouge8](https://togithub.com/rouge8) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3277](https://togithub.com/charliermarsh/ruff/pull/3277) - [@​staticssleever668](https://togithub.com/staticssleever668) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3311](https://togithub.com/charliermarsh/ruff/pull/3311) - [@​bz2](https://togithub.com/bz2) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3306](https://togithub.com/charliermarsh/ruff/pull/3306) - [@​evanrittenhouse](https://togithub.com/evanrittenhouse) made their first contribution in [https://github.com/charliermarsh/ruff/pull/3333](https://togithub.com/charliermarsh/ruff/pull/3333) **Full Changelog**: astral-sh/ruff@v0.0.253...v0.0.254 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/allenporter/flux-local). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNjAuMCIsInVwZGF0ZWRJblZlciI6IjM0LjE2MC4wIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
I think this is also a case where people like want this for .py files, too, at least on 3.7+ (https://docs.python.org/3/whatsnew/3.7.html#pep-563-postponed-evaluation-of-annotations)
On that note, does none of the tools upgrade all type comments to type annotations automatically? I looked in pyupgrade and googled and was surprised i couldn't find anything