cjolowicz / hypermodern-python

Hypermodern Python
https://medium.com/@cjolowicz/hypermodern-python-d44485d9d769
MIT License
617 stars 91 forks source link

Bump flake8-annotations from 2.0.0 to 2.6.1 #247

Closed dependabot-preview[bot] closed 3 years ago

dependabot-preview[bot] commented 3 years ago

Bumps flake8-annotations from 2.0.0 to 2.6.1.

Release notes

Sourced from flake8-annotations's releases.

Release v2.6.1

Changelog

[v2.6.1]

Changed

  • Remove the explicitly pinned minor version ceiling for flake8.

Release v2.6.0

Changelog

[v2.6.0]

Added

  • #98 Add --dispatch-decorators to support suppression of all errors from functions decorated by decorators such as functools.singledispatch and functools.singledispatchmethod.
  • #99 Add --overload-decorators to support generic aliasing of the typing.overload decorator.

Fixed

  • #106 Fix incorrect parsing of multiline docstrings with less than two lines of content, causing incorrect line numbers for yielded errors in Python versions prior to 3.8

Additional Details

Generic Functions

Per #98, the functools.singledispatch and functools.singledispatchmethod decorators transform a function into a single-dispatch generic function.

For example:

import functools

@functools.singledispatch def foo(a): print(a)

@foo.register def _(a: list) -> None: for idx, thing in enumerate(a): print(idx, thing)

Is correctly annotated but would previously yield linting errors for foo. In the spirit of the purpose of these decorators, linting errors are now suppressed for functions decorated with these decorators. The --dispatch-decorators configuration option has been added, which specifies a comma-separated list of decorators to be considered as dispatch decorators.

Decorators are matched based on their attribute name. For example, "singledispatch" will match any of the following:

  • import functools; @functools.singledispatch
  • import functools as fnctls; @fnctls.singledispatch
  • from functools import singledispatch; @singledispatch

By default, linting errors are suppressed for functions decorated by singledispatch or singledispatchmethod.

typing.overload decorator aliasing

Per #99, handling of the typing.overload has been made generic, removing the caveat from the initial implementation. The --overload-decorators configuration option has been added, which specifies a comma-separated list of decorators to be considered as typing.overload decorators.

Decorators are now matched based on their attribute name. For example, "overload" will match any of the following:

  • import typing; @typing.overload
  • import typing as t; @t.overload

... (truncated)

Changelog

Sourced from flake8-annotations's changelog.

[v2.6.1]

Changed

  • Remove the explicitly pinned minor version ceiling for flake8.

[v2.6.0]

Added

  • #98 Add --dispatch-decorators to support suppression of all errors from functions decorated by decorators such as functools.singledispatch and functools.singledispatchmethod.
  • #99 Add --overload-decorators to support generic aliasing of the typing.overload decorator.

Fixed

  • #106 Fix incorrect parsing of multiline docstrings with less than two lines of content, causing incorrect line numbers for yielded errors in Python versions prior to 3.8

[v2.5.0]

Added

  • #103 Add --allow-untyped-nested to suppress all errors from dynamically typted nested functions. A function is considered dynamically typed if it does not contain any type hints.

[v2.4.1]

Fixed

  • #100 Fix incorrect positioning of posonlyargs in the Function argument list, causing incorrect classification of the type of missing argument.

[v2.4.0]

Fixed

  • #92 Fix inconsistent linting behavior between function-level type comments and their equivalent PEP 3107-style function annotations of class methods and classmethods.
  • #94 Fix improper handling of the closing definition in a series of typing.overload decorated functions.

[v2.3.0]

Added

  • #87 Add --mypy-init-return to allow omission of a return type hint for __init__ if at least one argument is annotated. See mypy's documentation for additional details.

[v2.2.1]

Fixed

  • #89 Revert change to Python version pinning to prevent unnecessary locking headaches

[v2.2.0]

Added

  • #87 Add --allow-untyped-defs to suppress all errors from dynamically typed functions. A function is considered dynamically typed if it does not contain any type hints.

Fixed

  • #77, #81 Fix incorrect return error locations in the presence of a multiline docstring containing colon(s)
  • #81 Fix incorrect return error locations for single-line function definitions
  • Fix incorrectly pinned project specifications

[v2.1.0]

Added

  • #68 Add --suppress-dummy-args configuration option to suppress ANN000 level errors for dummy arguments, defined as "_"

[v2.0.1]

Added

  • #71 Add pep8-naming to linting toolchain
  • Expand pre-commit hooks

... (truncated)

Commits
  • 8b28fe6 Release v2.6.1
  • ea7e09e Remove explicitly pinned minor version ceiling for flake8.
  • 9058f8f Release v2.6.0
  • 1b72427 Fix bug in colon seeker for multiline docstrings in Py < 3.8
  • 94d61fc Add tests for contentless multiline docstrings
  • bd024db Adjust classifier return type annotation
  • d94e4a9 README & Classifier tweaks
  • c2d54f5 Misc type annotations cleanup
  • 4c416ba Slot Argument and Function objects
  • 777932b Add support for callable dispatch & overload decorators
  • 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) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)
dependabot-preview[bot] commented 3 years ago

Superseded by #256.