Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: snok/flake8-type-checking
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.5.1
Choose a base ref
...
head repository: snok/flake8-type-checking
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.6.0
Choose a head ref
  • 18 commits
  • 21 files changed
  • 3 contributors

Commits on Nov 25, 2023

  1. Adds TC009 for type checking declarations used at runtime

    Extends TC100/TC200 to deal with type checking declarations
    Avoids a couple of false positives in TC100/TC101
    Avoids contradicting TC004/TC009 errors vs. TC100/TC200 errors
    Daverball authored and sondrelg committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    807cc3e View commit details
    Browse the repository at this point in the history
  2. Adds TC009 to README.md

    Daverball authored and sondrelg committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    5917ee1 View commit details
    Browse the repository at this point in the history
  3. Implements scopes with symbol tables with variable lookups

    This symbol lookup also properly supports PEP695
    
    This gets rid of the need for some of our earlier book-keeping, since
    the variable lookup in the current scope yields a more accurate result
    
    Refactored the else case of TC101 into TC201
    Daverball authored and sondrelg committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    99b52ff View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f803883 View commit details
    Browse the repository at this point in the history
  5. Adds some regression tests for #131

    Daverball authored and sondrelg committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    ef8ea61 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2fdcab2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    38810c8 View commit details
    Browse the repository at this point in the history
  8. Cleans up redundant head scope for ClassDef.

    Fixes runtime symbol lookup into outer scopes.
    Treats NamedExpr like definitions.
    Improves scope handling of comprehensions and if expressions.
    Daverball authored and sondrelg committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    48fbeda View commit details
    Browse the repository at this point in the history
  9. Fixes check (ast.comprehension has no lineno/col_offset)

    Adds some regression tests for the more complex scoping rules.
    Daverball authored and sondrelg committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    6b5dfab View commit details
    Browse the repository at this point in the history
  10. Extends docstring

    Daverball authored and sondrelg committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    393681d View commit details
    Browse the repository at this point in the history
  11. Refactors TC100 into TC200 check to reduce repetition

    Avoids warnings by removing `ast.Ellipsis` check, which no longer exists
    as an actual type, it's just a factory for `ast.Constant` now.
    Daverball authored and sondrelg committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    b9f0e60 View commit details
    Browse the repository at this point in the history
  12. Fixes scoping regression tests

    We actually need individual symbols for both tests, the comprehensions
    will leak their loop variables, so we need to use different ones for
    each expression to ensure we properly test that each one defines a
    new symbol that is accessible from within the entire expression.
    Daverball authored and sondrelg committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    50ba61f View commit details
    Browse the repository at this point in the history
  13. Moves one of the regression tests from TC004 to TC009

    It would never have emitted a TC004, even if we made a mistake it would
    always have emitted a TC009. I've added an inverse test to convince
    ourselves that this is true.
    Daverball authored and sondrelg committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    d54b13c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    0e48ae8 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    f256c67 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    8859321 View commit details
    Browse the repository at this point in the history
  17. chore: Update lockfile

    sondrelg committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    fe4c06b View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    2f478a4 View commit details
    Browse the repository at this point in the history
Loading