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

[flake8-pyi] Implement PYI046 #6098

Merged
merged 6 commits into from
Jul 27, 2023
Merged

Commits on Jul 26, 2023

  1. Implement PYI046

    ## What it does
     Checks for the presence of unused private `typing.Protocol` definitions.
    
     ## Why is this bad?
     A private `typing.Protocol` that is defined but not used is likely a mistake, and should
     be removed to avoid confusion.
    
     ## Example
     ```python
     import typing
    
     class _PrivateProtocol(typing.Protocol):
         foo: int
     ```
    
     Use instead:
     ```python
     import typing
    
     class _PrivateProtocol(typing.Protocol):
         foo: int
    
     def func(arg: _PrivateProtocol) -> None: ...
     ```
    LaBatata101 committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    da4391d View commit details
    Browse the repository at this point in the history
  2. review update

    LaBatata101 committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    df5e819 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2023

  1. Configuration menu
    Copy the full SHA
    7dc1ffe View commit details
    Browse the repository at this point in the history
  2. review update

    LaBatata101 committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    392995a View commit details
    Browse the repository at this point in the history
  3. fix formatting

    LaBatata101 committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    48dcb2a View commit details
    Browse the repository at this point in the history
  4. Tweak docs

    charliermarsh committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    f3ceb34 View commit details
    Browse the repository at this point in the history