Specify encoding when opening files. Prevents UnicodeDecodeError on Windows
when the file contains non-CP1252 characters.
Contributed by Avasam.
Significant changes have been made to the Y041 check. Previously, Y041 flagged
"redundant numeric unions" (e.g. float | int, complex | float or complex | int)
in all contexts outside of type aliases. This was incorrect. PEP 484 only
specifies that type checkers should treat int as an implicit subtype of
float in the specific context of parameter annotations for functions and
methods. Y041 has therefore been revised to only emit errors on "redundant
numeric unions" in the context of parameter annotations.
Other changes:
Support running with flake8 v6.
22.10.0
Bugfixes:
Do not emit Y020 for empty strings. Y020 concerns "quoted annotations",
but an empty string can never be a quoted annotation.
Add special-casing so that Y020 is not emitted for __slots__ definitions
inside class blocks.
Expand Y035 to cover __slots__ definitions as well as __match_args__ and
__all__ definitions.
Expand Y015 so that errors are emitted for assignments to negative numbers.
Other changes:
Since v22.8.1, flake8-pyi has emitted a FutureWarning if run with flake8<5,
warning that the plugin would soon become incompatible with flake8<5. Due to
some issues that mean that some users are unable to upgrade to flake8>=5,
however, flake8-pyi no longer intends to remove support for running the
plugin with flake8<5 before Python 3.7 has reached end-of-life. As such, the
FutureWarning is no longer emitted.
Specify encoding when opening files. Prevents UnicodeDecodeError on Windows
when the file contains non-CP1252 characters.
Contributed by Avasam.
Significant changes have been made to the Y041 check. Previously, Y041 flagged
"redundant numeric unions" (e.g. float | int, complex | float or complex | int)
in all contexts outside of type aliases. This was incorrect. PEP 484 only
specifies that type checkers should treat int as an implicit subtype of
float in the specific context of parameter annotations for functions and
methods. Y041 has therefore been revised to only emit errors on "redundant
numeric unions" in the context of parameter annotations.
Other changes:
Support running with flake8 v6.
22.10.0
Bugfixes:
Do not emit Y020 for empty strings. Y020 concerns "quoted annotations",
but an empty string can never be a quoted annotation.
Add special-casing so that Y020 is not emitted for __slots__ definitions
inside class blocks.
Expand Y035 to cover __slots__ definitions as well as __match_args__ and
__all__ definitions.
Expand Y015 so that errors are emitted for assignments to negative numbers.
Other changes:
Since v22.8.1, flake8-pyi has emitted a FutureWarning if run with flake8<5,
warning that the plugin would soon become incompatible with flake8<5. Due to
some issues that mean that some users are unable to upgrade to flake8>=5,
however, flake8-pyi no longer intends to remove support for running the
plugin with flake8<5 before Python 3.7 has reached end-of-life. As such, the
FutureWarning is no longer emitted.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps flake8-pyi from 22.8.2 to 22.11.0.
Release notes
Sourced from flake8-pyi's releases.
Changelog
Sourced from flake8-pyi's changelog.
Commits
5693d0a
Prepare for release 22.11.0 (#306)d144b35
Support running with flake8 v6 (#303)3412789
Revise Y041 so that it only applies to parameter annotations (#305)82002ca
Minor improvements to workflow files (#304)524a980
Bump test dependencies (#301)d8e0357
Specify encoding when opening files (#296)d72638e
CONTRIBUTING.md: mention that we have a changelog (#297)c55a904
Bump black and mypy (#295)ec0bb4b
Prepare for release 22.10.0 (#294)b39240b
No longer emit aFutureWarning
when run with flake8<5; add a CI job to run ...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)