Repository navigation
Ruff PR auto-format #6422
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
Ruff PR auto-format #6422
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import builtins | ||
| import platform | ||
| import pickle | ||
| import platform | ||
| import sys | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| from .relative import value | ||
| from .dir_module_inner import value2 | ||
| from .relative import value | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| from collections import deque | ||
|
|
||
|
|
||
| d = deque([0, 1, 2]) | ||
|
|
||
| d.append(1) | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -1,6 +1,5 @@ | ||||
| from testutils import assert_equal | ||||
|
|
||||
| import dir_module | ||||
| from testutils import assert_equal | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove unused import. The Apply this diff to remove the unused import: -from testutils import assert_equal📝 Committable suggestion
Suggested change
🧰 Tools🪛 Flake8 (7.3.0)[error] 2-2: 'testutils.assert_equal' imported but unused (F401) 🤖 Prompt for AI Agents |
||||
|
|
||||
| assert dir_module.value == 5 | ||||
| assert dir_module.value2 == 7 | ||||
|
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| from functools import reduce | ||
|
|
||
| from testutils import assert_raises | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import unittest | ||
| import marshal | ||
| import unittest | ||
|
|
||
|
|
||
| class MarshalTests(unittest.TestCase): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import math | ||
|
|
||
| from testutils import assert_raises, skip_if_unsupported | ||
|
|
||
| NAN = float("nan") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import os | ||
| import time | ||
| import stat | ||
| import sys | ||
| import time | ||
|
|
||
| from testutils import assert_raises | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix lint blocker (F401): mark re-exported import as intentional (or export via
__all__).Flake8 reports Line 2 as unused; if this is a package re-export, annotate it to avoid CI lint failures.
Based on learnings, use ruff for linting Python code.
🧰 Tools
🪛 Flake8 (7.3.0)
[error] 1-1: '.dir_module_inner.value2' imported but unused
(F401)
[error] 2-2: '.relative.value' imported but unused
(F401)
🤖 Prompt for AI Agents