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-logging] Add flake8_logging boilerplate and first rule LOG009 #7249

Merged
merged 8 commits into from
Sep 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Regenerate snapshots
  • Loading branch information
qdegraaf committed Sep 11, 2023
commit a9c8d3c9c43db68c7f1769fb28038d5daed84a83
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
source: crates/ruff/src/rules/flake8_logging/mod.rs
---
LOG009.py:5:1: LOG009 [*] Use of undocumented logging.WARN constant
LOG009.py:5:1: LOG009 [*] Use of undocumented `logging.WARN` constant
|
5 | logging.WARN # LOG009
| ^^^^^^^^^^^^ LOG009
|
= help: Replace logging.WARN with logging.WARNING
= help: Replace `logging.WARN` with `logging.WARNING`

ℹ Suggested fix
2 2 | from logging import WARN, WARNING
Expand All @@ -18,12 +18,12 @@ LOG009.py:5:1: LOG009 [*] Use of undocumented logging.WARN constant
7 7 |
8 8 | logging.WARNING # OK

LOG009.py:11:1: LOG009 [*] Use of undocumented logging.WARN constant
LOG009.py:11:1: LOG009 [*] Use of undocumented `logging.WARN` constant
|
11 | WARN # LOG009
| ^^^^ LOG009
|
= help: Replace logging.WARN with logging.WARNING
= help: Replace `logging.WARN` with `logging.WARNING`

ℹ Suggested fix
8 8 | logging.WARNING # OK
Expand All @@ -35,12 +35,12 @@ LOG009.py:11:1: LOG009 [*] Use of undocumented logging.WARN constant
13 13 |
14 14 | WARNING # OK

LOG009.py:17:27: LOG009 [*] Use of undocumented logging.WARN constant
LOG009.py:17:27: LOG009 [*] Use of undocumented `logging.WARN` constant
|
17 | logging.basicConfig(level=logging.WARN) # LOG009
| ^^^^^^^^^^^^ LOG009
|
= help: Replace logging.WARN with logging.WARNING
= help: Replace `logging.WARN` with `logging.WARNING`

ℹ Suggested fix
14 14 | WARNING # OK
Expand All @@ -52,12 +52,12 @@ LOG009.py:17:27: LOG009 [*] Use of undocumented logging.WARN constant
19 19 |
20 20 | logging.basicConfig(level=logging.WARNING) # OK

LOG009.py:23:5: LOG009 [*] Use of undocumented logging.WARN constant
LOG009.py:23:5: LOG009 [*] Use of undocumented `logging.WARN` constant
|
23 | x = logging.WARN # LOG009
| ^^^^^^^^^^^^ LOG009
|
= help: Replace logging.WARN with logging.WARNING
= help: Replace `logging.WARN` with `logging.WARNING`

ℹ Suggested fix
20 20 | logging.basicConfig(level=logging.WARNING) # OK
Expand All @@ -69,12 +69,12 @@ LOG009.py:23:5: LOG009 [*] Use of undocumented logging.WARN constant
25 25 |
26 26 | y = WARN # LOG009

LOG009.py:26:5: LOG009 [*] Use of undocumented logging.WARN constant
LOG009.py:26:5: LOG009 [*] Use of undocumented `logging.WARN` constant
|
26 | y = WARN # LOG009
| ^^^^ LOG009
|
= help: Replace logging.WARN with logging.WARNING
= help: Replace `logging.WARN` with `logging.WARNING`

ℹ Suggested fix
23 23 | x = logging.WARN # LOG009
Expand Down
Loading