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

Bump flake8-pyi from 20.5.0 to 23.1.2 #370

Open
wants to merge 1 commit into
base: 3.7
Choose a base branch
from

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Feb 1, 2023

Bumps flake8-pyi from 20.5.0 to 23.1.2.

Release notes

Sourced from flake8-pyi's releases.

23.1.2

  • Y011/Y014/Y015: Increase the maximum character length of literal numbers in default values from 7 to 10, allowing hexadecimal representation of 32-bit integers. Contributed by Avasam.

23.1.1

New error codes:

  • Y052: Disallow default values in global or class namespaces where the assignment does not have a type annotation. Stubs should be explicit about the type of all variables in the stub; without type annotations, the type checker is forced to make inferences, which may have unpredictable consequences. Enum members are excluded from this check, as are various special assignments such as __all__ and __match_args__.

Other changes:

  • Disallow numeric default values where len(str(default)) > 7. If a function has a default value where the string representation is greater than 7 characters, it is likely to be an implementation detail or a constant that varies depending on the system you're running on, such as sys.maxsize.
  • Disallow str or bytes defaults where the default is >50 characters long, for similar reasons.
  • Allow ast.Attribute nodes as default values for a small number of special cases, such as sys.maxsize and sys.executable.
  • Fewer Y020 false positives are now emitted when encountering default values in stub files.

23.1.0

Bugfixes:

  • Do not emit Y020 (quoted annotations) for strings in parameter defaults.
  • Fix checking of defaults for functions with positional-only parameters.

Other changes:

  • Modify Y036 so that _typeshed.Unused is allowed as an annotation for parameters in __(a)exit__ methods. Contributed by Avasam
  • Several changes have been made to error codes relating to imports:
    • The Y027 error code has been removed.
    • All errors that used to result in Y027 being emitted now result in Y022 being emitted instead.
    • Some errors that used to result in Y023 being emitted now result in Y022 being emitted instead.
    • typing.Match and typing.Pattern have been added to the list of imports banned by Y022. Use re.Match and re.Pattern instead.
  • flake8-pyi no longer supports stub files that aim to support Python 2. If your stubs need to support Python 2, pin flake8-pyi to 22.11.0 or lower.
  • Y011, Y014 and Y015 have all been significantly relaxed. None, bools, ints, floats, complex numbers, strings and bytes are all now allowed as default values for parameter annotations or assignments.
  • Hatchling is now used as the build backend. This should have minimal, if any, user-facing impact.

22.11.0

Bugfixes:

  • 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

... (truncated)

Changelog

Sourced from flake8-pyi's changelog.

23.1.2

  • Y011/Y014/Y015: Increase the maximum character length of literal numbers in default values from 7 to 10, allowing hexadecimal representation of 32-bit integers. Contributed by Avasam.

23.1.1

New error codes:

  • Y052: Disallow default values in global or class namespaces where the assignment does not have a type annotation. Stubs should be explicit about the type of all variables in the stub; without type annotations, the type checker is forced to make inferences, which may have unpredictable consequences. Enum members are excluded from this check, as are various special assignments such as __all__ and __match_args__.

Other changes:

  • Disallow numeric default values where len(str(default)) > 7. If a function has a default value where the string representation is greater than 7 characters, it is likely to be an implementation detail or a constant that varies depending on the system you're running on, such as sys.maxsize.
  • Disallow str or bytes defaults where the default is >50 characters long, for similar reasons.
  • Allow ast.Attribute nodes as default values for a small number of special cases, such as sys.maxsize and sys.executable.
  • Fewer Y020 false positives are now emitted when encountering default values in stub files.

23.1.0

Bugfixes:

  • Do not emit Y020 (quoted annotations) for strings in parameter defaults.
  • Fix checking of defaults for functions with positional-only parameters.

Other changes:

  • Modify Y036 so that _typeshed.Unused is allowed as an annotation for parameters in __(a)exit__ methods. Contributed by Avasam
  • Several changes have been made to error codes relating to imports:
    • The Y027 error code has been removed.
    • All errors that used to result in Y027 being emitted now result in Y022 being emitted instead.
    • Some errors that used to result in Y023 being emitted now result in Y022 being emitted instead.
    • typing.Match and typing.Pattern have been added to the list of imports banned by Y022. Use re.Match and re.Pattern instead.
  • flake8-pyi no longer supports stub files that aim to support Python 2. If your stubs need to support Python 2, pin flake8-pyi to 22.11.0 or lower.
  • Y011, Y014 and Y015 have all been significantly relaxed. None, bools, ints, floats, complex numbers, strings and bytes are all now allowed

... (truncated)

Commits
  • 78c9d26 Prepare for relase 23.1.2 (#344)
  • 4da5958 Default values: Increase max number length to 10 characters (#343)
  • 997e030 Upgrade to isort 5.12.0 (#342)
  • 6b18eec Prepare for release 23.1.1 (#341)
  • dc81a15 Reduce Y020 false positives for default values in stubs (#340)
  • 516317d Introduce Y052: Disallow assignments to constant values in global or class na...
  • 29ba4e3 Improve handling of default values (#336)
  • cbc447e typeshed_primer: Add a newline before the final backticks (#338)
  • 36051b7 isort config: set skip_gitignore = true (#337)
  • 4778623 Copy-edit a few error code descriptions (#335)
  • Additional commits viewable in compare view

Dependabot compatibility score

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](https://github.com/PyCQA/flake8-pyi) from 20.5.0 to 23.1.2.
- [Release notes](https://github.com/PyCQA/flake8-pyi/releases)
- [Changelog](https://github.com/PyCQA/flake8-pyi/blob/main/CHANGELOG.md)
- [Commits](PyCQA/flake8-pyi@20.5.0...23.1.2)

---
updated-dependencies:
- dependency-name: flake8-pyi
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Feb 1, 2023

The following labels could not be found: dependencies, autosquash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants