ruff
F401 - Distinguish between imports we wish to remove and those we wish to make explicit-exports
#11168
Merged

Commits
  • [ruff F401 #10390 #10391] categorize imports that this rule will apply to
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] add import category to ImportBinding struct
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] edit to make imports explicit
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] narrower categories
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] note some renames that would help with readability; remove unnecessary pattern match
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] split import bindings by fix we wish to apply
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] tweak "fix_imports"; rename it and only return a fix if imports were actually given
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] another "fix_imports" function but this one either moves to __all__ or makes imports explicit
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] generate two fixes (instead of one) for the two groups of import statement bindings; then iterate over those bindings and the fix which applies to them
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] remove categorize
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] rename/remove/cleanup
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] rename and adjust new "fix_imports" function
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] cleanup the other fix-imports function
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] add fixture tests for F401 w/__init__.py; rework after discussion w/zanie
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] clippy
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] move comment about tests
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] unit tests for make_redundant_alias
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] cargo insta review
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] rebase and change an argument to an altered api
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] ruff format the test fixtures
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] note that the empty py files are used by a test
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] cargo insta review for the reformatted test fixtures
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] rename loop binding variables
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] flip incorrectly reversed preview-flag-check
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] restore the old condition used to enable/disable F401 based on deprecated flag, but use the preview flag; move the testcases down to the preview testcase section; move the insta-snapshots to the preview paths
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] delete the init_unused_import_opt_in_to_fix test and add a test-case for the preview linter rules that references that fixture; move its insta-snapshot to the location used by the new test-case
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] add information to unused-import-context; update generation of help messages
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] attach context to import-bindings earlier, when deciding how to fix them
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] rename to_explicit -> to_reexport
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] pass iterators to fix_by_* methods instead of slices
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] better (but not perfect) help text
    plredmond committed 1 year ago
  • optimize a shortcircuiting boolean expression per micha
    plredmond committed 1 year ago
  • use an array instead of a vec per micha
    plredmond committed 1 year ago
  • [ruff F401 #10390 #10391] swap arg order; move imports to top level
    plredmond committed 1 year ago
  • correct level to is_first_party
    plredmond committed 1 year ago
  • charlie patch to remove the unfinished dunder_all mutation
    plredmond committed 1 year ago
Loading