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

Add B019 check to find cache decorators on class methods #218

Merged
merged 6 commits into from Mar 20, 2022
Merged

Add B019 check to find cache decorators on class methods #218

merged 6 commits into from Mar 20, 2022

Commits on Jan 31, 2022

  1. Copy the full SHA
    eeaf392 View commit details
    Browse the repository at this point in the history
  2. B019: Change decorator resolution approach to retain lineno

    Starting in Python 3.8, the function node definition's `lineno` is changed to index its `def ...` line rather than the first line where its decorators start. This causes inconsistent line numbers across Python versions for the line reported by Flake8.
    
    We can use the decorator node location instead, which provides a consistent location, and makes sense because this hits on decorators.
    sco1 committed Jan 31, 2022
    Copy the full SHA
    1f45c13 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2022

  1. Update README verbiage

    * Prefer `extend-select` and `extend-ignore` for configuring opinionated warnings (`B9`)
    * Add deprecation note for Bugbear's internal handling of whether or not to emit `B9` codes
    * Add an example for `extend-immutable-call` specification
    sco1 committed Feb 2, 2022
    Copy the full SHA
    5a2bdac View commit details
    Browse the repository at this point in the history
  2. B9: Make Bugbear aware of flake8's extend-select

    * The code for Bugbear's built-in filtering for opinionated warnings predates the addition of `extend-select` to flake8 (`v4.0`) so it's not part of the check for explicit specification of `B9` codes.
    * Switch from `Mock` to `argparse.Namespace` for specifying options to tests to match the incoming type from `flake8` and avoid mocking side-effects.
    sco1 committed Feb 2, 2022
    Copy the full SHA
    d698e14 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2022

  1. Style fixes from review

    Co-authored-by: Cooper Ry Lees <me@cooperlees.com>
    sco1 and cooperlees committed Feb 3, 2022
    Copy the full SHA
    f8e2049 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2022

  1. Copy the full SHA
    b7a1fd5 View commit details
    Browse the repository at this point in the history