Repository navigation
Conversation
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| F401 | 44 | 22 | 22 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+22 -22 violations, +0 -0 fixes in 4 projects; 52 projects unchanged)
PostHog/HouseWatch (+2 -2 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --no-fix --output-format concise --preview
- housewatch/models/__init__.py:2:21: F401 [*] `.backup.ScheduledBackup` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + housewatch/models/__init__.py:2:21: F401 `.backup.ScheduledBackup` imported but unused - housewatch/models/__init__.py:2:38: F401 [*] `.backup.ScheduledBackupRun` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + housewatch/models/__init__.py:2:38: F401 `.backup.ScheduledBackupRun` imported but unused
binary-husky/gpt_academic (+4 -4 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --no-fix --output-format concise --preview
- crazy_functions/paper_fns/file2file_doc/__init__.py:1:22: F401 [*] `.txt_doc.TxtFormatter` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + crazy_functions/paper_fns/file2file_doc/__init__.py:1:22: F401 `.txt_doc.TxtFormatter` imported but unused - crazy_functions/paper_fns/file2file_doc/__init__.py:2:27: F401 [*] `.markdown_doc.MarkdownFormatter` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + crazy_functions/paper_fns/file2file_doc/__init__.py:2:27: F401 `.markdown_doc.MarkdownFormatter` imported but unused - crazy_functions/paper_fns/file2file_doc/__init__.py:3:23: F401 [*] `.html_doc.HtmlFormatter` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + crazy_functions/paper_fns/file2file_doc/__init__.py:3:23: F401 `.html_doc.HtmlFormatter` imported but unused - crazy_functions/paper_fns/file2file_doc/__init__.py:4:23: F401 [*] `.word_doc.WordFormatter` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + crazy_functions/paper_fns/file2file_doc/__init__.py:4:23: F401 `.word_doc.WordFormatter` imported but unused
latchbio/latch (+2 -2 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --no-fix --output-format concise --preview
- src/latch_cli/services/init/example_conda/__init__.py:10:35: F401 [*] `latch.resources.tasks.small_task` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + src/latch_cli/services/init/example_conda/__init__.py:10:35: F401 `latch.resources.tasks.small_task` imported but unused - src/latch_cli/services/init/example_r/__init__.py:10:35: F401 [*] `latch.resources.tasks.small_task` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + src/latch_cli/services/init/example_r/__init__.py:10:35: F401 `latch.resources.tasks.small_task` imported but unused
qdrant/qdrant-client (+14 -14 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --no-fix --output-format concise --preview
- qdrant_client/migrate/__init__.py:1:22: F401 [*] `.migrate.migrate` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + qdrant_client/migrate/__init__.py:1:22: F401 `.migrate.migrate` imported but unused - tools/async_client_generator/transformers/__init__.py:1:31: F401 [*] `.call_transformer.CallTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/__init__.py:1:31: F401 `.call_transformer.CallTransformer` imported but unused - tools/async_client_generator/transformers/__init__.py:2:36: F401 [*] `.class_def_transformer.ClassDefTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/__init__.py:2:36: F401 `.class_def_transformer.ClassDefTransformer` imported but unused - tools/async_client_generator/transformers/__init__.py:3:35: F401 [*] `.constant_transformer.ConstantTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/__init__.py:3:35: F401 `.constant_transformer.ConstantTransformer` imported but unused - tools/async_client_generator/transformers/__init__.py:4:39: F401 [*] `.function_def_transformer.FunctionDefTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/__init__.py:4:39: F401 `.function_def_transformer.FunctionDefTransformer` imported but unused - tools/async_client_generator/transformers/__init__.py:5:38: F401 [*] `.import_from_transformer.ImportFromTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/__init__.py:5:38: F401 `.import_from_transformer.ImportFromTransformer` imported but unused - tools/async_client_generator/transformers/__init__.py:6:33: F401 [*] `.import_transformer.ImportTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/__init__.py:6:33: F401 `.import_transformer.ImportTransformer` imported but unused - tools/async_client_generator/transformers/__init__.py:7:31: F401 [*] `.name_transformer.NameTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/__init__.py:7:31: F401 `.name_transformer.NameTransformer` imported but unused - tools/async_client_generator/transformers/client/__init__.py:1:39: F401 [*] `.function_def_transformer.ClientFunctionDefTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/client/__init__.py:1:39: F401 `.function_def_transformer.ClientFunctionDefTransformer` imported but unused - tools/async_client_generator/transformers/fastembed/__init__.py:1:31: F401 [*] `.call_transformer.FastembedCallTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/fastembed/__init__.py:1:31: F401 `.call_transformer.FastembedCallTransformer` imported but unused - tools/async_client_generator/transformers/fastembed/__init__.py:2:39: F401 [*] `.function_def_transformer.FastembedFunctionDefTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/fastembed/__init__.py:2:39: F401 `.function_def_transformer.FastembedFunctionDefTransformer` imported but unused - tools/async_client_generator/transformers/local/__init__.py:1:31: F401 [*] `.call_transformer.LocalCallTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/local/__init__.py:1:31: F401 `.call_transformer.LocalCallTransformer` imported but unused - tools/async_client_generator/transformers/remote/__init__.py:1:39: F401 [*] `.function_def_transformer.RemoteFunctionDefTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/remote/__init__.py:1:39: F401 `.function_def_transformer.RemoteFunctionDefTransformer` imported but unused - tools/async_client_generator/transformers/remote/__init__.py:2:38: F401 [*] `.import_from_transformer.RemoteImportFromTransformer` imported but unused; consider removing, adding to `__all__`, or using a redundant alias + tools/async_client_generator/transformers/remote/__init__.py:2:38: F401 `.import_from_transformer.RemoteImportFromTransformer` imported but unused
Changes by rule (1 rules affected)
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| F401 | 44 | 22 | 22 | 0 | 0 |
|
Would you mind resolving the conflicts and getting CI to pass and then I'll give this a review? |
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
|
current addition makes the autofix a little more stricter . |
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
done |
dylwil3
left a comment
There was a problem hiding this comment.
Thanks for working on this! A few comments:
- It's unfortunate that this test doesn't really test what it was trying to test any more. Could you modify it so that we are in the "same package" situation? You could keep around one or two tests to ensure we don't regress on the issue that you fixed, but we also want to make sure we do suggest the autofix when we are in the same package.
- In the issue Alex says:
It makes sense for the autofix to add first-party imports to all if the import is from the same package (or a subpackage of that package)
Can you add a test for the behavior "subpackage of that package"?
3. Can you review the ecosystem changes and comment on whether you think they look correct?
| && isort::categorize::same_package( | ||
| checker.package(), | ||
| binding.import.source_name()[0], | ||
| ) |
There was a problem hiding this comment.
Let's move this before the previous && operand. Also, can we remove the is_first_party above now that we are using same_package?
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
|
added a new test and ecosystem changes looks as expected. |
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
Signed-off-by: Bhuminjay <bhuminjaysoni@gmail.com>
pyflakes] F401 autofix should only add a first-party import to __all__ if the import is from the same package
|
ping! would appreciate a review. Also are there any more changes needed from my end. |
|
Sorry for the delay here! If you're still interested in working on this, would you mind fixing up the merge conflicts? Then I'll try to give this a review. |
|
sure : ) |
Summary
This PR fixes #13008
Test Plan
This changes a lot of snapshots 20+, currently have not included , making it a draft PR