mirror of https://github.com/astral-sh/ruff
Move full diagnostic rendering to `ruff_db` (#19415)
## Summary This PR switches the `full` output format in Ruff over to use the rendering code in `ruff_db`. As proposed in the design doc, this involves a lot of changes to the snapshot output. I also had to comment out this assertion with a TODO to replace it after https://github.com/astral-sh/ruff/issues/19688 because many of Ruff's "file-level" annotations aren't actually file-level. They just happen to occur at the start of the file, especially in tests with very short snippets.529d81daca/crates/ruff_annotate_snippets/src/renderer/display_list.rs (L1204-L1208)I broke up the snapshot commits at the end into several blocks, but I don't think it's enough to help with review. The first few (notebooks, syntax errors, and test rules) are small enough to look at, but I couldn't really think of other categories beyond that. I'm happy to break those up or pick out specific examples beyond what I have below, if that would help. The minimal code changes are in this [range](abd28f1e77), with the snapshot commits following. Moving the `FullRenderer` and updating the `EmitterFlags` aren't strictly necessary either. I even dropped the renderer commit this morning but figured it made sense to keep it since we have the `full` module for tests. I don't feel strongly either way. ## Test Plan I did actually click through all 1700 snapshots individually instead of accepting them all at once, although I moved through them quickly. There are a few main categories: ### Lint diagnostics ```diff -unused.py:8:19: F401 [*] `pathlib` imported but unused +F401 [*] `pathlib` imported but unused + --> unused.py:8:19 | 7 | # Unused, _not_ marked as required (due to the alias). 8 | import pathlib as non_alias - | ^^^^^^^^^ F401 + | ^^^^^^^^^ 9 | 10 | # Unused, marked as required. | - = help: Remove unused import: `pathlib` +help: Remove unused import: `pathlib` ``` - The filename and line numbers are moved to the second line - The second noqa code next to the underline is removed ### Syntax errors These are much like the above. ```diff - -:1:16: invalid-syntax: Expected one or more symbol names after import + invalid-syntax: Expected one or more symbol names after import + --> -:1:16 | 1 | from foo import | ^ ``` One thing I noticed while reviewing some of these, but I don't think is strictly syntax-error-related, is that some of the new diagnostics have a little less context after the error. I don't think this is a problem, but it's one small discrepancy I hadn't noticed before. Here's a minor example: ```diff -syntax_errors.py:1:15: invalid-syntax: Expected one or more symbol names after import +invalid-syntax: Expected one or more symbol names after import + --> syntax_errors.py:1:15 | 1 | from os import | ^ 2 | 3 | if call(foo -4 | def bar(): | ``` And one of the biggest examples: ```diff -E30_syntax_error.py:18:11: invalid-syntax: Expected ')', found newline +invalid-syntax: Expected ')', found newline + --> E30_syntax_error.py:18:11 | 16 | pass 17 | 18 | foo = Foo( | ^ -19 | -20 | -21 | def top( | ``` Similarly, a few of the lint diagnostics showed that the cut indicator calculation for overly long lines is also slightly different, but I think that's okay too. ### Full-file diagnostics ```diff -comment.py:1:1: I002 [*] Missing required import: `from __future__ import annotations` +I002 [*] Missing required import: `from __future__ import annotations` +--> comment.py:1:1 +help: Insert required import: `from __future__ import annotations` + ``` As noted above, these will be much more rare after #19688 too. This case isn't a true full-file diagnostic and will render a snippet in the future, but you can see that we're now rendering the help message that would have been discarded before. In contrast, this is a true full-file diagnostic and should still look like this after #19688: ```diff -__init__.py:1:1: A005 Module `logging` shadows a Python standard-library module +A005 Module `logging` shadows a Python standard-library module +--> __init__.py:1:1 ``` ### Jupyter notebooks There's nothing particularly different about these, just showing off the cell index again. ```diff - Jupyter.ipynb:cell 3:1:7: F821 Undefined name `x` + F821 Undefined name `x` + --> Jupyter.ipynb:cell 3:1:7 | 1 | print(x) - | ^ F821 + | ^ | ```
This commit is contained in:
parent
8489816edc
commit
44755e6e86
|
|
@ -115,12 +115,13 @@ fn stdin_error() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:8: F401 [*] `os` imported but unused
|
||||
F401 [*] `os` imported but unused
|
||||
--> -:1:8
|
||||
|
|
||||
1 | import os
|
||||
| ^^ F401
|
||||
| ^^
|
||||
|
|
||||
= help: Remove unused import: `os`
|
||||
help: Remove unused import: `os`
|
||||
|
||||
Found 1 error.
|
||||
[*] 1 fixable with the `--fix` option.
|
||||
|
|
@ -139,12 +140,13 @@ fn stdin_filename() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
F401.py:1:8: F401 [*] `os` imported but unused
|
||||
F401 [*] `os` imported but unused
|
||||
--> F401.py:1:8
|
||||
|
|
||||
1 | import os
|
||||
| ^^ F401
|
||||
| ^^
|
||||
|
|
||||
= help: Remove unused import: `os`
|
||||
help: Remove unused import: `os`
|
||||
|
||||
Found 1 error.
|
||||
[*] 1 fixable with the `--fix` option.
|
||||
|
|
@ -174,19 +176,21 @@ import bar # unused import
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
bar.py:2:8: F401 [*] `bar` imported but unused
|
||||
F401 [*] `bar` imported but unused
|
||||
--> bar.py:2:8
|
||||
|
|
||||
2 | import bar # unused import
|
||||
| ^^^ F401
|
||||
| ^^^
|
||||
|
|
||||
= help: Remove unused import: `bar`
|
||||
help: Remove unused import: `bar`
|
||||
|
||||
foo.py:2:8: F401 [*] `foo` imported but unused
|
||||
F401 [*] `foo` imported but unused
|
||||
--> foo.py:2:8
|
||||
|
|
||||
2 | import foo # unused import
|
||||
| ^^^ F401
|
||||
| ^^^
|
||||
|
|
||||
= help: Remove unused import: `foo`
|
||||
help: Remove unused import: `foo`
|
||||
|
||||
Found 2 errors.
|
||||
[*] 2 fixable with the `--fix` option.
|
||||
|
|
@ -208,12 +212,13 @@ fn check_warn_stdin_filename_with_files() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
F401.py:1:8: F401 [*] `os` imported but unused
|
||||
F401 [*] `os` imported but unused
|
||||
--> F401.py:1:8
|
||||
|
|
||||
1 | import os
|
||||
| ^^ F401
|
||||
| ^^
|
||||
|
|
||||
= help: Remove unused import: `os`
|
||||
help: Remove unused import: `os`
|
||||
|
||||
Found 1 error.
|
||||
[*] 1 fixable with the `--fix` option.
|
||||
|
|
@ -234,12 +239,13 @@ fn stdin_source_type_py() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
TCH.py:1:8: F401 [*] `os` imported but unused
|
||||
F401 [*] `os` imported but unused
|
||||
--> TCH.py:1:8
|
||||
|
|
||||
1 | import os
|
||||
| ^^ F401
|
||||
| ^^
|
||||
|
|
||||
= help: Remove unused import: `os`
|
||||
help: Remove unused import: `os`
|
||||
|
||||
Found 1 error.
|
||||
[*] 1 fixable with the `--fix` option.
|
||||
|
|
@ -471,10 +477,11 @@ fn stdin_fix_jupyter() {
|
|||
"nbformat_minor": 5
|
||||
}
|
||||
----- stderr -----
|
||||
Jupyter.ipynb:cell 3:1:7: F821 Undefined name `x`
|
||||
F821 Undefined name `x`
|
||||
--> Jupyter.ipynb:cell 3:1:7
|
||||
|
|
||||
1 | print(x)
|
||||
| ^ F821
|
||||
| ^
|
||||
|
|
||||
|
||||
Found 3 errors (2 fixed, 1 remaining).
|
||||
|
|
@ -569,19 +576,21 @@ fn stdin_override_parser_ipynb() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
Jupyter.py:cell 1:1:8: F401 [*] `os` imported but unused
|
||||
F401 [*] `os` imported but unused
|
||||
--> Jupyter.py:cell 1:1:8
|
||||
|
|
||||
1 | import os
|
||||
| ^^ F401
|
||||
| ^^
|
||||
|
|
||||
= help: Remove unused import: `os`
|
||||
help: Remove unused import: `os`
|
||||
|
||||
Jupyter.py:cell 3:1:8: F401 [*] `sys` imported but unused
|
||||
F401 [*] `sys` imported but unused
|
||||
--> Jupyter.py:cell 3:1:8
|
||||
|
|
||||
1 | import sys
|
||||
| ^^^ F401
|
||||
| ^^^
|
||||
|
|
||||
= help: Remove unused import: `sys`
|
||||
help: Remove unused import: `sys`
|
||||
|
||||
Found 2 errors.
|
||||
[*] 2 fixable with the `--fix` option.
|
||||
|
|
@ -605,12 +614,13 @@ fn stdin_override_parser_py() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
F401.ipynb:1:8: F401 [*] `os` imported but unused
|
||||
F401 [*] `os` imported but unused
|
||||
--> F401.ipynb:1:8
|
||||
|
|
||||
1 | import os
|
||||
| ^^ F401
|
||||
| ^^
|
||||
|
|
||||
= help: Remove unused import: `os`
|
||||
help: Remove unused import: `os`
|
||||
|
||||
Found 1 error.
|
||||
[*] 1 fixable with the `--fix` option.
|
||||
|
|
@ -633,12 +643,13 @@ fn stdin_fix_when_not_fixable_should_still_print_contents() {
|
|||
print(sys.version)
|
||||
|
||||
----- stderr -----
|
||||
-:3:4: F634 If test is a tuple, which is always `True`
|
||||
F634 If test is a tuple, which is always `True`
|
||||
--> -:3:4
|
||||
|
|
||||
1 | import sys
|
||||
2 |
|
||||
3 | if (1, 2):
|
||||
| ^^^^^^ F634
|
||||
| ^^^^^^
|
||||
4 | print(sys.version)
|
||||
|
|
||||
|
||||
|
|
@ -798,7 +809,8 @@ fn stdin_parse_error() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:16: invalid-syntax: Expected one or more symbol names after import
|
||||
invalid-syntax: Expected one or more symbol names after import
|
||||
--> -:1:16
|
||||
|
|
||||
1 | from foo import
|
||||
| ^
|
||||
|
|
@ -818,14 +830,16 @@ fn stdin_multiple_parse_error() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:16: invalid-syntax: Expected one or more symbol names after import
|
||||
invalid-syntax: Expected one or more symbol names after import
|
||||
--> -:1:16
|
||||
|
|
||||
1 | from foo import
|
||||
| ^
|
||||
2 | bar =
|
||||
|
|
||||
|
||||
-:2:6: invalid-syntax: Expected an expression
|
||||
invalid-syntax: Expected an expression
|
||||
--> -:2:6
|
||||
|
|
||||
1 | from foo import
|
||||
2 | bar =
|
||||
|
|
@ -847,7 +861,8 @@ fn parse_error_not_included() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:6: invalid-syntax: Expected an expression
|
||||
invalid-syntax: Expected an expression
|
||||
--> -:1:6
|
||||
|
|
||||
1 | foo =
|
||||
| ^
|
||||
|
|
@ -867,10 +882,11 @@ fn full_output_preview() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: E741 Ambiguous variable name: `l`
|
||||
E741 Ambiguous variable name: `l`
|
||||
--> -:1:1
|
||||
|
|
||||
1 | l = 1
|
||||
| ^ E741
|
||||
| ^
|
||||
|
|
||||
|
||||
Found 1 error.
|
||||
|
|
@ -895,10 +911,11 @@ preview = true
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: E741 Ambiguous variable name: `l`
|
||||
E741 Ambiguous variable name: `l`
|
||||
--> -:1:1
|
||||
|
|
||||
1 | l = 1
|
||||
| ^ E741
|
||||
| ^
|
||||
|
|
||||
|
||||
Found 1 error.
|
||||
|
|
@ -916,10 +933,11 @@ fn full_output_format() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: E741 Ambiguous variable name: `l`
|
||||
E741 Ambiguous variable name: `l`
|
||||
--> -:1:1
|
||||
|
|
||||
1 | l = 1
|
||||
| ^ E741
|
||||
| ^
|
||||
|
|
||||
|
||||
Found 1 error.
|
||||
|
|
@ -1406,7 +1424,9 @@ fn redirect_direct() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF950 Hey this is a test rule that was redirected from another.
|
||||
RUF950 Hey this is a test rule that was redirected from another.
|
||||
--> -:1:1
|
||||
|
||||
Found 1 error.
|
||||
|
||||
----- stderr -----
|
||||
|
|
@ -1438,7 +1458,9 @@ fn redirect_prefix() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF950 Hey this is a test rule that was redirected from another.
|
||||
RUF950 Hey this is a test rule that was redirected from another.
|
||||
--> -:1:1
|
||||
|
||||
Found 1 error.
|
||||
|
||||
----- stderr -----
|
||||
|
|
@ -1455,7 +1477,9 @@ fn deprecated_direct() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF920 Hey this is a deprecated test rule.
|
||||
RUF920 Hey this is a deprecated test rule.
|
||||
--> -:1:1
|
||||
|
||||
Found 1 error.
|
||||
|
||||
----- stderr -----
|
||||
|
|
@ -1472,8 +1496,12 @@ fn deprecated_multiple_direct() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF920 Hey this is a deprecated test rule.
|
||||
-:1:1: RUF921 Hey this is another deprecated test rule.
|
||||
RUF920 Hey this is a deprecated test rule.
|
||||
--> -:1:1
|
||||
|
||||
RUF921 Hey this is another deprecated test rule.
|
||||
--> -:1:1
|
||||
|
||||
Found 2 errors.
|
||||
|
||||
----- stderr -----
|
||||
|
|
@ -1491,8 +1519,12 @@ fn deprecated_indirect() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF920 Hey this is a deprecated test rule.
|
||||
-:1:1: RUF921 Hey this is another deprecated test rule.
|
||||
RUF920 Hey this is a deprecated test rule.
|
||||
--> -:1:1
|
||||
|
||||
RUF921 Hey this is another deprecated test rule.
|
||||
--> -:1:1
|
||||
|
||||
Found 2 errors.
|
||||
|
||||
----- stderr -----
|
||||
|
|
@ -1638,22 +1670,23 @@ fn check_input_from_argfile() -> Result<()> {
|
|||
(file_a_path.display().to_string().as_str(), "/path/to/a.py"),
|
||||
]}, {
|
||||
assert_cmd_snapshot!(cmd
|
||||
.pass_stdin(""), @r###"
|
||||
.pass_stdin(""), @r"
|
||||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
/path/to/a.py:1:8: F401 [*] `os` imported but unused
|
||||
F401 [*] `os` imported but unused
|
||||
--> /path/to/a.py:1:8
|
||||
|
|
||||
1 | import os
|
||||
| ^^ F401
|
||||
| ^^
|
||||
|
|
||||
= help: Remove unused import: `os`
|
||||
help: Remove unused import: `os`
|
||||
|
||||
Found 1 error.
|
||||
[*] 1 fixable with the `--fix` option.
|
||||
|
||||
----- stderr -----
|
||||
"###);
|
||||
");
|
||||
});
|
||||
|
||||
Ok(())
|
||||
|
|
@ -1669,8 +1702,12 @@ fn check_hints_hidden_unsafe_fixes() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF901 [*] Hey this is a stable test rule with a safe fix.
|
||||
-:1:1: RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
RUF901 [*] Hey this is a stable test rule with a safe fix.
|
||||
--> -:1:1
|
||||
|
||||
RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
--> -:1:1
|
||||
|
||||
Found 2 errors.
|
||||
[*] 1 fixable with the `--fix` option (1 hidden fix can be enabled with the `--unsafe-fixes` option).
|
||||
|
||||
|
|
@ -1687,7 +1724,9 @@ fn check_hints_hidden_unsafe_fixes_with_no_safe_fixes() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
--> -:1:1
|
||||
|
||||
Found 1 error.
|
||||
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).
|
||||
|
||||
|
|
@ -1705,8 +1744,12 @@ fn check_no_hint_for_hidden_unsafe_fixes_when_disabled() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF901 [*] Hey this is a stable test rule with a safe fix.
|
||||
-:1:1: RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
RUF901 [*] Hey this is a stable test rule with a safe fix.
|
||||
--> -:1:1
|
||||
|
||||
RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
--> -:1:1
|
||||
|
||||
Found 2 errors.
|
||||
[*] 1 fixable with the --fix option.
|
||||
|
||||
|
|
@ -1725,7 +1768,9 @@ fn check_no_hint_for_hidden_unsafe_fixes_with_no_safe_fixes_when_disabled() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
--> -:1:1
|
||||
|
||||
Found 1 error.
|
||||
|
||||
----- stderr -----
|
||||
|
|
@ -1742,8 +1787,12 @@ fn check_shows_unsafe_fixes_with_opt_in() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF901 [*] Hey this is a stable test rule with a safe fix.
|
||||
-:1:1: RUF902 [*] Hey this is a stable test rule with an unsafe fix.
|
||||
RUF901 [*] Hey this is a stable test rule with a safe fix.
|
||||
--> -:1:1
|
||||
|
||||
RUF902 [*] Hey this is a stable test rule with an unsafe fix.
|
||||
--> -:1:1
|
||||
|
||||
Found 2 errors.
|
||||
[*] 2 fixable with the --fix option.
|
||||
|
||||
|
|
@ -1764,7 +1813,9 @@ fn fix_applies_safe_fixes_by_default() {
|
|||
# fix from stable-test-rule-safe-fix
|
||||
|
||||
----- stderr -----
|
||||
-:1:1: RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
--> -:1:1
|
||||
|
||||
Found 2 errors (1 fixed, 1 remaining).
|
||||
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).
|
||||
");
|
||||
|
|
@ -1801,7 +1852,9 @@ fn fix_does_not_apply_display_only_fixes() {
|
|||
----- stdout -----
|
||||
def add_to_list(item, some_list=[]): ...
|
||||
----- stderr -----
|
||||
-:1:1: RUF903 Hey this is a stable test rule with a display only fix.
|
||||
RUF903 Hey this is a stable test rule with a display only fix.
|
||||
--> -:1:1
|
||||
|
||||
Found 1 error.
|
||||
");
|
||||
}
|
||||
|
|
@ -1819,7 +1872,9 @@ fn fix_does_not_apply_display_only_fixes_with_unsafe_fixes_enabled() {
|
|||
----- stdout -----
|
||||
def add_to_list(item, some_list=[]): ...
|
||||
----- stderr -----
|
||||
-:1:1: RUF903 Hey this is a stable test rule with a display only fix.
|
||||
RUF903 Hey this is a stable test rule with a display only fix.
|
||||
--> -:1:1
|
||||
|
||||
Found 1 error.
|
||||
");
|
||||
}
|
||||
|
|
@ -1836,7 +1891,9 @@ fn fix_only_unsafe_fixes_available() {
|
|||
----- stdout -----
|
||||
|
||||
----- stderr -----
|
||||
-:1:1: RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
--> -:1:1
|
||||
|
||||
Found 1 error.
|
||||
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).
|
||||
");
|
||||
|
|
@ -1972,8 +2029,12 @@ extend-unsafe-fixes = ["RUF901"]
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF901 Hey this is a stable test rule with a safe fix.
|
||||
-:1:1: RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
RUF901 Hey this is a stable test rule with a safe fix.
|
||||
--> -:1:1
|
||||
|
||||
RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
--> -:1:1
|
||||
|
||||
Found 2 errors.
|
||||
No fixes available (2 hidden fixes can be enabled with the `--unsafe-fixes` option).
|
||||
|
||||
|
|
@ -2004,8 +2065,12 @@ extend-safe-fixes = ["RUF902"]
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF901 [*] Hey this is a stable test rule with a safe fix.
|
||||
-:1:1: RUF902 [*] Hey this is a stable test rule with an unsafe fix.
|
||||
RUF901 [*] Hey this is a stable test rule with a safe fix.
|
||||
--> -:1:1
|
||||
|
||||
RUF902 [*] Hey this is a stable test rule with an unsafe fix.
|
||||
--> -:1:1
|
||||
|
||||
Found 2 errors.
|
||||
[*] 2 fixable with the `--fix` option.
|
||||
|
||||
|
|
@ -2038,8 +2103,12 @@ extend-safe-fixes = ["RUF902"]
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF901 [*] Hey this is a stable test rule with a safe fix.
|
||||
-:1:1: RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
RUF901 [*] Hey this is a stable test rule with a safe fix.
|
||||
--> -:1:1
|
||||
|
||||
RUF902 Hey this is a stable test rule with an unsafe fix.
|
||||
--> -:1:1
|
||||
|
||||
Found 2 errors.
|
||||
[*] 1 fixable with the `--fix` option (1 hidden fix can be enabled with the `--unsafe-fixes` option).
|
||||
|
||||
|
|
@ -2074,13 +2143,27 @@ extend-safe-fixes = ["RUF9"]
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:1:1: RUF900 Hey this is a stable test rule.
|
||||
-:1:1: RUF901 Hey this is a stable test rule with a safe fix.
|
||||
-:1:1: RUF902 [*] Hey this is a stable test rule with an unsafe fix.
|
||||
-:1:1: RUF903 Hey this is a stable test rule with a display only fix.
|
||||
-:1:1: RUF920 Hey this is a deprecated test rule.
|
||||
-:1:1: RUF921 Hey this is another deprecated test rule.
|
||||
-:1:1: RUF950 Hey this is a test rule that was redirected from another.
|
||||
RUF900 Hey this is a stable test rule.
|
||||
--> -:1:1
|
||||
|
||||
RUF901 Hey this is a stable test rule with a safe fix.
|
||||
--> -:1:1
|
||||
|
||||
RUF902 [*] Hey this is a stable test rule with an unsafe fix.
|
||||
--> -:1:1
|
||||
|
||||
RUF903 Hey this is a stable test rule with a display only fix.
|
||||
--> -:1:1
|
||||
|
||||
RUF920 Hey this is a deprecated test rule.
|
||||
--> -:1:1
|
||||
|
||||
RUF921 Hey this is another deprecated test rule.
|
||||
--> -:1:1
|
||||
|
||||
RUF950 Hey this is a test rule that was redirected from another.
|
||||
--> -:1:1
|
||||
|
||||
Found 7 errors.
|
||||
[*] 1 fixable with the `--fix` option (1 hidden fix can be enabled with the `--unsafe-fixes` option).
|
||||
|
||||
|
|
@ -2141,10 +2224,11 @@ def log(x, base) -> float:
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:2:5: D417 Missing argument description in the docstring for `log`: `base`
|
||||
D417 Missing argument description in the docstring for `log`: `base`
|
||||
--> -:2:5
|
||||
|
|
||||
2 | def log(x, base) -> float:
|
||||
| ^^^ D417
|
||||
| ^^^
|
||||
3 | """Calculate natural log of a value
|
||||
|
|
||||
|
||||
|
|
@ -2177,14 +2261,15 @@ select = ["RUF017"]
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:3:1: RUF017 Avoid quadratic list summation
|
||||
RUF017 Avoid quadratic list summation
|
||||
--> -:3:1
|
||||
|
|
||||
1 | x = [1, 2, 3]
|
||||
2 | y = [4, 5, 6]
|
||||
3 | sum([x, y], [])
|
||||
| ^^^^^^^^^^^^^^^ RUF017
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Replace with `functools.reduce`
|
||||
help: Replace with `functools.reduce`
|
||||
|
||||
Found 1 error.
|
||||
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).
|
||||
|
|
@ -2217,14 +2302,15 @@ unfixable = ["RUF"]
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
-:3:1: RUF017 Avoid quadratic list summation
|
||||
RUF017 Avoid quadratic list summation
|
||||
--> -:3:1
|
||||
|
|
||||
1 | x = [1, 2, 3]
|
||||
2 | y = [4, 5, 6]
|
||||
3 | sum([x, y], [])
|
||||
| ^^^^^^^^^^^^^^^ RUF017
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Replace with `functools.reduce`
|
||||
help: Replace with `functools.reduce`
|
||||
|
||||
Found 1 error.
|
||||
|
||||
|
|
@ -2246,10 +2332,11 @@ fn pyproject_toml_stdin_syntax_error() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
pyproject.toml:1:9: RUF200 Failed to parse pyproject.toml: unclosed table, expected `]`
|
||||
RUF200 Failed to parse pyproject.toml: unclosed table, expected `]`
|
||||
--> pyproject.toml:1:9
|
||||
|
|
||||
1 | [project
|
||||
| ^ RUF200
|
||||
| ^
|
||||
|
|
||||
|
||||
Found 1 error.
|
||||
|
|
@ -2271,11 +2358,12 @@ fn pyproject_toml_stdin_schema_error() {
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
pyproject.toml:2:8: RUF200 Failed to parse pyproject.toml: invalid type: integer `1`, expected a string
|
||||
RUF200 Failed to parse pyproject.toml: invalid type: integer `1`, expected a string
|
||||
--> pyproject.toml:2:8
|
||||
|
|
||||
1 | [project]
|
||||
2 | name = 1
|
||||
| ^ RUF200
|
||||
| ^
|
||||
|
|
||||
|
||||
Found 1 error.
|
||||
|
|
@ -2363,11 +2451,12 @@ fn pyproject_toml_stdin_schema_error_fix() {
|
|||
[project]
|
||||
name = 1
|
||||
----- stderr -----
|
||||
pyproject.toml:2:8: RUF200 Failed to parse pyproject.toml: invalid type: integer `1`, expected a string
|
||||
RUF200 Failed to parse pyproject.toml: invalid type: integer `1`, expected a string
|
||||
--> pyproject.toml:2:8
|
||||
|
|
||||
1 | [project]
|
||||
2 | name = 1
|
||||
| ^ RUF200
|
||||
| ^
|
||||
|
|
||||
|
||||
Found 1 error.
|
||||
|
|
|
|||
|
|
@ -16,25 +16,28 @@ info:
|
|||
success: false
|
||||
exit_code: 1
|
||||
----- stdout -----
|
||||
input.py:1:8: F401 [*] `os` imported but unused
|
||||
F401 [*] `os` imported but unused
|
||||
--> input.py:1:8
|
||||
|
|
||||
1 | import os # F401
|
||||
| ^^ F401
|
||||
| ^^
|
||||
2 | x = y # F821
|
||||
3 | match 42: # invalid-syntax
|
||||
|
|
||||
= help: Remove unused import: `os`
|
||||
help: Remove unused import: `os`
|
||||
|
||||
input.py:2:5: F821 Undefined name `y`
|
||||
F821 Undefined name `y`
|
||||
--> input.py:2:5
|
||||
|
|
||||
1 | import os # F401
|
||||
2 | x = y # F821
|
||||
| ^ F821
|
||||
| ^
|
||||
3 | match 42: # invalid-syntax
|
||||
4 | case _: ...
|
||||
|
|
||||
|
||||
input.py:3:1: invalid-syntax: Cannot use `match` statement on Python 3.9 (syntax was added in Python 3.10)
|
||||
invalid-syntax: Cannot use `match` statement on Python 3.9 (syntax was added in Python 3.10)
|
||||
--> input.py:3:1
|
||||
|
|
||||
1 | import os # F401
|
||||
2 | x = y # F821
|
||||
|
|
|
|||
|
|
@ -1201,11 +1201,16 @@ fn format_snippet<'m>(
|
|||
|
||||
let is_file_level = snippet.annotations.iter().any(|ann| ann.is_file_level);
|
||||
if is_file_level {
|
||||
assert!(
|
||||
snippet.source.is_empty(),
|
||||
"Non-empty file-level snippet that won't be rendered: {:?}",
|
||||
snippet.source
|
||||
);
|
||||
// TODO(brent) enable this assertion again once we set `is_file_level` for individual rules.
|
||||
// It's causing too many false positives currently when the default is to make any
|
||||
// annotation with a default range file-level. See
|
||||
// https://github.com/astral-sh/ruff/issues/19688.
|
||||
//
|
||||
// assert!(
|
||||
// snippet.source.is_empty(),
|
||||
// "Non-empty file-level snippet that won't be rendered: {:?}",
|
||||
// snippet.source
|
||||
// );
|
||||
let header = format_header(origin, main_range, &[], is_first, snippet.cell_index);
|
||||
return DisplaySet {
|
||||
display_lines: header.map_or_else(Vec::new, |header| vec![header]),
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@ use std::borrow::Cow;
|
|||
use std::collections::BTreeMap;
|
||||
use std::path::Path;
|
||||
|
||||
use full::FullRenderer;
|
||||
use ruff_annotate_snippets::{
|
||||
Annotation as AnnotateAnnotation, Level as AnnotateLevel, Message as AnnotateMessage,
|
||||
Renderer as AnnotateRenderer, Snippet as AnnotateSnippet,
|
||||
Snippet as AnnotateSnippet,
|
||||
};
|
||||
use ruff_notebook::{Notebook, NotebookIndex};
|
||||
use ruff_source_file::{LineIndex, OneIndexed, SourceCode};
|
||||
use ruff_text_size::{TextLen, TextRange, TextSize};
|
||||
|
||||
use crate::diagnostic::stylesheet::DiagnosticStylesheet;
|
||||
use crate::{
|
||||
Db,
|
||||
files::File,
|
||||
|
|
@ -111,37 +111,7 @@ impl std::fmt::Display for DisplayDiagnostics<'_> {
|
|||
ConciseRenderer::new(self.resolver, self.config).render(f, self.diagnostics)?;
|
||||
}
|
||||
DiagnosticFormat::Full => {
|
||||
let stylesheet = if self.config.color {
|
||||
DiagnosticStylesheet::styled()
|
||||
} else {
|
||||
DiagnosticStylesheet::plain()
|
||||
};
|
||||
|
||||
let mut renderer = if self.config.color {
|
||||
AnnotateRenderer::styled()
|
||||
} else {
|
||||
AnnotateRenderer::plain()
|
||||
}
|
||||
.cut_indicator("…");
|
||||
|
||||
renderer = renderer
|
||||
.error(stylesheet.error)
|
||||
.warning(stylesheet.warning)
|
||||
.info(stylesheet.info)
|
||||
.note(stylesheet.note)
|
||||
.help(stylesheet.help)
|
||||
.line_no(stylesheet.line_no)
|
||||
.emphasis(stylesheet.emphasis)
|
||||
.none(stylesheet.none);
|
||||
|
||||
for diag in self.diagnostics {
|
||||
let resolved = Resolved::new(self.resolver, diag, self.config);
|
||||
let renderable = resolved.to_renderable(self.config.context);
|
||||
for diag in renderable.diagnostics.iter() {
|
||||
writeln!(f, "{}", renderer.render(diag.to_annotate()))?;
|
||||
}
|
||||
writeln!(f)?;
|
||||
}
|
||||
FullRenderer::new(self.resolver, self.config).render(f, self.diagnostics)?;
|
||||
}
|
||||
DiagnosticFormat::Azure => {
|
||||
AzureRenderer::new(self.resolver).render(f, self.diagnostics)?;
|
||||
|
|
@ -242,7 +212,12 @@ impl<'a> ResolvedDiagnostic<'a> {
|
|||
.annotations
|
||||
.iter()
|
||||
.filter_map(|ann| {
|
||||
let path = ann.span.file.path(resolver);
|
||||
let path = ann
|
||||
.span
|
||||
.file
|
||||
.relative_path(resolver)
|
||||
.to_str()
|
||||
.unwrap_or_else(|| ann.span.file.path(resolver));
|
||||
let diagnostic_source = ann.span.file.diagnostic_source(resolver);
|
||||
ResolvedAnnotation::new(path, &diagnostic_source, ann, resolver)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,3 +1,59 @@
|
|||
use ruff_annotate_snippets::Renderer as AnnotateRenderer;
|
||||
|
||||
use crate::diagnostic::render::{FileResolver, Resolved};
|
||||
use crate::diagnostic::{Diagnostic, DisplayDiagnosticConfig, stylesheet::DiagnosticStylesheet};
|
||||
|
||||
pub(super) struct FullRenderer<'a> {
|
||||
resolver: &'a dyn FileResolver,
|
||||
config: &'a DisplayDiagnosticConfig,
|
||||
}
|
||||
|
||||
impl<'a> FullRenderer<'a> {
|
||||
pub(super) fn new(resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig) -> Self {
|
||||
Self { resolver, config }
|
||||
}
|
||||
|
||||
pub(super) fn render(
|
||||
&self,
|
||||
f: &mut std::fmt::Formatter,
|
||||
diagnostics: &[Diagnostic],
|
||||
) -> std::fmt::Result {
|
||||
let stylesheet = if self.config.color {
|
||||
DiagnosticStylesheet::styled()
|
||||
} else {
|
||||
DiagnosticStylesheet::plain()
|
||||
};
|
||||
|
||||
let mut renderer = if self.config.color {
|
||||
AnnotateRenderer::styled()
|
||||
} else {
|
||||
AnnotateRenderer::plain()
|
||||
}
|
||||
.cut_indicator("…");
|
||||
|
||||
renderer = renderer
|
||||
.error(stylesheet.error)
|
||||
.warning(stylesheet.warning)
|
||||
.info(stylesheet.info)
|
||||
.note(stylesheet.note)
|
||||
.help(stylesheet.help)
|
||||
.line_no(stylesheet.line_no)
|
||||
.emphasis(stylesheet.emphasis)
|
||||
.none(stylesheet.none);
|
||||
|
||||
for diag in diagnostics {
|
||||
let resolved = Resolved::new(self.resolver, diag, self.config);
|
||||
let renderable = resolved.to_renderable(self.config.context);
|
||||
for diag in renderable.diagnostics.iter() {
|
||||
writeln!(f, "{}", renderer.render(diag.to_annotate()))?;
|
||||
}
|
||||
writeln!(f)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ruff_diagnostics::Applicability;
|
||||
|
|
|
|||
|
|
@ -1,28 +1,30 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/message/text.rs
|
||||
expression: content
|
||||
snapshot_kind: text
|
||||
---
|
||||
fib.py:1:8: F401 `os` imported but unused
|
||||
F401 `os` imported but unused
|
||||
--> fib.py:1:8
|
||||
|
|
||||
1 | import os
|
||||
| ^^ F401
|
||||
| ^^
|
||||
|
|
||||
= help: Remove unused import: `os`
|
||||
help: Remove unused import: `os`
|
||||
|
||||
fib.py:6:5: F841 Local variable `x` is assigned to but never used
|
||||
F841 Local variable `x` is assigned to but never used
|
||||
--> fib.py:6:5
|
||||
|
|
||||
4 | def fibonacci(n):
|
||||
5 | """Compute the nth number in the Fibonacci sequence."""
|
||||
6 | x = 1
|
||||
| ^ F841
|
||||
| ^
|
||||
7 | if n == 0:
|
||||
8 | return 0
|
||||
|
|
||||
= help: Remove assignment to unused variable `x`
|
||||
help: Remove assignment to unused variable `x`
|
||||
|
||||
undef.py:1:4: F821 Undefined name `a`
|
||||
F821 Undefined name `a`
|
||||
--> undef.py:1:4
|
||||
|
|
||||
1 | if a == 1: pass
|
||||
| ^ F821
|
||||
| ^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,28 +1,30 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/message/text.rs
|
||||
expression: content
|
||||
snapshot_kind: text
|
||||
---
|
||||
fib.py:1:8: F401 `os` imported but unused
|
||||
F401 `os` imported but unused
|
||||
--> fib.py:1:8
|
||||
|
|
||||
1 | import os
|
||||
| ^^ F401
|
||||
| ^^
|
||||
|
|
||||
= help: Remove unused import: `os`
|
||||
help: Remove unused import: `os`
|
||||
|
||||
fib.py:6:5: F841 Local variable `x` is assigned to but never used
|
||||
F841 Local variable `x` is assigned to but never used
|
||||
--> fib.py:6:5
|
||||
|
|
||||
4 | def fibonacci(n):
|
||||
5 | """Compute the nth number in the Fibonacci sequence."""
|
||||
6 | x = 1
|
||||
| ^ F841
|
||||
| ^
|
||||
7 | if n == 0:
|
||||
8 | return 0
|
||||
|
|
||||
= help: Remove assignment to unused variable `x`
|
||||
help: Remove assignment to unused variable `x`
|
||||
|
||||
undef.py:1:4: F821 Undefined name `a`
|
||||
F821 Undefined name `a`
|
||||
--> undef.py:1:4
|
||||
|
|
||||
1 | if a == 1: pass
|
||||
| ^ F821
|
||||
| ^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,28 +1,30 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/message/text.rs
|
||||
expression: content
|
||||
snapshot_kind: text
|
||||
---
|
||||
fib.py:1:8: F401 [*] `os` imported but unused
|
||||
F401 [*] `os` imported but unused
|
||||
--> fib.py:1:8
|
||||
|
|
||||
1 | import os
|
||||
| ^^ F401
|
||||
| ^^
|
||||
|
|
||||
= help: Remove unused import: `os`
|
||||
help: Remove unused import: `os`
|
||||
|
||||
fib.py:6:5: F841 [*] Local variable `x` is assigned to but never used
|
||||
F841 [*] Local variable `x` is assigned to but never used
|
||||
--> fib.py:6:5
|
||||
|
|
||||
4 | def fibonacci(n):
|
||||
5 | """Compute the nth number in the Fibonacci sequence."""
|
||||
6 | x = 1
|
||||
| ^ F841
|
||||
| ^
|
||||
7 | if n == 0:
|
||||
8 | return 0
|
||||
|
|
||||
= help: Remove assignment to unused variable `x`
|
||||
help: Remove assignment to unused variable `x`
|
||||
|
||||
undef.py:1:4: F821 Undefined name `a`
|
||||
F821 Undefined name `a`
|
||||
--> undef.py:1:4
|
||||
|
|
||||
1 | if a == 1: pass
|
||||
| ^ F821
|
||||
| ^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -2,29 +2,32 @@
|
|||
source: crates/ruff_linter/src/message/text.rs
|
||||
expression: content
|
||||
---
|
||||
notebook.ipynb:cell 1:2:8: F401 [*] `os` imported but unused
|
||||
F401 [*] `os` imported but unused
|
||||
--> notebook.ipynb:cell 1:2:8
|
||||
|
|
||||
1 | # cell 1
|
||||
2 | import os
|
||||
| ^^ F401
|
||||
| ^^
|
||||
|
|
||||
= help: Remove unused import: `os`
|
||||
help: Remove unused import: `os`
|
||||
|
||||
notebook.ipynb:cell 2:2:8: F401 [*] `math` imported but unused
|
||||
F401 [*] `math` imported but unused
|
||||
--> notebook.ipynb:cell 2:2:8
|
||||
|
|
||||
1 | # cell 2
|
||||
2 | import math
|
||||
| ^^^^ F401
|
||||
| ^^^^
|
||||
3 |
|
||||
4 | print('hello world')
|
||||
|
|
||||
= help: Remove unused import: `math`
|
||||
help: Remove unused import: `math`
|
||||
|
||||
notebook.ipynb:cell 3:4:5: F841 [*] Local variable `x` is assigned to but never used
|
||||
F841 [*] Local variable `x` is assigned to but never used
|
||||
--> notebook.ipynb:cell 3:4:5
|
||||
|
|
||||
2 | def foo():
|
||||
3 | print()
|
||||
4 | x = 1
|
||||
| ^ F841
|
||||
| ^
|
||||
|
|
||||
= help: Remove assignment to unused variable `x`
|
||||
help: Remove assignment to unused variable `x`
|
||||
|
|
|
|||
|
|
@ -2,16 +2,17 @@
|
|||
source: crates/ruff_linter/src/message/text.rs
|
||||
expression: content
|
||||
---
|
||||
syntax_errors.py:1:15: invalid-syntax: Expected one or more symbol names after import
|
||||
invalid-syntax: Expected one or more symbol names after import
|
||||
--> syntax_errors.py:1:15
|
||||
|
|
||||
1 | from os import
|
||||
| ^
|
||||
2 |
|
||||
3 | if call(foo
|
||||
4 | def bar():
|
||||
|
|
||||
|
||||
syntax_errors.py:3:12: invalid-syntax: Expected ')', found newline
|
||||
invalid-syntax: Expected ')', found newline
|
||||
--> syntax_errors.py:3:12
|
||||
|
|
||||
1 | from os import
|
||||
2 |
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ use std::borrow::Cow;
|
|||
use std::fmt::{Display, Formatter};
|
||||
use std::io::Write;
|
||||
|
||||
use bitflags::bitflags;
|
||||
use colored::Colorize;
|
||||
use ruff_annotate_snippets::{Level, Renderer, Snippet};
|
||||
|
||||
|
|
@ -17,25 +16,18 @@ use crate::message::diff::Diff;
|
|||
use crate::message::{Emitter, EmitterContext};
|
||||
use crate::settings::types::UnsafeFixes;
|
||||
|
||||
bitflags! {
|
||||
#[derive(Default)]
|
||||
struct EmitterFlags: u8 {
|
||||
/// Whether to show the diff of a fix, for diagnostics that have a fix.
|
||||
const SHOW_FIX_DIFF = 1 << 1;
|
||||
/// Whether to show the source code of a diagnostic.
|
||||
const SHOW_SOURCE = 1 << 2;
|
||||
}
|
||||
}
|
||||
|
||||
pub struct TextEmitter {
|
||||
flags: EmitterFlags,
|
||||
/// Whether to show the diff of a fix, for diagnostics that have a fix.
|
||||
///
|
||||
/// Note that this is not currently exposed in the CLI (#7352) and is only used in tests.
|
||||
show_fix_diff: bool,
|
||||
config: DisplayDiagnosticConfig,
|
||||
}
|
||||
|
||||
impl Default for TextEmitter {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
flags: EmitterFlags::default(),
|
||||
show_fix_diff: false,
|
||||
config: DisplayDiagnosticConfig::default()
|
||||
.format(DiagnosticFormat::Concise)
|
||||
.hide_severity(true)
|
||||
|
|
@ -53,13 +45,17 @@ impl TextEmitter {
|
|||
|
||||
#[must_use]
|
||||
pub fn with_show_fix_diff(mut self, show_fix_diff: bool) -> Self {
|
||||
self.flags.set(EmitterFlags::SHOW_FIX_DIFF, show_fix_diff);
|
||||
self.show_fix_diff = show_fix_diff;
|
||||
self
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn with_show_source(mut self, show_source: bool) -> Self {
|
||||
self.flags.set(EmitterFlags::SHOW_SOURCE, show_source);
|
||||
self.config = self.config.format(if show_source {
|
||||
DiagnosticFormat::Full
|
||||
} else {
|
||||
DiagnosticFormat::Concise
|
||||
});
|
||||
self
|
||||
}
|
||||
|
||||
|
|
@ -94,23 +90,7 @@ impl Emitter for TextEmitter {
|
|||
for message in diagnostics {
|
||||
write!(writer, "{}", message.display(context, &self.config))?;
|
||||
|
||||
let filename = message.expect_ruff_filename();
|
||||
let notebook_index = context.notebook_index(&filename);
|
||||
if self.flags.intersects(EmitterFlags::SHOW_SOURCE) {
|
||||
// The `0..0` range is used to highlight file-level diagnostics.
|
||||
if message.expect_range() != TextRange::default() {
|
||||
writeln!(
|
||||
writer,
|
||||
"{}",
|
||||
MessageCodeFrame {
|
||||
message,
|
||||
notebook_index
|
||||
}
|
||||
)?;
|
||||
}
|
||||
}
|
||||
|
||||
if self.flags.intersects(EmitterFlags::SHOW_FIX_DIFF) {
|
||||
if self.show_fix_diff {
|
||||
if let Some(diff) = Diff::from_message(message) {
|
||||
writeln!(writer, "{diff}")?;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +1,32 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR001.py:11:1: AIR001 Task variable name should match the `task_id`: "my_task"
|
||||
AIR001 Task variable name should match the `task_id`: "my_task"
|
||||
--> AIR001.py:11:1
|
||||
|
|
||||
10 | my_task = PythonOperator(task_id="my_task", callable=my_callable)
|
||||
11 | incorrect_name = PythonOperator(task_id="my_task") # AIR001
|
||||
| ^^^^^^^^^^^^^^ AIR001
|
||||
| ^^^^^^^^^^^^^^
|
||||
12 |
|
||||
13 | my_task = AirbyteTriggerSyncOperator(task_id="my_task", callable=my_callable)
|
||||
|
|
||||
|
||||
AIR001.py:14:1: AIR001 Task variable name should match the `task_id`: "my_task"
|
||||
AIR001 Task variable name should match the `task_id`: "my_task"
|
||||
--> AIR001.py:14:1
|
||||
|
|
||||
13 | my_task = AirbyteTriggerSyncOperator(task_id="my_task", callable=my_callable)
|
||||
14 | incorrect_name = AirbyteTriggerSyncOperator(task_id="my_task") # AIR001
|
||||
| ^^^^^^^^^^^^^^ AIR001
|
||||
| ^^^^^^^^^^^^^^
|
||||
15 |
|
||||
16 | my_task = AppflowFlowRunOperator(task_id="my_task", callable=my_callable)
|
||||
|
|
||||
|
||||
AIR001.py:17:1: AIR001 Task variable name should match the `task_id`: "my_task"
|
||||
AIR001 Task variable name should match the `task_id`: "my_task"
|
||||
--> AIR001.py:17:1
|
||||
|
|
||||
16 | my_task = AppflowFlowRunOperator(task_id="my_task", callable=my_callable)
|
||||
17 | incorrect_name = AppflowFlowRunOperator(task_id="my_task") # AIR001
|
||||
| ^^^^^^^^^^^^^^ AIR001
|
||||
| ^^^^^^^^^^^^^^
|
||||
18 |
|
||||
19 | # Consider only from the `airflow.operators` (or providers operators) module
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,20 +1,22 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR002.py:4:1: AIR002 DAG should have an explicit `schedule` argument
|
||||
AIR002 DAG should have an explicit `schedule` argument
|
||||
--> AIR002.py:4:1
|
||||
|
|
||||
2 | from airflow.timetables.simple import NullTimetable
|
||||
3 |
|
||||
4 | DAG(dag_id="class_default_schedule")
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
5 |
|
||||
6 | DAG(dag_id="class_schedule", schedule="@hourly")
|
||||
|
|
||||
|
||||
AIR002.py:13:2: AIR002 DAG should have an explicit `schedule` argument
|
||||
AIR002 DAG should have an explicit `schedule` argument
|
||||
--> AIR002.py:13:2
|
||||
|
|
||||
13 | @dag()
|
||||
| ^^^^^ AIR002
|
||||
| ^^^^^
|
||||
14 | def decorator_default_schedule():
|
||||
15 | pass
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,46 +1,50 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR301_airflow_plugin.py:7:5: AIR301 `operators` is removed in Airflow 3.0
|
||||
AIR301 `operators` is removed in Airflow 3.0
|
||||
--> AIR301_airflow_plugin.py:7:5
|
||||
|
|
||||
5 | name = "test_plugin"
|
||||
6 | # --- Invalid extensions start
|
||||
7 | operators = [PluginOperator]
|
||||
| ^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^
|
||||
8 | sensors = [PluginSensorOperator]
|
||||
9 | hooks = [PluginHook]
|
||||
|
|
||||
= help: This extension should just be imported as a regular python module.
|
||||
help: This extension should just be imported as a regular python module.
|
||||
|
||||
AIR301_airflow_plugin.py:8:5: AIR301 `sensors` is removed in Airflow 3.0
|
||||
AIR301 `sensors` is removed in Airflow 3.0
|
||||
--> AIR301_airflow_plugin.py:8:5
|
||||
|
|
||||
6 | # --- Invalid extensions start
|
||||
7 | operators = [PluginOperator]
|
||||
8 | sensors = [PluginSensorOperator]
|
||||
| ^^^^^^^ AIR301
|
||||
| ^^^^^^^
|
||||
9 | hooks = [PluginHook]
|
||||
10 | executors = [PluginExecutor]
|
||||
|
|
||||
= help: This extension should just be imported as a regular python module.
|
||||
help: This extension should just be imported as a regular python module.
|
||||
|
||||
AIR301_airflow_plugin.py:9:5: AIR301 `hooks` is removed in Airflow 3.0
|
||||
AIR301 `hooks` is removed in Airflow 3.0
|
||||
--> AIR301_airflow_plugin.py:9:5
|
||||
|
|
||||
7 | operators = [PluginOperator]
|
||||
8 | sensors = [PluginSensorOperator]
|
||||
9 | hooks = [PluginHook]
|
||||
| ^^^^^ AIR301
|
||||
| ^^^^^
|
||||
10 | executors = [PluginExecutor]
|
||||
11 | # --- Invalid extensions end
|
||||
|
|
||||
= help: This extension should just be imported as a regular python module.
|
||||
help: This extension should just be imported as a regular python module.
|
||||
|
||||
AIR301_airflow_plugin.py:10:5: AIR301 `executors` is removed in Airflow 3.0
|
||||
AIR301 `executors` is removed in Airflow 3.0
|
||||
--> AIR301_airflow_plugin.py:10:5
|
||||
|
|
||||
8 | sensors = [PluginSensorOperator]
|
||||
9 | hooks = [PluginHook]
|
||||
10 | executors = [PluginExecutor]
|
||||
| ^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^
|
||||
11 | # --- Invalid extensions end
|
||||
12 | macros = [plugin_macro]
|
||||
|
|
||||
= help: This extension should just be imported as a regular python module.
|
||||
help: This extension should just be imported as a regular python module.
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR301_args.py:21:39: AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:21:39
|
||||
|
|
||||
19 | DAG(dag_id="class_schedule", schedule="@hourly")
|
||||
20 |
|
||||
21 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
22 |
|
||||
23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
|
|
||||
= help: Use `schedule` instead
|
||||
help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
18 18 |
|
||||
|
|
@ -22,14 +23,15 @@ AIR301_args.py:21:39: AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
|||
23 23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
24 24 |
|
||||
|
||||
AIR301_args.py:23:31: AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:23:31
|
||||
|
|
||||
21 | DAG(dag_id="class_schedule_interval", schedule_interval="@hourly")
|
||||
22 |
|
||||
23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
| ^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= help: Use `schedule` instead
|
||||
help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
20 20 |
|
||||
|
|
@ -41,14 +43,15 @@ AIR301_args.py:23:31: AIR301 [*] `timetable` is removed in Airflow 3.0
|
|||
25 25 |
|
||||
26 26 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
|
||||
AIR301_args.py:26:31: AIR301 [*] `fail_stop` is removed in Airflow 3.0
|
||||
AIR301 [*] `fail_stop` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:26:31
|
||||
|
|
||||
26 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
| ^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^
|
||||
27 |
|
||||
28 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
|
|
||||
= help: Use `fail_fast` instead
|
||||
help: Use `fail_fast` instead
|
||||
|
||||
ℹ Safe fix
|
||||
23 23 | DAG(dag_id="class_timetable", timetable=NullTimetable())
|
||||
|
|
@ -60,34 +63,37 @@ AIR301_args.py:26:31: AIR301 [*] `fail_stop` is removed in Airflow 3.0
|
|||
28 28 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
29 29 |
|
||||
|
||||
AIR301_args.py:28:34: AIR301 `default_view` is removed in Airflow 3.0
|
||||
AIR301 `default_view` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:28:34
|
||||
|
|
||||
26 | DAG(dag_id="class_fail_stop", fail_stop=True)
|
||||
27 |
|
||||
28 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^
|
||||
29 |
|
||||
30 | DAG(dag_id="class_orientation", orientation="BT")
|
||||
|
|
||||
|
||||
AIR301_args.py:30:33: AIR301 `orientation` is removed in Airflow 3.0
|
||||
AIR301 `orientation` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:30:33
|
||||
|
|
||||
28 | DAG(dag_id="class_default_view", default_view="dag_default_view")
|
||||
29 |
|
||||
30 | DAG(dag_id="class_orientation", orientation="BT")
|
||||
| ^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^
|
||||
31 |
|
||||
32 | allow_future_exec_dates_dag = DAG(dag_id="class_allow_future_exec_dates")
|
||||
|
|
||||
|
||||
AIR301_args.py:41:6: AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:41:6
|
||||
|
|
||||
41 | @dag(schedule_interval="0 * * * *")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
42 | def decorator_schedule_interval():
|
||||
43 | pass
|
||||
|
|
||||
= help: Use `schedule` instead
|
||||
help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
38 38 | pass
|
||||
|
|
@ -99,14 +105,15 @@ AIR301_args.py:41:6: AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
|||
43 43 | pass
|
||||
44 44 |
|
||||
|
||||
AIR301_args.py:46:6: AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
AIR301 [*] `timetable` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:46:6
|
||||
|
|
||||
46 | @dag(timetable=NullTimetable())
|
||||
| ^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^
|
||||
47 | def decorator_timetable():
|
||||
48 | pass
|
||||
|
|
||||
= help: Use `schedule` instead
|
||||
help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
43 43 | pass
|
||||
|
|
@ -118,16 +125,17 @@ AIR301_args.py:46:6: AIR301 [*] `timetable` is removed in Airflow 3.0
|
|||
48 48 | pass
|
||||
49 49 |
|
||||
|
||||
AIR301_args.py:54:62: AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:54:62
|
||||
|
|
||||
52 | def decorator_deprecated_operator_args():
|
||||
53 | trigger_dagrun_op = trigger_dagrun.TriggerDagRunOperator(
|
||||
54 | task_id="trigger_dagrun_op1", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
55 | )
|
||||
56 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
|
|
||||
= help: Use `logical_date` instead
|
||||
help: Use `logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
51 51 | @dag()
|
||||
|
|
@ -139,15 +147,16 @@ AIR301_args.py:54:62: AIR301 [*] `execution_date` is removed in Airflow 3.0
|
|||
56 56 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
57 57 | task_id="trigger_dagrun_op2", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
|
||||
AIR301_args.py:57:62: AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
AIR301 [*] `execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:57:62
|
||||
|
|
||||
55 | )
|
||||
56 | trigger_dagrun_op2 = TriggerDagRunOperator(
|
||||
57 | task_id="trigger_dagrun_op2", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
58 | )
|
||||
|
|
||||
= help: Use `logical_date` instead
|
||||
help: Use `logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
54 54 | task_id="trigger_dagrun_op1", trigger_dag_id="test", execution_date="2024-12-04"
|
||||
|
|
@ -159,15 +168,16 @@ AIR301_args.py:57:62: AIR301 [*] `execution_date` is removed in Airflow 3.0
|
|||
59 59 |
|
||||
60 60 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
|
||||
AIR301_args.py:61:33: AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:61:33
|
||||
|
|
||||
60 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
61 | task_id="branch_dt_op", use_task_execution_day=True, task_concurrency=5
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
62 | )
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
|
|
||||
= help: Use `use_task_logical_date` instead
|
||||
help: Use `use_task_logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
58 58 | )
|
||||
|
|
@ -179,15 +189,16 @@ AIR301_args.py:61:33: AIR301 [*] `use_task_execution_day` is removed in Airflow
|
|||
63 63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
64 64 | task_id="branch_dt_op2",
|
||||
|
||||
AIR301_args.py:61:62: AIR301 [*] `task_concurrency` is removed in Airflow 3.0
|
||||
AIR301 [*] `task_concurrency` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:61:62
|
||||
|
|
||||
60 | branch_dt_op = datetime.BranchDateTimeOperator(
|
||||
61 | task_id="branch_dt_op", use_task_execution_day=True, task_concurrency=5
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
62 | )
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
|
|
||||
= help: Use `max_active_tis_per_dag` instead
|
||||
help: Use `max_active_tis_per_dag` instead
|
||||
|
||||
ℹ Safe fix
|
||||
58 58 | )
|
||||
|
|
@ -199,16 +210,17 @@ AIR301_args.py:61:62: AIR301 [*] `task_concurrency` is removed in Airflow 3.0
|
|||
63 63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
64 64 | task_id="branch_dt_op2",
|
||||
|
||||
AIR301_args.py:65:9: AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:65:9
|
||||
|
|
||||
63 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
64 | task_id="branch_dt_op2",
|
||||
65 | use_task_execution_day=True,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
66 | sla=timedelta(seconds=10),
|
||||
67 | )
|
||||
|
|
||||
= help: Use `use_task_logical_date` instead
|
||||
help: Use `use_task_logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
62 62 | )
|
||||
|
|
@ -220,15 +232,16 @@ AIR301_args.py:65:9: AIR301 [*] `use_task_execution_day` is removed in Airflow 3
|
|||
67 67 | )
|
||||
68 68 |
|
||||
|
||||
AIR301_args.py:92:9: AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
AIR301 [*] `use_task_execution_day` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:92:9
|
||||
|
|
||||
90 | follow_task_ids_if_true=None,
|
||||
91 | week_day=1,
|
||||
92 | use_task_execution_day=True,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
93 | )
|
||||
|
|
||||
= help: Use `use_task_logical_date` instead
|
||||
help: Use `use_task_logical_date` instead
|
||||
|
||||
ℹ Safe fix
|
||||
89 89 | follow_task_ids_if_false=None,
|
||||
|
|
@ -240,49 +253,54 @@ AIR301_args.py:92:9: AIR301 [*] `use_task_execution_day` is removed in Airflow 3
|
|||
94 94 |
|
||||
95 95 | trigger_dagrun_op >> trigger_dagrun_op2
|
||||
|
||||
AIR301_args.py:102:15: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
AIR301 `filename_template` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:102:15
|
||||
|
|
||||
101 | # deprecated filename_template argument in FileTaskHandler
|
||||
102 | S3TaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
103 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
104 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
|
|
||||
|
||||
AIR301_args.py:103:17: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
AIR301 `filename_template` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:103:17
|
||||
|
|
||||
101 | # deprecated filename_template argument in FileTaskHandler
|
||||
102 | S3TaskHandler(filename_template="/tmp/test")
|
||||
103 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
104 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
105 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
|
|
||||
|
||||
AIR301_args.py:104:26: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
AIR301 `filename_template` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:104:26
|
||||
|
|
||||
102 | S3TaskHandler(filename_template="/tmp/test")
|
||||
103 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
104 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
105 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
|
|
||||
|
||||
AIR301_args.py:105:16: AIR301 `filename_template` is removed in Airflow 3.0
|
||||
AIR301 `filename_template` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:105:16
|
||||
|
|
||||
103 | HdfsTaskHandler(filename_template="/tmp/test")
|
||||
104 | ElasticsearchTaskHandler(filename_template="/tmp/test")
|
||||
105 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
106 |
|
||||
107 | FabAuthManager(None)
|
||||
|
|
||||
|
||||
AIR301_args.py:107:15: AIR301 `appbuilder` is removed in Airflow 3.0
|
||||
AIR301 `appbuilder` is removed in Airflow 3.0
|
||||
--> AIR301_args.py:107:15
|
||||
|
|
||||
105 | GCSTaskHandler(filename_template="/tmp/test")
|
||||
106 |
|
||||
107 | FabAuthManager(None)
|
||||
| ^^^^^^ AIR301
|
||||
| ^^^^^^
|
||||
|
|
||||
= help: The constructor takes no parameter now
|
||||
help: The constructor takes no parameter now
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR301_class_attribute.py:25:19: AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:25:19
|
||||
|
|
||||
23 | # airflow.Dataset
|
||||
24 | dataset_from_root = DatasetFromRoot()
|
||||
25 | dataset_from_root.iter_datasets()
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^
|
||||
26 | dataset_from_root.iter_dataset_aliases()
|
||||
|
|
||||
= help: Use `iter_assets` instead
|
||||
help: Use `iter_assets` instead
|
||||
|
||||
ℹ Safe fix
|
||||
22 22 |
|
||||
|
|
@ -21,16 +22,17 @@ AIR301_class_attribute.py:25:19: AIR301 [*] `iter_datasets` is removed in Airflo
|
|||
27 27 |
|
||||
28 28 | # airflow.datasets
|
||||
|
||||
AIR301_class_attribute.py:26:19: AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:26:19
|
||||
|
|
||||
24 | dataset_from_root = DatasetFromRoot()
|
||||
25 | dataset_from_root.iter_datasets()
|
||||
26 | dataset_from_root.iter_dataset_aliases()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
27 |
|
||||
28 | # airflow.datasets
|
||||
|
|
||||
= help: Use `iter_asset_aliases` instead
|
||||
help: Use `iter_asset_aliases` instead
|
||||
|
||||
ℹ Safe fix
|
||||
23 23 | # airflow.Dataset
|
||||
|
|
@ -42,15 +44,16 @@ AIR301_class_attribute.py:26:19: AIR301 [*] `iter_dataset_aliases` is removed in
|
|||
28 28 | # airflow.datasets
|
||||
29 29 | dataset_to_test_method_call = Dataset()
|
||||
|
||||
AIR301_class_attribute.py:30:29: AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:30:29
|
||||
|
|
||||
28 | # airflow.datasets
|
||||
29 | dataset_to_test_method_call = Dataset()
|
||||
30 | dataset_to_test_method_call.iter_datasets()
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^
|
||||
31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
= help: Use `iter_assets` instead
|
||||
help: Use `iter_assets` instead
|
||||
|
||||
ℹ Safe fix
|
||||
27 27 |
|
||||
|
|
@ -62,16 +65,17 @@ AIR301_class_attribute.py:30:29: AIR301 [*] `iter_datasets` is removed in Airflo
|
|||
32 32 |
|
||||
33 33 | alias_to_test_method_call = DatasetAlias()
|
||||
|
||||
AIR301_class_attribute.py:31:29: AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:31:29
|
||||
|
|
||||
29 | dataset_to_test_method_call = Dataset()
|
||||
30 | dataset_to_test_method_call.iter_datasets()
|
||||
31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
32 |
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
|
|
||||
= help: Use `iter_asset_aliases` instead
|
||||
help: Use `iter_asset_aliases` instead
|
||||
|
||||
ℹ Safe fix
|
||||
28 28 | # airflow.datasets
|
||||
|
|
@ -83,14 +87,15 @@ AIR301_class_attribute.py:31:29: AIR301 [*] `iter_dataset_aliases` is removed in
|
|||
33 33 | alias_to_test_method_call = DatasetAlias()
|
||||
34 34 | alias_to_test_method_call.iter_datasets()
|
||||
|
||||
AIR301_class_attribute.py:34:27: AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:34:27
|
||||
|
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
34 | alias_to_test_method_call.iter_datasets()
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^
|
||||
35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
= help: Use `iter_assets` instead
|
||||
help: Use `iter_assets` instead
|
||||
|
||||
ℹ Safe fix
|
||||
31 31 | dataset_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
@ -102,16 +107,17 @@ AIR301_class_attribute.py:34:27: AIR301 [*] `iter_datasets` is removed in Airflo
|
|||
36 36 |
|
||||
37 37 | any_to_test_method_call = DatasetAny()
|
||||
|
||||
AIR301_class_attribute.py:35:27: AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:35:27
|
||||
|
|
||||
33 | alias_to_test_method_call = DatasetAlias()
|
||||
34 | alias_to_test_method_call.iter_datasets()
|
||||
35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
36 |
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
|
|
||||
= help: Use `iter_asset_aliases` instead
|
||||
help: Use `iter_asset_aliases` instead
|
||||
|
||||
ℹ Safe fix
|
||||
32 32 |
|
||||
|
|
@ -123,14 +129,15 @@ AIR301_class_attribute.py:35:27: AIR301 [*] `iter_dataset_aliases` is removed in
|
|||
37 37 | any_to_test_method_call = DatasetAny()
|
||||
38 38 | any_to_test_method_call.iter_datasets()
|
||||
|
||||
AIR301_class_attribute.py:38:25: AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
AIR301 [*] `iter_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:38:25
|
||||
|
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
38 | any_to_test_method_call.iter_datasets()
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^
|
||||
39 | any_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
||||
= help: Use `iter_assets` instead
|
||||
help: Use `iter_assets` instead
|
||||
|
||||
ℹ Safe fix
|
||||
35 35 | alias_to_test_method_call.iter_dataset_aliases()
|
||||
|
|
@ -142,16 +149,17 @@ AIR301_class_attribute.py:38:25: AIR301 [*] `iter_datasets` is removed in Airflo
|
|||
40 40 |
|
||||
41 41 | # airflow.datasets.manager
|
||||
|
||||
AIR301_class_attribute.py:39:25: AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
AIR301 [*] `iter_dataset_aliases` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:39:25
|
||||
|
|
||||
37 | any_to_test_method_call = DatasetAny()
|
||||
38 | any_to_test_method_call.iter_datasets()
|
||||
39 | any_to_test_method_call.iter_dataset_aliases()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
40 |
|
||||
41 | # airflow.datasets.manager
|
||||
|
|
||||
= help: Use `iter_asset_aliases` instead
|
||||
help: Use `iter_asset_aliases` instead
|
||||
|
||||
ℹ Safe fix
|
||||
36 36 |
|
||||
|
|
@ -163,15 +171,16 @@ AIR301_class_attribute.py:39:25: AIR301 [*] `iter_dataset_aliases` is removed in
|
|||
41 41 | # airflow.datasets.manager
|
||||
42 42 | dm = DatasetManager()
|
||||
|
||||
AIR301_class_attribute.py:42:6: AIR301 [*] `airflow.datasets.manager.DatasetManager` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.datasets.manager.DatasetManager` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:42:6
|
||||
|
|
||||
41 | # airflow.datasets.manager
|
||||
42 | dm = DatasetManager()
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
43 | dm.register_dataset_change()
|
||||
44 | dm.create_datasets()
|
||||
|
|
||||
= help: Use `AssetManager` from `airflow.assets.manager` instead.
|
||||
help: Use `AssetManager` from `airflow.assets.manager` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
19 19 | from airflow.providers_manager import ProvidersManager
|
||||
|
|
@ -191,16 +200,17 @@ AIR301_class_attribute.py:42:6: AIR301 [*] `airflow.datasets.manager.DatasetMana
|
|||
44 45 | dm.create_datasets()
|
||||
45 46 | dm.notify_dataset_created()
|
||||
|
||||
AIR301_class_attribute.py:43:4: AIR301 [*] `register_dataset_change` is removed in Airflow 3.0
|
||||
AIR301 [*] `register_dataset_change` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:43:4
|
||||
|
|
||||
41 | # airflow.datasets.manager
|
||||
42 | dm = DatasetManager()
|
||||
43 | dm.register_dataset_change()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
44 | dm.create_datasets()
|
||||
45 | dm.notify_dataset_created()
|
||||
|
|
||||
= help: Use `register_asset_change` instead
|
||||
help: Use `register_asset_change` instead
|
||||
|
||||
ℹ Safe fix
|
||||
40 40 |
|
||||
|
|
@ -212,16 +222,17 @@ AIR301_class_attribute.py:43:4: AIR301 [*] `register_dataset_change` is removed
|
|||
45 45 | dm.notify_dataset_created()
|
||||
46 46 | dm.notify_dataset_changed()
|
||||
|
||||
AIR301_class_attribute.py:44:4: AIR301 [*] `create_datasets` is removed in Airflow 3.0
|
||||
AIR301 [*] `create_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:44:4
|
||||
|
|
||||
42 | dm = DatasetManager()
|
||||
43 | dm.register_dataset_change()
|
||||
44 | dm.create_datasets()
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^
|
||||
45 | dm.notify_dataset_created()
|
||||
46 | dm.notify_dataset_changed()
|
||||
|
|
||||
= help: Use `create_assets` instead
|
||||
help: Use `create_assets` instead
|
||||
|
||||
ℹ Safe fix
|
||||
41 41 | # airflow.datasets.manager
|
||||
|
|
@ -233,16 +244,17 @@ AIR301_class_attribute.py:44:4: AIR301 [*] `create_datasets` is removed in Airfl
|
|||
46 46 | dm.notify_dataset_changed()
|
||||
47 47 | dm.notify_dataset_alias_created()
|
||||
|
||||
AIR301_class_attribute.py:45:4: AIR301 [*] `notify_dataset_created` is removed in Airflow 3.0
|
||||
AIR301 [*] `notify_dataset_created` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:45:4
|
||||
|
|
||||
43 | dm.register_dataset_change()
|
||||
44 | dm.create_datasets()
|
||||
45 | dm.notify_dataset_created()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
46 | dm.notify_dataset_changed()
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
|
|
||||
= help: Use `notify_asset_created` instead
|
||||
help: Use `notify_asset_created` instead
|
||||
|
||||
ℹ Safe fix
|
||||
42 42 | dm = DatasetManager()
|
||||
|
|
@ -254,15 +266,16 @@ AIR301_class_attribute.py:45:4: AIR301 [*] `notify_dataset_created` is removed i
|
|||
47 47 | dm.notify_dataset_alias_created()
|
||||
48 48 |
|
||||
|
||||
AIR301_class_attribute.py:46:4: AIR301 [*] `notify_dataset_changed` is removed in Airflow 3.0
|
||||
AIR301 [*] `notify_dataset_changed` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:46:4
|
||||
|
|
||||
44 | dm.create_datasets()
|
||||
45 | dm.notify_dataset_created()
|
||||
46 | dm.notify_dataset_changed()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
|
|
||||
= help: Use `notify_asset_changed` instead
|
||||
help: Use `notify_asset_changed` instead
|
||||
|
||||
ℹ Safe fix
|
||||
43 43 | dm.register_dataset_change()
|
||||
|
|
@ -274,16 +287,17 @@ AIR301_class_attribute.py:46:4: AIR301 [*] `notify_dataset_changed` is removed i
|
|||
48 48 |
|
||||
49 49 | # airflow.lineage.hook
|
||||
|
||||
AIR301_class_attribute.py:47:4: AIR301 [*] `notify_dataset_alias_created` is removed in Airflow 3.0
|
||||
AIR301 [*] `notify_dataset_alias_created` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:47:4
|
||||
|
|
||||
45 | dm.notify_dataset_created()
|
||||
46 | dm.notify_dataset_changed()
|
||||
47 | dm.notify_dataset_alias_created()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
48 |
|
||||
49 | # airflow.lineage.hook
|
||||
|
|
||||
= help: Use `notify_asset_alias_created` instead
|
||||
help: Use `notify_asset_alias_created` instead
|
||||
|
||||
ℹ Safe fix
|
||||
44 44 | dm.create_datasets()
|
||||
|
|
@ -295,14 +309,15 @@ AIR301_class_attribute.py:47:4: AIR301 [*] `notify_dataset_alias_created` is rem
|
|||
49 49 | # airflow.lineage.hook
|
||||
50 50 | dl_info = DatasetLineageInfo()
|
||||
|
||||
AIR301_class_attribute.py:50:11: AIR301 [*] `airflow.lineage.hook.DatasetLineageInfo` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.lineage.hook.DatasetLineageInfo` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:50:11
|
||||
|
|
||||
49 | # airflow.lineage.hook
|
||||
50 | dl_info = DatasetLineageInfo()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
51 | dl_info.dataset
|
||||
|
|
||||
= help: Use `AssetLineageInfo` from `airflow.lineage.hook` instead.
|
||||
help: Use `AssetLineageInfo` from `airflow.lineage.hook` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
9 9 | DatasetAny,
|
||||
|
|
@ -323,16 +338,17 @@ AIR301_class_attribute.py:50:11: AIR301 [*] `airflow.lineage.hook.DatasetLineage
|
|||
52 52 |
|
||||
53 53 | hlc = HookLineageCollector()
|
||||
|
||||
AIR301_class_attribute.py:51:9: AIR301 [*] `dataset` is removed in Airflow 3.0
|
||||
AIR301 [*] `dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:51:9
|
||||
|
|
||||
49 | # airflow.lineage.hook
|
||||
50 | dl_info = DatasetLineageInfo()
|
||||
51 | dl_info.dataset
|
||||
| ^^^^^^^ AIR301
|
||||
| ^^^^^^^
|
||||
52 |
|
||||
53 | hlc = HookLineageCollector()
|
||||
|
|
||||
= help: Use `asset` instead
|
||||
help: Use `asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
48 48 |
|
||||
|
|
@ -344,15 +360,16 @@ AIR301_class_attribute.py:51:9: AIR301 [*] `dataset` is removed in Airflow 3.0
|
|||
53 53 | hlc = HookLineageCollector()
|
||||
54 54 | hlc.create_dataset()
|
||||
|
||||
AIR301_class_attribute.py:54:5: AIR301 [*] `create_dataset` is removed in Airflow 3.0
|
||||
AIR301 [*] `create_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:54:5
|
||||
|
|
||||
53 | hlc = HookLineageCollector()
|
||||
54 | hlc.create_dataset()
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
55 | hlc.add_input_dataset()
|
||||
56 | hlc.add_output_dataset()
|
||||
|
|
||||
= help: Use `create_asset` instead
|
||||
help: Use `create_asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
51 51 | dl_info.dataset
|
||||
|
|
@ -364,16 +381,17 @@ AIR301_class_attribute.py:54:5: AIR301 [*] `create_dataset` is removed in Airflo
|
|||
56 56 | hlc.add_output_dataset()
|
||||
57 57 | hlc.collected_datasets()
|
||||
|
||||
AIR301_class_attribute.py:55:5: AIR301 [*] `add_input_dataset` is removed in Airflow 3.0
|
||||
AIR301 [*] `add_input_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:55:5
|
||||
|
|
||||
53 | hlc = HookLineageCollector()
|
||||
54 | hlc.create_dataset()
|
||||
55 | hlc.add_input_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
56 | hlc.add_output_dataset()
|
||||
57 | hlc.collected_datasets()
|
||||
|
|
||||
= help: Use `add_input_asset` instead
|
||||
help: Use `add_input_asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
52 52 |
|
||||
|
|
@ -385,15 +403,16 @@ AIR301_class_attribute.py:55:5: AIR301 [*] `add_input_dataset` is removed in Air
|
|||
57 57 | hlc.collected_datasets()
|
||||
58 58 |
|
||||
|
||||
AIR301_class_attribute.py:56:5: AIR301 [*] `add_output_dataset` is removed in Airflow 3.0
|
||||
AIR301 [*] `add_output_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:56:5
|
||||
|
|
||||
54 | hlc.create_dataset()
|
||||
55 | hlc.add_input_dataset()
|
||||
56 | hlc.add_output_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
57 | hlc.collected_datasets()
|
||||
|
|
||||
= help: Use `add_output_asset` instead
|
||||
help: Use `add_output_asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
53 53 | hlc = HookLineageCollector()
|
||||
|
|
@ -405,16 +424,17 @@ AIR301_class_attribute.py:56:5: AIR301 [*] `add_output_dataset` is removed in Ai
|
|||
58 58 |
|
||||
59 59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
|
||||
AIR301_class_attribute.py:57:5: AIR301 [*] `collected_datasets` is removed in Airflow 3.0
|
||||
AIR301 [*] `collected_datasets` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:57:5
|
||||
|
|
||||
55 | hlc.add_input_dataset()
|
||||
56 | hlc.add_output_dataset()
|
||||
57 | hlc.collected_datasets()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
58 |
|
||||
59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
|
|
||||
= help: Use `collected_assets` instead
|
||||
help: Use `collected_assets` instead
|
||||
|
||||
ℹ Safe fix
|
||||
54 54 | hlc.create_dataset()
|
||||
|
|
@ -426,16 +446,17 @@ AIR301_class_attribute.py:57:5: AIR301 [*] `collected_datasets` is removed in Ai
|
|||
59 59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
60 60 | aam = AwsAuthManager()
|
||||
|
||||
AIR301_class_attribute.py:61:5: AIR301 [*] `is_authorized_dataset` is removed in Airflow 3.0
|
||||
AIR301 [*] `is_authorized_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:61:5
|
||||
|
|
||||
59 | # airflow.providers.amazon.auth_manager.aws_auth_manager
|
||||
60 | aam = AwsAuthManager()
|
||||
61 | aam.is_authorized_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
62 |
|
||||
63 | # airflow.providers.apache.beam.hooks
|
||||
|
|
||||
= help: Use `is_authorized_asset` instead
|
||||
help: Use `is_authorized_asset` instead
|
||||
|
||||
ℹ Safe fix
|
||||
58 58 |
|
||||
|
|
@ -447,15 +468,16 @@ AIR301_class_attribute.py:61:5: AIR301 [*] `is_authorized_dataset` is removed in
|
|||
63 63 | # airflow.providers.apache.beam.hooks
|
||||
64 64 | # check get_conn_uri is caught if the class inherits from an airflow hook
|
||||
|
||||
AIR301_class_attribute.py:73:13: AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:73:13
|
||||
|
|
||||
71 | # airflow.providers.google.cloud.secrets.secret_manager
|
||||
72 | csm_backend = CloudSecretManagerBackend()
|
||||
73 | csm_backend.get_conn_uri()
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^
|
||||
74 | csm_backend.get_connections()
|
||||
|
|
||||
= help: Use `get_conn_value` instead
|
||||
help: Use `get_conn_value` instead
|
||||
|
||||
ℹ Safe fix
|
||||
70 70 |
|
||||
|
|
@ -467,16 +489,17 @@ AIR301_class_attribute.py:73:13: AIR301 [*] `get_conn_uri` is removed in Airflow
|
|||
75 75 |
|
||||
76 76 | # airflow.providers.hashicorp.secrets.vault
|
||||
|
||||
AIR301_class_attribute.py:74:13: AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:74:13
|
||||
|
|
||||
72 | csm_backend = CloudSecretManagerBackend()
|
||||
73 | csm_backend.get_conn_uri()
|
||||
74 | csm_backend.get_connections()
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^
|
||||
75 |
|
||||
76 | # airflow.providers.hashicorp.secrets.vault
|
||||
|
|
||||
= help: Use `get_connection` instead
|
||||
help: Use `get_connection` instead
|
||||
|
||||
ℹ Safe fix
|
||||
71 71 | # airflow.providers.google.cloud.secrets.secret_manager
|
||||
|
|
@ -488,15 +511,16 @@ AIR301_class_attribute.py:74:13: AIR301 [*] `get_connections` is removed in Airf
|
|||
76 76 | # airflow.providers.hashicorp.secrets.vault
|
||||
77 77 | vault_backend = VaultBackend()
|
||||
|
||||
AIR301_class_attribute.py:78:15: AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:78:15
|
||||
|
|
||||
76 | # airflow.providers.hashicorp.secrets.vault
|
||||
77 | vault_backend = VaultBackend()
|
||||
78 | vault_backend.get_conn_uri()
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^
|
||||
79 | vault_backend.get_connections()
|
||||
|
|
||||
= help: Use `get_conn_value` instead
|
||||
help: Use `get_conn_value` instead
|
||||
|
||||
ℹ Safe fix
|
||||
75 75 |
|
||||
|
|
@ -508,16 +532,17 @@ AIR301_class_attribute.py:78:15: AIR301 [*] `get_conn_uri` is removed in Airflow
|
|||
80 80 |
|
||||
81 81 | not_an_error = NotAir302SecretError()
|
||||
|
||||
AIR301_class_attribute.py:79:15: AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:79:15
|
||||
|
|
||||
77 | vault_backend = VaultBackend()
|
||||
78 | vault_backend.get_conn_uri()
|
||||
79 | vault_backend.get_connections()
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^
|
||||
80 |
|
||||
81 | not_an_error = NotAir302SecretError()
|
||||
|
|
||||
= help: Use `get_connection` instead
|
||||
help: Use `get_connection` instead
|
||||
|
||||
ℹ Safe fix
|
||||
76 76 | # airflow.providers.hashicorp.secrets.vault
|
||||
|
|
@ -529,16 +554,17 @@ AIR301_class_attribute.py:79:15: AIR301 [*] `get_connections` is removed in Airf
|
|||
81 81 | not_an_error = NotAir302SecretError()
|
||||
82 82 | not_an_error.get_conn_uri()
|
||||
|
||||
AIR301_class_attribute.py:86:4: AIR301 [*] `initialize_providers_dataset_uri_resources` is removed in Airflow 3.0
|
||||
AIR301 [*] `initialize_providers_dataset_uri_resources` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:86:4
|
||||
|
|
||||
84 | # airflow.providers_manager
|
||||
85 | pm = ProvidersManager()
|
||||
86 | pm.initialize_providers_dataset_uri_resources()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
87 | pm.dataset_factories
|
||||
88 | pm.dataset_uri_handlers
|
||||
|
|
||||
= help: Use `initialize_providers_asset_uri_resources` instead
|
||||
help: Use `initialize_providers_asset_uri_resources` instead
|
||||
|
||||
ℹ Safe fix
|
||||
83 83 |
|
||||
|
|
@ -550,16 +576,17 @@ AIR301_class_attribute.py:86:4: AIR301 [*] `initialize_providers_dataset_uri_res
|
|||
88 88 | pm.dataset_uri_handlers
|
||||
89 89 | pm.dataset_to_openlineage_converters
|
||||
|
||||
AIR301_class_attribute.py:87:4: AIR301 [*] `dataset_factories` is removed in Airflow 3.0
|
||||
AIR301 [*] `dataset_factories` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:87:4
|
||||
|
|
||||
85 | pm = ProvidersManager()
|
||||
86 | pm.initialize_providers_dataset_uri_resources()
|
||||
87 | pm.dataset_factories
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
88 | pm.dataset_uri_handlers
|
||||
89 | pm.dataset_to_openlineage_converters
|
||||
|
|
||||
= help: Use `asset_factories` instead
|
||||
help: Use `asset_factories` instead
|
||||
|
||||
ℹ Safe fix
|
||||
84 84 | # airflow.providers_manager
|
||||
|
|
@ -571,15 +598,16 @@ AIR301_class_attribute.py:87:4: AIR301 [*] `dataset_factories` is removed in Air
|
|||
89 89 | pm.dataset_to_openlineage_converters
|
||||
90 90 |
|
||||
|
||||
AIR301_class_attribute.py:88:4: AIR301 [*] `dataset_uri_handlers` is removed in Airflow 3.0
|
||||
AIR301 [*] `dataset_uri_handlers` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:88:4
|
||||
|
|
||||
86 | pm.initialize_providers_dataset_uri_resources()
|
||||
87 | pm.dataset_factories
|
||||
88 | pm.dataset_uri_handlers
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
89 | pm.dataset_to_openlineage_converters
|
||||
|
|
||||
= help: Use `asset_uri_handlers` instead
|
||||
help: Use `asset_uri_handlers` instead
|
||||
|
||||
ℹ Safe fix
|
||||
85 85 | pm = ProvidersManager()
|
||||
|
|
@ -591,16 +619,17 @@ AIR301_class_attribute.py:88:4: AIR301 [*] `dataset_uri_handlers` is removed in
|
|||
90 90 |
|
||||
91 91 | # airflow.secrets.base_secrets
|
||||
|
||||
AIR301_class_attribute.py:89:4: AIR301 [*] `dataset_to_openlineage_converters` is removed in Airflow 3.0
|
||||
AIR301 [*] `dataset_to_openlineage_converters` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:89:4
|
||||
|
|
||||
87 | pm.dataset_factories
|
||||
88 | pm.dataset_uri_handlers
|
||||
89 | pm.dataset_to_openlineage_converters
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
90 |
|
||||
91 | # airflow.secrets.base_secrets
|
||||
|
|
||||
= help: Use `asset_to_openlineage_converters` instead
|
||||
help: Use `asset_to_openlineage_converters` instead
|
||||
|
||||
ℹ Safe fix
|
||||
86 86 | pm.initialize_providers_dataset_uri_resources()
|
||||
|
|
@ -612,15 +641,16 @@ AIR301_class_attribute.py:89:4: AIR301 [*] `dataset_to_openlineage_converters` i
|
|||
91 91 | # airflow.secrets.base_secrets
|
||||
92 92 | base_secret_backend = BaseSecretsBackend()
|
||||
|
||||
AIR301_class_attribute.py:93:21: AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
AIR301 [*] `get_conn_uri` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:93:21
|
||||
|
|
||||
91 | # airflow.secrets.base_secrets
|
||||
92 | base_secret_backend = BaseSecretsBackend()
|
||||
93 | base_secret_backend.get_conn_uri()
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^
|
||||
94 | base_secret_backend.get_connections()
|
||||
|
|
||||
= help: Use `get_conn_value` instead
|
||||
help: Use `get_conn_value` instead
|
||||
|
||||
ℹ Safe fix
|
||||
90 90 |
|
||||
|
|
@ -632,16 +662,17 @@ AIR301_class_attribute.py:93:21: AIR301 [*] `get_conn_uri` is removed in Airflow
|
|||
95 95 |
|
||||
96 96 | # airflow.secrets.local_filesystem
|
||||
|
||||
AIR301_class_attribute.py:94:21: AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:94:21
|
||||
|
|
||||
92 | base_secret_backend = BaseSecretsBackend()
|
||||
93 | base_secret_backend.get_conn_uri()
|
||||
94 | base_secret_backend.get_connections()
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^
|
||||
95 |
|
||||
96 | # airflow.secrets.local_filesystem
|
||||
|
|
||||
= help: Use `get_connection` instead
|
||||
help: Use `get_connection` instead
|
||||
|
||||
ℹ Safe fix
|
||||
91 91 | # airflow.secrets.base_secrets
|
||||
|
|
@ -653,14 +684,15 @@ AIR301_class_attribute.py:94:21: AIR301 [*] `get_connections` is removed in Airf
|
|||
96 96 | # airflow.secrets.local_filesystem
|
||||
97 97 | lfb = LocalFilesystemBackend()
|
||||
|
||||
AIR301_class_attribute.py:98:5: AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
AIR301 [*] `get_connections` is removed in Airflow 3.0
|
||||
--> AIR301_class_attribute.py:98:5
|
||||
|
|
||||
96 | # airflow.secrets.local_filesystem
|
||||
97 | lfb = LocalFilesystemBackend()
|
||||
98 | lfb.get_connections()
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Use `get_connection` instead
|
||||
help: Use `get_connection` instead
|
||||
|
||||
ℹ Safe fix
|
||||
95 95 |
|
||||
|
|
|
|||
|
|
@ -1,310 +1,342 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR301_context.py:22:41: AIR301 `conf` is removed in Airflow 3.0
|
||||
AIR301 `conf` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:22:41
|
||||
|
|
||||
20 | @task
|
||||
21 | def access_invalid_key_task_out_of_dag(**context):
|
||||
22 | print("access invalid key", context["conf"])
|
||||
| ^^^^^^ AIR301
|
||||
| ^^^^^^
|
||||
23 | print("access invalid key", context.get("conf"))
|
||||
|
|
||||
|
||||
AIR301_context.py:23:45: AIR301 `conf` is removed in Airflow 3.0
|
||||
AIR301 `conf` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:23:45
|
||||
|
|
||||
21 | def access_invalid_key_task_out_of_dag(**context):
|
||||
22 | print("access invalid key", context["conf"])
|
||||
23 | print("access invalid key", context.get("conf"))
|
||||
| ^^^^^^ AIR301
|
||||
| ^^^^^^
|
||||
|
|
||||
|
||||
AIR301_context.py:28:5: AIR301 `execution_date` is removed in Airflow 3.0
|
||||
AIR301 `execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:28:5
|
||||
|
|
||||
26 | @task
|
||||
27 | def access_invalid_argument_task_out_of_dag(
|
||||
28 | execution_date, tomorrow_ds, logical_date, **context
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
29 | ):
|
||||
30 | print("execution date", execution_date)
|
||||
|
|
||||
|
||||
AIR301_context.py:28:21: AIR301 `tomorrow_ds` is removed in Airflow 3.0
|
||||
AIR301 `tomorrow_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:28:21
|
||||
|
|
||||
26 | @task
|
||||
27 | def access_invalid_argument_task_out_of_dag(
|
||||
28 | execution_date, tomorrow_ds, logical_date, **context
|
||||
| ^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^
|
||||
29 | ):
|
||||
30 | print("execution date", execution_date)
|
||||
|
|
||||
|
||||
AIR301_context.py:31:45: AIR301 `conf` is removed in Airflow 3.0
|
||||
AIR301 `conf` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:31:45
|
||||
|
|
||||
29 | ):
|
||||
30 | print("execution date", execution_date)
|
||||
31 | print("access invalid key", context.get("conf"))
|
||||
| ^^^^^^ AIR301
|
||||
| ^^^^^^
|
||||
|
|
||||
|
||||
AIR301_context.py:40:30: AIR301 `execution_date` is removed in Airflow 3.0
|
||||
AIR301 `execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:40:30
|
||||
|
|
||||
39 | # Removed usage - should trigger violations
|
||||
40 | execution_date = context["execution_date"]
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
41 | next_ds = context["next_ds"]
|
||||
42 | next_ds_nodash = context["next_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR301_context.py:41:23: AIR301 `next_ds` is removed in Airflow 3.0
|
||||
AIR301 `next_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:41:23
|
||||
|
|
||||
39 | # Removed usage - should trigger violations
|
||||
40 | execution_date = context["execution_date"]
|
||||
41 | next_ds = context["next_ds"]
|
||||
| ^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^
|
||||
42 | next_ds_nodash = context["next_ds_nodash"]
|
||||
43 | next_execution_date = context["next_execution_date"]
|
||||
|
|
||||
|
||||
AIR301_context.py:42:30: AIR301 `next_ds_nodash` is removed in Airflow 3.0
|
||||
AIR301 `next_ds_nodash` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:42:30
|
||||
|
|
||||
40 | execution_date = context["execution_date"]
|
||||
41 | next_ds = context["next_ds"]
|
||||
42 | next_ds_nodash = context["next_ds_nodash"]
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
43 | next_execution_date = context["next_execution_date"]
|
||||
44 | prev_ds = context["prev_ds"]
|
||||
|
|
||||
|
||||
AIR301_context.py:43:35: AIR301 `next_execution_date` is removed in Airflow 3.0
|
||||
AIR301 `next_execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:43:35
|
||||
|
|
||||
41 | next_ds = context["next_ds"]
|
||||
42 | next_ds_nodash = context["next_ds_nodash"]
|
||||
43 | next_execution_date = context["next_execution_date"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
44 | prev_ds = context["prev_ds"]
|
||||
45 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR301_context.py:44:23: AIR301 `prev_ds` is removed in Airflow 3.0
|
||||
AIR301 `prev_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:44:23
|
||||
|
|
||||
42 | next_ds_nodash = context["next_ds_nodash"]
|
||||
43 | next_execution_date = context["next_execution_date"]
|
||||
44 | prev_ds = context["prev_ds"]
|
||||
| ^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^
|
||||
45 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
46 | prev_execution_date = context["prev_execution_date"]
|
||||
|
|
||||
|
||||
AIR301_context.py:45:30: AIR301 `prev_ds_nodash` is removed in Airflow 3.0
|
||||
AIR301 `prev_ds_nodash` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:45:30
|
||||
|
|
||||
43 | next_execution_date = context["next_execution_date"]
|
||||
44 | prev_ds = context["prev_ds"]
|
||||
45 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
46 | prev_execution_date = context["prev_execution_date"]
|
||||
47 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
|
|
||||
|
||||
AIR301_context.py:46:35: AIR301 `prev_execution_date` is removed in Airflow 3.0
|
||||
AIR301 `prev_execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:46:35
|
||||
|
|
||||
44 | prev_ds = context["prev_ds"]
|
||||
45 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
46 | prev_execution_date = context["prev_execution_date"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
47 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
48 | tomorrow_ds = context["tomorrow_ds"]
|
||||
|
|
||||
|
||||
AIR301_context.py:47:43: AIR301 `prev_execution_date_success` is removed in Airflow 3.0
|
||||
AIR301 `prev_execution_date_success` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:47:43
|
||||
|
|
||||
45 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
46 | prev_execution_date = context["prev_execution_date"]
|
||||
47 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
48 | tomorrow_ds = context["tomorrow_ds"]
|
||||
49 | yesterday_ds = context["yesterday_ds"]
|
||||
|
|
||||
|
||||
AIR301_context.py:48:27: AIR301 `tomorrow_ds` is removed in Airflow 3.0
|
||||
AIR301 `tomorrow_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:48:27
|
||||
|
|
||||
46 | prev_execution_date = context["prev_execution_date"]
|
||||
47 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
48 | tomorrow_ds = context["tomorrow_ds"]
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^
|
||||
49 | yesterday_ds = context["yesterday_ds"]
|
||||
50 | yesterday_ds_nodash = context["yesterday_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR301_context.py:49:28: AIR301 `yesterday_ds` is removed in Airflow 3.0
|
||||
AIR301 `yesterday_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:49:28
|
||||
|
|
||||
47 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
48 | tomorrow_ds = context["tomorrow_ds"]
|
||||
49 | yesterday_ds = context["yesterday_ds"]
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
50 | yesterday_ds_nodash = context["yesterday_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR301_context.py:50:35: AIR301 `yesterday_ds_nodash` is removed in Airflow 3.0
|
||||
AIR301 `yesterday_ds_nodash` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:50:35
|
||||
|
|
||||
48 | tomorrow_ds = context["tomorrow_ds"]
|
||||
49 | yesterday_ds = context["yesterday_ds"]
|
||||
50 | yesterday_ds_nodash = context["yesterday_ds_nodash"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
AIR301_context.py:56:30: AIR301 `execution_date` is removed in Airflow 3.0
|
||||
AIR301 `execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:56:30
|
||||
|
|
||||
54 | def print_config_with_get_current_context():
|
||||
55 | context = get_current_context()
|
||||
56 | execution_date = context["execution_date"]
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
57 | next_ds = context["next_ds"]
|
||||
58 | next_ds_nodash = context["next_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR301_context.py:57:23: AIR301 `next_ds` is removed in Airflow 3.0
|
||||
AIR301 `next_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:57:23
|
||||
|
|
||||
55 | context = get_current_context()
|
||||
56 | execution_date = context["execution_date"]
|
||||
57 | next_ds = context["next_ds"]
|
||||
| ^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^
|
||||
58 | next_ds_nodash = context["next_ds_nodash"]
|
||||
59 | next_execution_date = context["next_execution_date"]
|
||||
|
|
||||
|
||||
AIR301_context.py:58:30: AIR301 `next_ds_nodash` is removed in Airflow 3.0
|
||||
AIR301 `next_ds_nodash` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:58:30
|
||||
|
|
||||
56 | execution_date = context["execution_date"]
|
||||
57 | next_ds = context["next_ds"]
|
||||
58 | next_ds_nodash = context["next_ds_nodash"]
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
59 | next_execution_date = context["next_execution_date"]
|
||||
60 | prev_ds = context["prev_ds"]
|
||||
|
|
||||
|
||||
AIR301_context.py:59:35: AIR301 `next_execution_date` is removed in Airflow 3.0
|
||||
AIR301 `next_execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:59:35
|
||||
|
|
||||
57 | next_ds = context["next_ds"]
|
||||
58 | next_ds_nodash = context["next_ds_nodash"]
|
||||
59 | next_execution_date = context["next_execution_date"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
60 | prev_ds = context["prev_ds"]
|
||||
61 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR301_context.py:60:23: AIR301 `prev_ds` is removed in Airflow 3.0
|
||||
AIR301 `prev_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:60:23
|
||||
|
|
||||
58 | next_ds_nodash = context["next_ds_nodash"]
|
||||
59 | next_execution_date = context["next_execution_date"]
|
||||
60 | prev_ds = context["prev_ds"]
|
||||
| ^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^
|
||||
61 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
62 | prev_execution_date = context["prev_execution_date"]
|
||||
|
|
||||
|
||||
AIR301_context.py:61:30: AIR301 `prev_ds_nodash` is removed in Airflow 3.0
|
||||
AIR301 `prev_ds_nodash` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:61:30
|
||||
|
|
||||
59 | next_execution_date = context["next_execution_date"]
|
||||
60 | prev_ds = context["prev_ds"]
|
||||
61 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
62 | prev_execution_date = context["prev_execution_date"]
|
||||
63 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
|
|
||||
|
||||
AIR301_context.py:62:35: AIR301 `prev_execution_date` is removed in Airflow 3.0
|
||||
AIR301 `prev_execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:62:35
|
||||
|
|
||||
60 | prev_ds = context["prev_ds"]
|
||||
61 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
62 | prev_execution_date = context["prev_execution_date"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
63 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
64 | tomorrow_ds = context["tomorrow_ds"]
|
||||
|
|
||||
|
||||
AIR301_context.py:63:43: AIR301 `prev_execution_date_success` is removed in Airflow 3.0
|
||||
AIR301 `prev_execution_date_success` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:63:43
|
||||
|
|
||||
61 | prev_ds_nodash = context["prev_ds_nodash"]
|
||||
62 | prev_execution_date = context["prev_execution_date"]
|
||||
63 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
64 | tomorrow_ds = context["tomorrow_ds"]
|
||||
65 | yesterday_ds = context["yesterday_ds"]
|
||||
|
|
||||
|
||||
AIR301_context.py:64:27: AIR301 `tomorrow_ds` is removed in Airflow 3.0
|
||||
AIR301 `tomorrow_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:64:27
|
||||
|
|
||||
62 | prev_execution_date = context["prev_execution_date"]
|
||||
63 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
64 | tomorrow_ds = context["tomorrow_ds"]
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^
|
||||
65 | yesterday_ds = context["yesterday_ds"]
|
||||
66 | yesterday_ds_nodash = context["yesterday_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR301_context.py:65:28: AIR301 `yesterday_ds` is removed in Airflow 3.0
|
||||
AIR301 `yesterday_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:65:28
|
||||
|
|
||||
63 | prev_execution_date_success = context["prev_execution_date_success"]
|
||||
64 | tomorrow_ds = context["tomorrow_ds"]
|
||||
65 | yesterday_ds = context["yesterday_ds"]
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
66 | yesterday_ds_nodash = context["yesterday_ds_nodash"]
|
||||
|
|
||||
|
||||
AIR301_context.py:66:35: AIR301 `yesterday_ds_nodash` is removed in Airflow 3.0
|
||||
AIR301 `yesterday_ds_nodash` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:66:35
|
||||
|
|
||||
64 | tomorrow_ds = context["tomorrow_ds"]
|
||||
65 | yesterday_ds = context["yesterday_ds"]
|
||||
66 | yesterday_ds_nodash = context["yesterday_ds_nodash"]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
AIR301_context.py:73:22: AIR301 `tomorrow_ds` is removed in Airflow 3.0
|
||||
AIR301 `tomorrow_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:73:22
|
||||
|
|
||||
71 | """Print the Airflow context and ds variable from the context."""
|
||||
72 | print(ds)
|
||||
73 | print(kwargs.get("tomorrow_ds"))
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^
|
||||
74 | c = get_current_context()
|
||||
75 | c.get("execution_date")
|
||||
|
|
||||
|
||||
AIR301_context.py:75:11: AIR301 `execution_date` is removed in Airflow 3.0
|
||||
AIR301 `execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:75:11
|
||||
|
|
||||
73 | print(kwargs.get("tomorrow_ds"))
|
||||
74 | c = get_current_context()
|
||||
75 | c.get("execution_date")
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
AIR301_context.py:87:49: AIR301 `conf` is removed in Airflow 3.0
|
||||
AIR301 `conf` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:87:49
|
||||
|
|
||||
85 | @task()
|
||||
86 | def access_invalid_key_task(**context):
|
||||
87 | print("access invalid key", context.get("conf"))
|
||||
| ^^^^^^ AIR301
|
||||
| ^^^^^^
|
||||
88 |
|
||||
89 | @task()
|
||||
|
|
||||
|
||||
AIR301_context.py:90:42: AIR301 `execution_date` is removed in Airflow 3.0
|
||||
AIR301 `execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:90:42
|
||||
|
|
||||
89 | @task()
|
||||
90 | def access_invalid_key_explicit_task(execution_date):
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
91 | print(execution_date)
|
||||
|
|
||||
|
||||
AIR301_context.py:111:5: AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
AIR301 [*] `schedule_interval` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:111:5
|
||||
|
|
||||
109 | with DAG(
|
||||
110 | dag_id="example_dag",
|
||||
111 | schedule_interval="@daily",
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
112 | start_date=datetime(2023, 1, 1),
|
||||
113 | template_searchpath=["/templates"],
|
||||
|
|
||||
= help: Use `schedule` instead
|
||||
help: Use `schedule` instead
|
||||
|
||||
ℹ Safe fix
|
||||
108 108 |
|
||||
|
|
@ -316,11 +348,12 @@ AIR301_context.py:111:5: AIR301 [*] `schedule_interval` is removed in Airflow 3.
|
|||
113 113 | template_searchpath=["/templates"],
|
||||
114 114 | ) as dag:
|
||||
|
||||
AIR301_context.py:135:23: AIR301 `next_ds` is removed in Airflow 3.0
|
||||
AIR301 `next_ds` is removed in Airflow 3.0
|
||||
--> AIR301_context.py:135:23
|
||||
|
|
||||
134 | class CustomOperator(BaseOperator):
|
||||
135 | def execute(self, next_ds, context):
|
||||
| ^^^^^^^ AIR301
|
||||
| ^^^^^^^
|
||||
136 | execution_date = context["execution_date"]
|
||||
137 | next_ds = context["next_ds"]
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,294 +1,326 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR301_names.py:38:1: AIR301 `airflow.PY36` is removed in Airflow 3.0
|
||||
AIR301 `airflow.PY36` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:38:1
|
||||
|
|
||||
37 | # airflow root
|
||||
38 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^ AIR301
|
||||
| ^^^^
|
||||
39 |
|
||||
40 | # airflow.api_connexion.security
|
||||
|
|
||||
= help: Use `sys.version_info` instead
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301_names.py:38:7: AIR301 `airflow.PY37` is removed in Airflow 3.0
|
||||
AIR301 `airflow.PY37` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:38:7
|
||||
|
|
||||
37 | # airflow root
|
||||
38 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^ AIR301
|
||||
| ^^^^
|
||||
39 |
|
||||
40 | # airflow.api_connexion.security
|
||||
|
|
||||
= help: Use `sys.version_info` instead
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301_names.py:38:13: AIR301 `airflow.PY38` is removed in Airflow 3.0
|
||||
AIR301 `airflow.PY38` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:38:13
|
||||
|
|
||||
37 | # airflow root
|
||||
38 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^ AIR301
|
||||
| ^^^^
|
||||
39 |
|
||||
40 | # airflow.api_connexion.security
|
||||
|
|
||||
= help: Use `sys.version_info` instead
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301_names.py:38:19: AIR301 `airflow.PY39` is removed in Airflow 3.0
|
||||
AIR301 `airflow.PY39` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:38:19
|
||||
|
|
||||
37 | # airflow root
|
||||
38 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^ AIR301
|
||||
| ^^^^
|
||||
39 |
|
||||
40 | # airflow.api_connexion.security
|
||||
|
|
||||
= help: Use `sys.version_info` instead
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301_names.py:38:25: AIR301 `airflow.PY310` is removed in Airflow 3.0
|
||||
AIR301 `airflow.PY310` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:38:25
|
||||
|
|
||||
37 | # airflow root
|
||||
38 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^^ AIR301
|
||||
| ^^^^^
|
||||
39 |
|
||||
40 | # airflow.api_connexion.security
|
||||
|
|
||||
= help: Use `sys.version_info` instead
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301_names.py:38:32: AIR301 `airflow.PY311` is removed in Airflow 3.0
|
||||
AIR301 `airflow.PY311` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:38:32
|
||||
|
|
||||
37 | # airflow root
|
||||
38 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^^ AIR301
|
||||
| ^^^^^
|
||||
39 |
|
||||
40 | # airflow.api_connexion.security
|
||||
|
|
||||
= help: Use `sys.version_info` instead
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301_names.py:38:39: AIR301 `airflow.PY312` is removed in Airflow 3.0
|
||||
AIR301 `airflow.PY312` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:38:39
|
||||
|
|
||||
37 | # airflow root
|
||||
38 | PY36, PY37, PY38, PY39, PY310, PY311, PY312
|
||||
| ^^^^^ AIR301
|
||||
| ^^^^^
|
||||
39 |
|
||||
40 | # airflow.api_connexion.security
|
||||
|
|
||||
= help: Use `sys.version_info` instead
|
||||
help: Use `sys.version_info` instead
|
||||
|
||||
AIR301_names.py:41:1: AIR301 `airflow.api_connexion.security.requires_access` is removed in Airflow 3.0
|
||||
AIR301 `airflow.api_connexion.security.requires_access` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:41:1
|
||||
|
|
||||
40 | # airflow.api_connexion.security
|
||||
41 | requires_access
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^
|
||||
42 |
|
||||
43 | # airflow.contrib.*
|
||||
|
|
||||
= help: Use `airflow.api_fastapi.core_api.security.requires_access_*` instead
|
||||
help: Use `airflow.api_fastapi.core_api.security.requires_access_*` instead
|
||||
|
||||
AIR301_names.py:44:1: AIR301 `airflow.contrib.aws_athena_hook.AWSAthenaHook` is removed in Airflow 3.0
|
||||
AIR301 `airflow.contrib.aws_athena_hook.AWSAthenaHook` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:44:1
|
||||
|
|
||||
43 | # airflow.contrib.*
|
||||
44 | AWSAthenaHook()
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: The whole `airflow.contrib` module has been removed.
|
||||
help: The whole `airflow.contrib` module has been removed.
|
||||
|
||||
AIR301_names.py:48:1: AIR301 `airflow.datasets.DatasetAliasEvent` is removed in Airflow 3.0
|
||||
AIR301 `airflow.datasets.DatasetAliasEvent` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:48:1
|
||||
|
|
||||
47 | # airflow.datasets
|
||||
48 | DatasetAliasEvent()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
AIR301_names.py:52:1: AIR301 `airflow.operators.subdag.SubDagOperator` is removed in Airflow 3.0
|
||||
AIR301 `airflow.operators.subdag.SubDagOperator` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:52:1
|
||||
|
|
||||
51 | # airflow.operators.subdag.*
|
||||
52 | SubDagOperator()
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: The whole `airflow.subdag` module has been removed.
|
||||
help: The whole `airflow.subdag` module has been removed.
|
||||
|
||||
AIR301_names.py:61:1: AIR301 `airflow.triggers.external_task.TaskStateTrigger` is removed in Airflow 3.0
|
||||
AIR301 `airflow.triggers.external_task.TaskStateTrigger` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:61:1
|
||||
|
|
||||
60 | # airflow.triggers.external_task
|
||||
61 | TaskStateTrigger()
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
62 |
|
||||
63 | # airflow.utils.date
|
||||
|
|
||||
|
||||
AIR301_names.py:64:1: AIR301 `airflow.utils.dates.date_range` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.dates.date_range` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:64:1
|
||||
|
|
||||
63 | # airflow.utils.date
|
||||
64 | dates.date_range
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
65 | dates.days_ago
|
||||
|
|
||||
|
||||
AIR301_names.py:65:1: AIR301 `airflow.utils.dates.days_ago` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.dates.days_ago` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:65:1
|
||||
|
|
||||
63 | # airflow.utils.date
|
||||
64 | dates.date_range
|
||||
65 | dates.days_ago
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
66 |
|
||||
67 | date_range
|
||||
|
|
||||
= help: Use `pendulum.today('UTC').add(days=-N, ...)` instead
|
||||
help: Use `pendulum.today('UTC').add(days=-N, ...)` instead
|
||||
|
||||
AIR301_names.py:67:1: AIR301 `airflow.utils.dates.date_range` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.dates.date_range` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:67:1
|
||||
|
|
||||
65 | dates.days_ago
|
||||
66 |
|
||||
67 | date_range
|
||||
| ^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^
|
||||
68 | days_ago
|
||||
69 | infer_time_unit
|
||||
|
|
||||
|
||||
AIR301_names.py:68:1: AIR301 `airflow.utils.dates.days_ago` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.dates.days_ago` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:68:1
|
||||
|
|
||||
67 | date_range
|
||||
68 | days_ago
|
||||
| ^^^^^^^^ AIR301
|
||||
| ^^^^^^^^
|
||||
69 | infer_time_unit
|
||||
70 | parse_execution_date
|
||||
|
|
||||
= help: Use `pendulum.today('UTC').add(days=-N, ...)` instead
|
||||
help: Use `pendulum.today('UTC').add(days=-N, ...)` instead
|
||||
|
||||
AIR301_names.py:69:1: AIR301 `airflow.utils.dates.infer_time_unit` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.dates.infer_time_unit` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:69:1
|
||||
|
|
||||
67 | date_range
|
||||
68 | days_ago
|
||||
69 | infer_time_unit
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^
|
||||
70 | parse_execution_date
|
||||
71 | round_time
|
||||
|
|
||||
|
||||
AIR301_names.py:70:1: AIR301 `airflow.utils.dates.parse_execution_date` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.dates.parse_execution_date` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:70:1
|
||||
|
|
||||
68 | days_ago
|
||||
69 | infer_time_unit
|
||||
70 | parse_execution_date
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
71 | round_time
|
||||
72 | scale_time_units
|
||||
|
|
||||
|
||||
AIR301_names.py:71:1: AIR301 `airflow.utils.dates.round_time` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.dates.round_time` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:71:1
|
||||
|
|
||||
69 | infer_time_unit
|
||||
70 | parse_execution_date
|
||||
71 | round_time
|
||||
| ^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^
|
||||
72 | scale_time_units
|
||||
|
|
||||
|
||||
AIR301_names.py:72:1: AIR301 `airflow.utils.dates.scale_time_units` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.dates.scale_time_units` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:72:1
|
||||
|
|
||||
70 | parse_execution_date
|
||||
71 | round_time
|
||||
72 | scale_time_units
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
73 |
|
||||
74 | # This one was not deprecated.
|
||||
|
|
||||
|
||||
AIR301_names.py:79:1: AIR301 `airflow.utils.dag_cycle_tester.test_cycle` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.dag_cycle_tester.test_cycle` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:79:1
|
||||
|
|
||||
78 | # airflow.utils.dag_cycle_tester
|
||||
79 | test_cycle
|
||||
| ^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
|
||||
AIR301_names.py:83:1: AIR301 `airflow.utils.db.create_session` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.db.create_session` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:83:1
|
||||
|
|
||||
82 | # airflow.utils.db
|
||||
83 | create_session
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
84 |
|
||||
85 | # airflow.utils.decorators
|
||||
|
|
||||
|
||||
AIR301_names.py:86:1: AIR301 `airflow.utils.decorators.apply_defaults` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.decorators.apply_defaults` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:86:1
|
||||
|
|
||||
85 | # airflow.utils.decorators
|
||||
86 | apply_defaults
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
87 |
|
||||
88 | # airflow.utils.file
|
||||
|
|
||||
= help: `apply_defaults` is now unconditionally done and can be safely removed.
|
||||
help: `apply_defaults` is now unconditionally done and can be safely removed.
|
||||
|
||||
AIR301_names.py:89:1: AIR301 `airflow.utils.file.mkdirs` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.file.mkdirs` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:89:1
|
||||
|
|
||||
88 | # airflow.utils.file
|
||||
89 | mkdirs
|
||||
| ^^^^^^ AIR301
|
||||
| ^^^^^^
|
||||
|
|
||||
= help: Use `pathlib.Path({path}).mkdir` instead
|
||||
help: Use `pathlib.Path({path}).mkdir` instead
|
||||
|
||||
AIR301_names.py:93:1: AIR301 `airflow.utils.state.SHUTDOWN` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.state.SHUTDOWN` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:93:1
|
||||
|
|
||||
92 | # airflow.utils.state
|
||||
93 | SHUTDOWN
|
||||
| ^^^^^^^^ AIR301
|
||||
| ^^^^^^^^
|
||||
94 | terminating_states
|
||||
|
|
||||
|
||||
AIR301_names.py:94:1: AIR301 `airflow.utils.state.terminating_states` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.state.terminating_states` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:94:1
|
||||
|
|
||||
92 | # airflow.utils.state
|
||||
93 | SHUTDOWN
|
||||
94 | terminating_states
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
95 |
|
||||
96 | # airflow.utils.trigger_rule
|
||||
|
|
||||
|
||||
AIR301_names.py:97:1: AIR301 `airflow.utils.trigger_rule.TriggerRule.DUMMY` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.trigger_rule.TriggerRule.DUMMY` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:97:1
|
||||
|
|
||||
96 | # airflow.utils.trigger_rule
|
||||
97 | TriggerRule.DUMMY
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
98 | TriggerRule.NONE_FAILED_OR_SKIPPED
|
||||
|
|
||||
|
||||
AIR301_names.py:98:1: AIR301 `airflow.utils.trigger_rule.TriggerRule.NONE_FAILED_OR_SKIPPED` is removed in Airflow 3.0
|
||||
AIR301 `airflow.utils.trigger_rule.TriggerRule.NONE_FAILED_OR_SKIPPED` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:98:1
|
||||
|
|
||||
96 | # airflow.utils.trigger_rule
|
||||
97 | TriggerRule.DUMMY
|
||||
98 | TriggerRule.NONE_FAILED_OR_SKIPPED
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
AIR301_names.py:102:1: AIR301 `airflow.www.auth.has_access` is removed in Airflow 3.0
|
||||
AIR301 `airflow.www.auth.has_access` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:102:1
|
||||
|
|
||||
101 | # airflow.www.auth
|
||||
102 | has_access
|
||||
| ^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^
|
||||
103 | has_access_dataset
|
||||
|
|
||||
|
||||
AIR301_names.py:103:1: AIR301 `airflow.www.auth.has_access_dataset` is removed in Airflow 3.0
|
||||
AIR301 `airflow.www.auth.has_access_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:103:1
|
||||
|
|
||||
101 | # airflow.www.auth
|
||||
102 | has_access
|
||||
103 | has_access_dataset
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
104 |
|
||||
105 | # airflow.www.utils
|
||||
|
|
||||
|
||||
AIR301_names.py:106:1: AIR301 `airflow.www.utils.get_sensitive_variables_fields` is removed in Airflow 3.0
|
||||
AIR301 `airflow.www.utils.get_sensitive_variables_fields` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:106:1
|
||||
|
|
||||
105 | # airflow.www.utils
|
||||
106 | get_sensitive_variables_fields
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
107 | should_hide_value_for_key
|
||||
|
|
||||
|
||||
AIR301_names.py:107:1: AIR301 `airflow.www.utils.should_hide_value_for_key` is removed in Airflow 3.0
|
||||
AIR301 `airflow.www.utils.should_hide_value_for_key` is removed in Airflow 3.0
|
||||
--> AIR301_names.py:107:1
|
||||
|
|
||||
105 | # airflow.www.utils
|
||||
106 | get_sensitive_variables_fields
|
||||
107 | should_hide_value_for_key
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR301_names_fix.py:17:1: AIR301 [*] `airflow.api_connexion.security.requires_access_dataset` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.api_connexion.security.requires_access_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:17:1
|
||||
|
|
||||
15 | from airflow.security.permissions import RESOURCE_DATASET
|
||||
16 |
|
||||
17 | requires_access_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
18 |
|
||||
19 | DatasetDetails()
|
||||
|
|
||||
= help: Use `requires_access_asset` from `airflow.api_fastapi.core_api.security` instead.
|
||||
help: Use `requires_access_asset` from `airflow.api_fastapi.core_api.security` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
13 13 | from airflow.metrics.validators import AllowListValidator, BlockListValidator
|
||||
|
|
@ -24,16 +25,17 @@ AIR301_names_fix.py:17:1: AIR301 [*] `airflow.api_connexion.security.requires_ac
|
|||
19 20 | DatasetDetails()
|
||||
20 21 |
|
||||
|
||||
AIR301_names_fix.py:19:1: AIR301 [*] `airflow.auth.managers.models.resource_details.DatasetDetails` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.auth.managers.models.resource_details.DatasetDetails` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:19:1
|
||||
|
|
||||
17 | requires_access_dataset()
|
||||
18 |
|
||||
19 | DatasetDetails()
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
20 |
|
||||
21 | DatasetManager()
|
||||
|
|
||||
= help: Use `AssetDetails` from `airflow.api_fastapi.auth.managers.models.resource_details` instead.
|
||||
help: Use `AssetDetails` from `airflow.api_fastapi.auth.managers.models.resource_details` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
13 13 | from airflow.metrics.validators import AllowListValidator, BlockListValidator
|
||||
|
|
@ -49,16 +51,17 @@ AIR301_names_fix.py:19:1: AIR301 [*] `airflow.auth.managers.models.resource_deta
|
|||
21 22 | DatasetManager()
|
||||
22 23 | dataset_manager()
|
||||
|
||||
AIR301_names_fix.py:21:1: AIR301 [*] `airflow.datasets.manager.DatasetManager` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.datasets.manager.DatasetManager` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:21:1
|
||||
|
|
||||
19 | DatasetDetails()
|
||||
20 |
|
||||
21 | DatasetManager()
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
22 | dataset_manager()
|
||||
23 | resolve_dataset_manager()
|
||||
|
|
||||
= help: Use `AssetManager` from `airflow.assets.manager` instead.
|
||||
help: Use `AssetManager` from `airflow.assets.manager` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
13 13 | from airflow.metrics.validators import AllowListValidator, BlockListValidator
|
||||
|
|
@ -76,14 +79,15 @@ AIR301_names_fix.py:21:1: AIR301 [*] `airflow.datasets.manager.DatasetManager` i
|
|||
23 24 | resolve_dataset_manager()
|
||||
24 25 |
|
||||
|
||||
AIR301_names_fix.py:22:1: AIR301 [*] `airflow.datasets.manager.dataset_manager` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.datasets.manager.dataset_manager` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:22:1
|
||||
|
|
||||
21 | DatasetManager()
|
||||
22 | dataset_manager()
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^
|
||||
23 | resolve_dataset_manager()
|
||||
|
|
||||
= help: Use `asset_manager` from `airflow.assets.manager` instead.
|
||||
help: Use `asset_manager` from `airflow.assets.manager` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
13 13 | from airflow.metrics.validators import AllowListValidator, BlockListValidator
|
||||
|
|
@ -102,16 +106,17 @@ AIR301_names_fix.py:22:1: AIR301 [*] `airflow.datasets.manager.dataset_manager`
|
|||
24 25 |
|
||||
25 26 | DatasetLineageInfo()
|
||||
|
||||
AIR301_names_fix.py:23:1: AIR301 [*] `airflow.datasets.manager.resolve_dataset_manager` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.datasets.manager.resolve_dataset_manager` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:23:1
|
||||
|
|
||||
21 | DatasetManager()
|
||||
22 | dataset_manager()
|
||||
23 | resolve_dataset_manager()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
24 |
|
||||
25 | DatasetLineageInfo()
|
||||
|
|
||||
= help: Use `resolve_asset_manager` from `airflow.assets.manager` instead.
|
||||
help: Use `resolve_asset_manager` from `airflow.assets.manager` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
13 13 | from airflow.metrics.validators import AllowListValidator, BlockListValidator
|
||||
|
|
@ -131,16 +136,17 @@ AIR301_names_fix.py:23:1: AIR301 [*] `airflow.datasets.manager.resolve_dataset_m
|
|||
25 26 | DatasetLineageInfo()
|
||||
26 27 |
|
||||
|
||||
AIR301_names_fix.py:25:1: AIR301 [*] `airflow.lineage.hook.DatasetLineageInfo` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.lineage.hook.DatasetLineageInfo` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:25:1
|
||||
|
|
||||
23 | resolve_dataset_manager()
|
||||
24 |
|
||||
25 | DatasetLineageInfo()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
26 |
|
||||
27 | AllowListValidator()
|
||||
|
|
||||
= help: Use `AssetLineageInfo` from `airflow.lineage.hook` instead.
|
||||
help: Use `AssetLineageInfo` from `airflow.lineage.hook` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
9 9 | dataset_manager,
|
||||
|
|
@ -161,15 +167,16 @@ AIR301_names_fix.py:25:1: AIR301 [*] `airflow.lineage.hook.DatasetLineageInfo` i
|
|||
27 27 | AllowListValidator()
|
||||
28 28 | BlockListValidator()
|
||||
|
||||
AIR301_names_fix.py:27:1: AIR301 [*] `airflow.metrics.validators.AllowListValidator` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.metrics.validators.AllowListValidator` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:27:1
|
||||
|
|
||||
25 | DatasetLineageInfo()
|
||||
26 |
|
||||
27 | AllowListValidator()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
28 | BlockListValidator()
|
||||
|
|
||||
= help: Use `PatternAllowListValidator` from `airflow.metrics.validators` instead.
|
||||
help: Use `PatternAllowListValidator` from `airflow.metrics.validators` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
10 10 | resolve_dataset_manager,
|
||||
|
|
@ -190,15 +197,16 @@ AIR301_names_fix.py:27:1: AIR301 [*] `airflow.metrics.validators.AllowListValida
|
|||
29 29 |
|
||||
30 30 | load_connections()
|
||||
|
||||
AIR301_names_fix.py:28:1: AIR301 [*] `airflow.metrics.validators.BlockListValidator` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.metrics.validators.BlockListValidator` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:28:1
|
||||
|
|
||||
27 | AllowListValidator()
|
||||
28 | BlockListValidator()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
29 |
|
||||
30 | load_connections()
|
||||
|
|
||||
= help: Use `PatternBlockListValidator` from `airflow.metrics.validators` instead.
|
||||
help: Use `PatternBlockListValidator` from `airflow.metrics.validators` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
10 10 | resolve_dataset_manager,
|
||||
|
|
@ -219,16 +227,17 @@ AIR301_names_fix.py:28:1: AIR301 [*] `airflow.metrics.validators.BlockListValida
|
|||
30 30 | load_connections()
|
||||
31 31 |
|
||||
|
||||
AIR301_names_fix.py:30:1: AIR301 [*] `airflow.secrets.local_filesystem.load_connections` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.secrets.local_filesystem.load_connections` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:30:1
|
||||
|
|
||||
28 | BlockListValidator()
|
||||
29 |
|
||||
30 | load_connections()
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
31 |
|
||||
32 | RESOURCE_DATASET
|
||||
|
|
||||
= help: Use `load_connections_dict` from `airflow.secrets.local_filesystem` instead.
|
||||
help: Use `load_connections_dict` from `airflow.secrets.local_filesystem` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
11 11 | )
|
||||
|
|
@ -249,14 +258,15 @@ AIR301_names_fix.py:30:1: AIR301 [*] `airflow.secrets.local_filesystem.load_conn
|
|||
32 32 | RESOURCE_DATASET
|
||||
33 33 |
|
||||
|
||||
AIR301_names_fix.py:32:1: AIR301 [*] `airflow.security.permissions.RESOURCE_DATASET` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.security.permissions.RESOURCE_DATASET` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:32:1
|
||||
|
|
||||
30 | load_connections()
|
||||
31 |
|
||||
32 | RESOURCE_DATASET
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Use `RESOURCE_ASSET` from `airflow.security.permissions` instead.
|
||||
help: Use `RESOURCE_ASSET` from `airflow.security.permissions` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
12 12 | from airflow.lineage.hook import DatasetLineageInfo
|
||||
|
|
@ -277,15 +287,16 @@ AIR301_names_fix.py:32:1: AIR301 [*] `airflow.security.permissions.RESOURCE_DATA
|
|||
34 34 |
|
||||
35 35 | from airflow.listeners.spec.dataset import (
|
||||
|
||||
AIR301_names_fix.py:40:1: AIR301 [*] `airflow.listeners.spec.dataset.on_dataset_created` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.listeners.spec.dataset.on_dataset_created` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:40:1
|
||||
|
|
||||
38 | )
|
||||
39 |
|
||||
40 | on_dataset_created()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
41 | on_dataset_changed()
|
||||
|
|
||||
= help: Use `on_asset_created` from `airflow.listeners.spec.asset` instead.
|
||||
help: Use `on_asset_created` from `airflow.listeners.spec.asset` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
36 36 | on_dataset_changed,
|
||||
|
|
@ -299,13 +310,14 @@ AIR301_names_fix.py:40:1: AIR301 [*] `airflow.listeners.spec.dataset.on_dataset_
|
|||
42 43 |
|
||||
43 44 |
|
||||
|
||||
AIR301_names_fix.py:41:1: AIR301 [*] `airflow.listeners.spec.dataset.on_dataset_changed` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.listeners.spec.dataset.on_dataset_changed` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:41:1
|
||||
|
|
||||
40 | on_dataset_created()
|
||||
41 | on_dataset_changed()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Use `on_asset_changed` from `airflow.listeners.spec.asset` instead.
|
||||
help: Use `on_asset_changed` from `airflow.listeners.spec.asset` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
36 36 | on_dataset_changed,
|
||||
|
|
@ -320,16 +332,17 @@ AIR301_names_fix.py:41:1: AIR301 [*] `airflow.listeners.spec.dataset.on_dataset_
|
|||
43 44 |
|
||||
44 45 | # airflow.operators.python
|
||||
|
||||
AIR301_names_fix.py:47:1: AIR301 [*] `airflow.operators.python.get_current_context` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.operators.python.get_current_context` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:47:1
|
||||
|
|
||||
45 | from airflow.operators.python import get_current_context
|
||||
46 |
|
||||
47 | get_current_context()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
48 |
|
||||
49 | # airflow.providers.mysql
|
||||
|
|
||||
= help: Use `get_current_context` from `airflow.sdk` instead.
|
||||
help: Use `get_current_context` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
42 42 |
|
||||
|
|
@ -341,16 +354,17 @@ AIR301_names_fix.py:47:1: AIR301 [*] `airflow.operators.python.get_current_conte
|
|||
47 47 | get_current_context()
|
||||
48 48 |
|
||||
|
||||
AIR301_names_fix.py:52:1: AIR301 [*] `airflow.providers.mysql.datasets.mysql.sanitize_uri` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.providers.mysql.datasets.mysql.sanitize_uri` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:52:1
|
||||
|
|
||||
50 | from airflow.providers.mysql.datasets.mysql import sanitize_uri
|
||||
51 |
|
||||
52 | sanitize_uri
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^
|
||||
53 |
|
||||
54 | # airflow.providers.postgres
|
||||
|
|
||||
= help: Use `sanitize_uri` from `airflow.providers.mysql.assets.mysql` instead.
|
||||
help: Use `sanitize_uri` from `airflow.providers.mysql.assets.mysql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
47 47 | get_current_context()
|
||||
|
|
@ -362,16 +376,17 @@ AIR301_names_fix.py:52:1: AIR301 [*] `airflow.providers.mysql.datasets.mysql.san
|
|||
52 52 | sanitize_uri
|
||||
53 53 |
|
||||
|
||||
AIR301_names_fix.py:57:1: AIR301 [*] `airflow.providers.postgres.datasets.postgres.sanitize_uri` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.providers.postgres.datasets.postgres.sanitize_uri` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:57:1
|
||||
|
|
||||
55 | from airflow.providers.postgres.datasets.postgres import sanitize_uri
|
||||
56 |
|
||||
57 | sanitize_uri
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^
|
||||
58 |
|
||||
59 | # airflow.providers.trino
|
||||
|
|
||||
= help: Use `sanitize_uri` from `airflow.providers.postgres.assets.postgres` instead.
|
||||
help: Use `sanitize_uri` from `airflow.providers.postgres.assets.postgres` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
52 52 | sanitize_uri
|
||||
|
|
@ -383,16 +398,17 @@ AIR301_names_fix.py:57:1: AIR301 [*] `airflow.providers.postgres.datasets.postgr
|
|||
57 57 | sanitize_uri
|
||||
58 58 |
|
||||
|
||||
AIR301_names_fix.py:62:1: AIR301 [*] `airflow.providers.trino.datasets.trino.sanitize_uri` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.providers.trino.datasets.trino.sanitize_uri` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:62:1
|
||||
|
|
||||
60 | from airflow.providers.trino.datasets.trino import sanitize_uri
|
||||
61 |
|
||||
62 | sanitize_uri
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^
|
||||
63 |
|
||||
64 | # airflow.notifications.basenotifier
|
||||
|
|
||||
= help: Use `sanitize_uri` from `airflow.providers.trino.assets.trino` instead.
|
||||
help: Use `sanitize_uri` from `airflow.providers.trino.assets.trino` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
57 57 | sanitize_uri
|
||||
|
|
@ -404,16 +420,17 @@ AIR301_names_fix.py:62:1: AIR301 [*] `airflow.providers.trino.datasets.trino.san
|
|||
62 62 | sanitize_uri
|
||||
63 63 |
|
||||
|
||||
AIR301_names_fix.py:67:1: AIR301 [*] `airflow.notifications.basenotifier.BaseNotifier` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.notifications.basenotifier.BaseNotifier` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:67:1
|
||||
|
|
||||
65 | from airflow.notifications.basenotifier import BaseNotifier
|
||||
66 |
|
||||
67 | BaseNotifier()
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^
|
||||
68 |
|
||||
69 | # airflow.auth.manager
|
||||
|
|
||||
= help: Use `BaseNotifier` from `airflow.sdk.bases.notifier` instead.
|
||||
help: Use `BaseNotifier` from `airflow.sdk.bases.notifier` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
62 62 | sanitize_uri
|
||||
|
|
@ -425,14 +442,15 @@ AIR301_names_fix.py:67:1: AIR301 [*] `airflow.notifications.basenotifier.BaseNot
|
|||
67 67 | BaseNotifier()
|
||||
68 68 |
|
||||
|
||||
AIR301_names_fix.py:72:1: AIR301 [*] `airflow.auth.managers.base_auth_manager.BaseAuthManager` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.auth.managers.base_auth_manager.BaseAuthManager` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:72:1
|
||||
|
|
||||
70 | from airflow.auth.managers.base_auth_manager import BaseAuthManager
|
||||
71 |
|
||||
72 | BaseAuthManager()
|
||||
| ^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Use `BaseAuthManager` from `airflow.api_fastapi.auth.managers.base_auth_manager` instead.
|
||||
help: Use `BaseAuthManager` from `airflow.api_fastapi.auth.managers.base_auth_manager` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
67 67 | BaseNotifier()
|
||||
|
|
@ -444,14 +462,15 @@ AIR301_names_fix.py:72:1: AIR301 [*] `airflow.auth.managers.base_auth_manager.Ba
|
|||
72 72 | BaseAuthManager()
|
||||
73 73 |
|
||||
|
||||
AIR301_names_fix.py:87:1: AIR301 [*] `airflow.configuration.get` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.configuration.get` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:87:1
|
||||
|
|
||||
86 | # airflow.configuration
|
||||
87 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
| ^^^ AIR301
|
||||
| ^^^
|
||||
88 | from airflow.hooks.base_hook import BaseHook
|
||||
|
|
||||
= help: Use `conf.get` from `airflow.configuration` instead.
|
||||
help: Use `conf.get` from `airflow.configuration` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
81 81 | has_option,
|
||||
|
|
@ -467,14 +486,15 @@ AIR301_names_fix.py:87:1: AIR301 [*] `airflow.configuration.get` is removed in A
|
|||
89 90 |
|
||||
90 91 | # airflow.hooks
|
||||
|
||||
AIR301_names_fix.py:87:6: AIR301 [*] `airflow.configuration.getboolean` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.configuration.getboolean` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:87:6
|
||||
|
|
||||
86 | # airflow.configuration
|
||||
87 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
| ^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^
|
||||
88 | from airflow.hooks.base_hook import BaseHook
|
||||
|
|
||||
= help: Use `conf.getboolean` from `airflow.configuration` instead.
|
||||
help: Use `conf.getboolean` from `airflow.configuration` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
81 81 | has_option,
|
||||
|
|
@ -490,14 +510,15 @@ AIR301_names_fix.py:87:6: AIR301 [*] `airflow.configuration.getboolean` is remov
|
|||
89 90 |
|
||||
90 91 | # airflow.hooks
|
||||
|
||||
AIR301_names_fix.py:87:18: AIR301 [*] `airflow.configuration.getfloat` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.configuration.getfloat` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:87:18
|
||||
|
|
||||
86 | # airflow.configuration
|
||||
87 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
| ^^^^^^^^ AIR301
|
||||
| ^^^^^^^^
|
||||
88 | from airflow.hooks.base_hook import BaseHook
|
||||
|
|
||||
= help: Use `conf.getfloat` from `airflow.configuration` instead.
|
||||
help: Use `conf.getfloat` from `airflow.configuration` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
81 81 | has_option,
|
||||
|
|
@ -513,14 +534,15 @@ AIR301_names_fix.py:87:18: AIR301 [*] `airflow.configuration.getfloat` is remove
|
|||
89 90 |
|
||||
90 91 | # airflow.hooks
|
||||
|
||||
AIR301_names_fix.py:87:28: AIR301 [*] `airflow.configuration.getint` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.configuration.getint` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:87:28
|
||||
|
|
||||
86 | # airflow.configuration
|
||||
87 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
| ^^^^^^ AIR301
|
||||
| ^^^^^^
|
||||
88 | from airflow.hooks.base_hook import BaseHook
|
||||
|
|
||||
= help: Use `conf.getint` from `airflow.configuration` instead.
|
||||
help: Use `conf.getint` from `airflow.configuration` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
81 81 | has_option,
|
||||
|
|
@ -536,14 +558,15 @@ AIR301_names_fix.py:87:28: AIR301 [*] `airflow.configuration.getint` is removed
|
|||
89 90 |
|
||||
90 91 | # airflow.hooks
|
||||
|
||||
AIR301_names_fix.py:87:36: AIR301 [*] `airflow.configuration.has_option` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.configuration.has_option` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:87:36
|
||||
|
|
||||
86 | # airflow.configuration
|
||||
87 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
| ^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^
|
||||
88 | from airflow.hooks.base_hook import BaseHook
|
||||
|
|
||||
= help: Use `conf.has_option` from `airflow.configuration` instead.
|
||||
help: Use `conf.has_option` from `airflow.configuration` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
81 81 | has_option,
|
||||
|
|
@ -559,14 +582,15 @@ AIR301_names_fix.py:87:36: AIR301 [*] `airflow.configuration.has_option` is remo
|
|||
89 90 |
|
||||
90 91 | # airflow.hooks
|
||||
|
||||
AIR301_names_fix.py:87:48: AIR301 [*] `airflow.configuration.remove_option` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.configuration.remove_option` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:87:48
|
||||
|
|
||||
86 | # airflow.configuration
|
||||
87 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
| ^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^
|
||||
88 | from airflow.hooks.base_hook import BaseHook
|
||||
|
|
||||
= help: Use `conf.remove_option` from `airflow.configuration` instead.
|
||||
help: Use `conf.remove_option` from `airflow.configuration` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
81 81 | has_option,
|
||||
|
|
@ -582,14 +606,15 @@ AIR301_names_fix.py:87:48: AIR301 [*] `airflow.configuration.remove_option` is r
|
|||
89 90 |
|
||||
90 91 | # airflow.hooks
|
||||
|
||||
AIR301_names_fix.py:87:63: AIR301 [*] `airflow.configuration.as_dict` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.configuration.as_dict` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:87:63
|
||||
|
|
||||
86 | # airflow.configuration
|
||||
87 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
| ^^^^^^^ AIR301
|
||||
| ^^^^^^^
|
||||
88 | from airflow.hooks.base_hook import BaseHook
|
||||
|
|
||||
= help: Use `conf.as_dict` from `airflow.configuration` instead.
|
||||
help: Use `conf.as_dict` from `airflow.configuration` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
81 81 | has_option,
|
||||
|
|
@ -605,14 +630,15 @@ AIR301_names_fix.py:87:63: AIR301 [*] `airflow.configuration.as_dict` is removed
|
|||
89 90 |
|
||||
90 91 | # airflow.hooks
|
||||
|
||||
AIR301_names_fix.py:87:72: AIR301 [*] `airflow.configuration.set` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.configuration.set` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:87:72
|
||||
|
|
||||
86 | # airflow.configuration
|
||||
87 | get, getboolean, getfloat, getint, has_option, remove_option, as_dict, set
|
||||
| ^^^ AIR301
|
||||
| ^^^
|
||||
88 | from airflow.hooks.base_hook import BaseHook
|
||||
|
|
||||
= help: Use `conf.set` from `airflow.configuration` instead.
|
||||
help: Use `conf.set` from `airflow.configuration` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
81 81 | has_option,
|
||||
|
|
@ -628,15 +654,16 @@ AIR301_names_fix.py:87:72: AIR301 [*] `airflow.configuration.set` is removed in
|
|||
89 90 |
|
||||
90 91 | # airflow.hooks
|
||||
|
||||
AIR301_names_fix.py:91:1: AIR301 [*] `airflow.hooks.base_hook.BaseHook` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.hooks.base_hook.BaseHook` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:91:1
|
||||
|
|
||||
90 | # airflow.hooks
|
||||
91 | BaseHook()
|
||||
| ^^^^^^^^ AIR301
|
||||
| ^^^^^^^^
|
||||
92 |
|
||||
93 | from airflow.sensors.base_sensor_operator import BaseSensorOperator
|
||||
|
|
||||
= help: Use `BaseHook` from `airflow.hooks.base` instead.
|
||||
help: Use `BaseHook` from `airflow.hooks.base` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
85 85 |
|
||||
|
|
@ -648,14 +675,15 @@ AIR301_names_fix.py:91:1: AIR301 [*] `airflow.hooks.base_hook.BaseHook` is remov
|
|||
90 90 | # airflow.hooks
|
||||
91 91 | BaseHook()
|
||||
|
||||
AIR301_names_fix.py:96:1: AIR301 [*] `airflow.sensors.base_sensor_operator.BaseSensorOperator` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.sensors.base_sensor_operator.BaseSensorOperator` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:96:1
|
||||
|
|
||||
95 | # airflow.sensors.base_sensor_operator
|
||||
96 | BaseSensorOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
97 | BaseHook()
|
||||
|
|
||||
= help: Use `BaseSensorOperator` from `airflow.sdk.bases.sensor` instead.
|
||||
help: Use `BaseSensorOperator` from `airflow.sdk.bases.sensor` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
90 90 | # airflow.hooks
|
||||
|
|
@ -667,16 +695,17 @@ AIR301_names_fix.py:96:1: AIR301 [*] `airflow.sensors.base_sensor_operator.BaseS
|
|||
95 95 | # airflow.sensors.base_sensor_operator
|
||||
96 96 | BaseSensorOperator()
|
||||
|
||||
AIR301_names_fix.py:97:1: AIR301 [*] `airflow.hooks.base_hook.BaseHook` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.hooks.base_hook.BaseHook` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:97:1
|
||||
|
|
||||
95 | # airflow.sensors.base_sensor_operator
|
||||
96 | BaseSensorOperator()
|
||||
97 | BaseHook()
|
||||
| ^^^^^^^^ AIR301
|
||||
| ^^^^^^^^
|
||||
98 |
|
||||
99 | from airflow.utils.helpers import chain as helper_chain
|
||||
|
|
||||
= help: Use `BaseHook` from `airflow.hooks.base` instead.
|
||||
help: Use `BaseHook` from `airflow.hooks.base` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
85 85 |
|
||||
|
|
@ -693,14 +722,15 @@ AIR301_names_fix.py:97:1: AIR301 [*] `airflow.hooks.base_hook.BaseHook` is remov
|
|||
95 95 | # airflow.sensors.base_sensor_operator
|
||||
96 96 | BaseSensorOperator()
|
||||
|
||||
AIR301_names_fix.py:103:1: AIR301 [*] `airflow.utils.helpers.chain` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.utils.helpers.chain` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:103:1
|
||||
|
|
||||
102 | # airflow.utils.helpers
|
||||
103 | helper_chain
|
||||
| ^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^
|
||||
104 | helper_cross_downstream
|
||||
|
|
||||
= help: Use `chain` from `airflow.sdk` instead.
|
||||
help: Use `chain` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
98 98 |
|
||||
|
|
@ -715,16 +745,17 @@ AIR301_names_fix.py:103:1: AIR301 [*] `airflow.utils.helpers.chain` is removed i
|
|||
105 106 |
|
||||
106 107 | # airflow.utils.file
|
||||
|
||||
AIR301_names_fix.py:104:1: AIR301 [*] `airflow.utils.helpers.cross_downstream` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.utils.helpers.cross_downstream` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:104:1
|
||||
|
|
||||
102 | # airflow.utils.helpers
|
||||
103 | helper_chain
|
||||
104 | helper_cross_downstream
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
105 |
|
||||
106 | # airflow.utils.file
|
||||
|
|
||||
= help: Use `cross_downstream` from `airflow.sdk` instead.
|
||||
help: Use `cross_downstream` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
98 98 |
|
||||
|
|
@ -740,16 +771,17 @@ AIR301_names_fix.py:104:1: AIR301 [*] `airflow.utils.helpers.cross_downstream` i
|
|||
106 107 | # airflow.utils.file
|
||||
107 108 | from airflow.utils.file import TemporaryDirectory
|
||||
|
||||
AIR301_names_fix.py:109:1: AIR301 [*] `airflow.utils.file.TemporaryDirectory` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.utils.file.TemporaryDirectory` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:109:1
|
||||
|
|
||||
107 | from airflow.utils.file import TemporaryDirectory
|
||||
108 |
|
||||
109 | TemporaryDirectory()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
110 |
|
||||
111 | from airflow.utils.log import secrets_masker
|
||||
|
|
||||
= help: Use `TemporaryDirectory` from `tempfile` instead.
|
||||
help: Use `TemporaryDirectory` from `tempfile` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
104 104 | helper_cross_downstream
|
||||
|
|
@ -761,13 +793,14 @@ AIR301_names_fix.py:109:1: AIR301 [*] `airflow.utils.file.TemporaryDirectory` is
|
|||
109 109 | TemporaryDirectory()
|
||||
110 110 |
|
||||
|
||||
AIR301_names_fix.py:114:1: AIR301 [*] `airflow.utils.log.secrets_masker` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.utils.log.secrets_masker` is removed in Airflow 3.0
|
||||
--> AIR301_names_fix.py:114:1
|
||||
|
|
||||
113 | # airflow.utils.log
|
||||
114 | secrets_masker
|
||||
| ^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Use `secrets_masker` from `airflow.sdk.execution_time` instead.
|
||||
help: Use `secrets_masker` from `airflow.sdk.execution_time` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
108 108 |
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR301_provider_names_fix.py:11:1: AIR301 [*] `airflow.providers.amazon.aws.auth_manager.avp.entities.AvpEntities.DATASET` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.providers.amazon.aws.auth_manager.avp.entities.AvpEntities.DATASET` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:11:1
|
||||
|
|
||||
9 | from airflow.security.permissions import RESOURCE_DATASET
|
||||
10 |
|
||||
11 | AvpEntities.DATASET
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
12 |
|
||||
13 | # airflow.providers.openlineage.utils.utils
|
||||
|
|
||||
= help: Use `AvpEntities.ASSET` from `airflow.providers.amazon.aws.auth_manager.avp.entities` instead.
|
||||
help: Use `AvpEntities.ASSET` from `airflow.providers.amazon.aws.auth_manager.avp.entities` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
8 8 | from airflow.secrets.local_filesystem import load_connections
|
||||
|
|
@ -22,14 +23,15 @@ AIR301_provider_names_fix.py:11:1: AIR301 [*] `airflow.providers.amazon.aws.auth
|
|||
13 13 | # airflow.providers.openlineage.utils.utils
|
||||
14 14 | DatasetInfo()
|
||||
|
||||
AIR301_provider_names_fix.py:14:1: AIR301 [*] `airflow.providers.openlineage.utils.utils.DatasetInfo` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.providers.openlineage.utils.utils.DatasetInfo` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:14:1
|
||||
|
|
||||
13 | # airflow.providers.openlineage.utils.utils
|
||||
14 | DatasetInfo()
|
||||
| ^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^
|
||||
15 | translate_airflow_dataset()
|
||||
|
|
||||
= help: Use `AssetInfo` from `airflow.providers.openlineage.utils.utils` instead.
|
||||
help: Use `AssetInfo` from `airflow.providers.openlineage.utils.utils` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
4 4 | from airflow.providers.openlineage.utils.utils import (
|
||||
|
|
@ -49,16 +51,17 @@ AIR301_provider_names_fix.py:14:1: AIR301 [*] `airflow.providers.openlineage.uti
|
|||
16 17 |
|
||||
17 18 | # airflow.secrets.local_filesystem
|
||||
|
||||
AIR301_provider_names_fix.py:15:1: AIR301 [*] `airflow.providers.openlineage.utils.utils.translate_airflow_dataset` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.providers.openlineage.utils.utils.translate_airflow_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:15:1
|
||||
|
|
||||
13 | # airflow.providers.openlineage.utils.utils
|
||||
14 | DatasetInfo()
|
||||
15 | translate_airflow_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
16 |
|
||||
17 | # airflow.secrets.local_filesystem
|
||||
|
|
||||
= help: Use `translate_airflow_asset` from `airflow.providers.openlineage.utils.utils` instead.
|
||||
help: Use `translate_airflow_asset` from `airflow.providers.openlineage.utils.utils` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
4 4 | from airflow.providers.openlineage.utils.utils import (
|
||||
|
|
@ -78,15 +81,16 @@ AIR301_provider_names_fix.py:15:1: AIR301 [*] `airflow.providers.openlineage.uti
|
|||
17 18 | # airflow.secrets.local_filesystem
|
||||
18 19 | load_connections()
|
||||
|
||||
AIR301_provider_names_fix.py:18:1: AIR301 [*] `airflow.secrets.local_filesystem.load_connections` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.secrets.local_filesystem.load_connections` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:18:1
|
||||
|
|
||||
17 | # airflow.secrets.local_filesystem
|
||||
18 | load_connections()
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
19 |
|
||||
20 | # airflow.security.permissions
|
||||
|
|
||||
= help: Use `load_connections_dict` from `airflow.secrets.local_filesystem` instead.
|
||||
help: Use `load_connections_dict` from `airflow.secrets.local_filesystem` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
5 5 | DatasetInfo,
|
||||
|
|
@ -107,15 +111,16 @@ AIR301_provider_names_fix.py:18:1: AIR301 [*] `airflow.secrets.local_filesystem.
|
|||
20 20 | # airflow.security.permissions
|
||||
21 21 | RESOURCE_DATASET
|
||||
|
||||
AIR301_provider_names_fix.py:21:1: AIR301 [*] `airflow.security.permissions.RESOURCE_DATASET` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.security.permissions.RESOURCE_DATASET` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:21:1
|
||||
|
|
||||
20 | # airflow.security.permissions
|
||||
21 | RESOURCE_DATASET
|
||||
| ^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
22 |
|
||||
23 | from airflow.providers.amazon.aws.datasets.s3 import (
|
||||
|
|
||||
= help: Use `RESOURCE_ASSET` from `airflow.security.permissions` instead.
|
||||
help: Use `RESOURCE_ASSET` from `airflow.security.permissions` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
6 6 | translate_airflow_dataset,
|
||||
|
|
@ -136,15 +141,16 @@ AIR301_provider_names_fix.py:21:1: AIR301 [*] `airflow.security.permissions.RESO
|
|||
23 23 | from airflow.providers.amazon.aws.datasets.s3 import (
|
||||
24 24 | convert_dataset_to_openlineage as s3_convert_dataset_to_openlineage,
|
||||
|
||||
AIR301_provider_names_fix.py:28:1: AIR301 [*] `airflow.providers.amazon.aws.datasets.s3.create_dataset` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.providers.amazon.aws.datasets.s3.create_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:28:1
|
||||
|
|
||||
26 | from airflow.providers.amazon.aws.datasets.s3 import create_dataset as s3_create_dataset
|
||||
27 |
|
||||
28 | s3_create_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
29 | s3_convert_dataset_to_openlineage()
|
||||
|
|
||||
= help: Use `create_asset` from `airflow.providers.amazon.aws.assets.s3` instead.
|
||||
help: Use `create_asset` from `airflow.providers.amazon.aws.assets.s3` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
24 24 | convert_dataset_to_openlineage as s3_convert_dataset_to_openlineage,
|
||||
|
|
@ -158,15 +164,16 @@ AIR301_provider_names_fix.py:28:1: AIR301 [*] `airflow.providers.amazon.aws.data
|
|||
30 31 |
|
||||
31 32 | from airflow.providers.common.io.dataset.file import (
|
||||
|
||||
AIR301_provider_names_fix.py:29:1: AIR301 [*] `airflow.providers.amazon.aws.datasets.s3.convert_dataset_to_openlineage` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.providers.amazon.aws.datasets.s3.convert_dataset_to_openlineage` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:29:1
|
||||
|
|
||||
28 | s3_create_dataset()
|
||||
29 | s3_convert_dataset_to_openlineage()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
30 |
|
||||
31 | from airflow.providers.common.io.dataset.file import (
|
||||
|
|
||||
= help: Use `convert_asset_to_openlineage` from `airflow.providers.amazon.aws.assets.s3` instead.
|
||||
help: Use `convert_asset_to_openlineage` from `airflow.providers.amazon.aws.assets.s3` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
24 24 | convert_dataset_to_openlineage as s3_convert_dataset_to_openlineage,
|
||||
|
|
@ -181,16 +188,17 @@ AIR301_provider_names_fix.py:29:1: AIR301 [*] `airflow.providers.amazon.aws.data
|
|||
31 32 | from airflow.providers.common.io.dataset.file import (
|
||||
32 33 | convert_dataset_to_openlineage as io_convert_dataset_to_openlineage,
|
||||
|
||||
AIR301_provider_names_fix.py:45:1: AIR301 [*] `airflow.providers.google.datasets.bigquery.create_dataset` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.providers.google.datasets.bigquery.create_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:45:1
|
||||
|
|
||||
43 | )
|
||||
44 |
|
||||
45 | bigquery_create_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
46 |
|
||||
47 | # airflow.providers.google.datasets.gcs
|
||||
|
|
||||
= help: Use `create_asset` from `airflow.providers.google.assets.bigquery` instead.
|
||||
help: Use `create_asset` from `airflow.providers.google.assets.bigquery` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
41 41 | from airflow.providers.google.datasets.bigquery import (
|
||||
|
|
@ -204,15 +212,16 @@ AIR301_provider_names_fix.py:45:1: AIR301 [*] `airflow.providers.google.datasets
|
|||
47 48 | # airflow.providers.google.datasets.gcs
|
||||
48 49 | from airflow.providers.google.datasets.gcs import (
|
||||
|
||||
AIR301_provider_names_fix.py:53:1: AIR301 [*] `airflow.providers.google.datasets.gcs.create_dataset` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.providers.google.datasets.gcs.create_dataset` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:53:1
|
||||
|
|
||||
51 | from airflow.providers.google.datasets.gcs import create_dataset as gcs_create_dataset
|
||||
52 |
|
||||
53 | gcs_create_dataset()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
54 | gcs_convert_dataset_to_openlineage()
|
||||
|
|
||||
= help: Use `create_asset` from `airflow.providers.google.assets.gcs` instead.
|
||||
help: Use `create_asset` from `airflow.providers.google.assets.gcs` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
49 49 | convert_dataset_to_openlineage as gcs_convert_dataset_to_openlineage,
|
||||
|
|
@ -224,13 +233,14 @@ AIR301_provider_names_fix.py:53:1: AIR301 [*] `airflow.providers.google.datasets
|
|||
54 |+create_asset()
|
||||
54 55 | gcs_convert_dataset_to_openlineage()
|
||||
|
||||
AIR301_provider_names_fix.py:54:1: AIR301 [*] `airflow.providers.google.datasets.gcs.convert_dataset_to_openlineage` is removed in Airflow 3.0
|
||||
AIR301 [*] `airflow.providers.google.datasets.gcs.convert_dataset_to_openlineage` is removed in Airflow 3.0
|
||||
--> AIR301_provider_names_fix.py:54:1
|
||||
|
|
||||
53 | gcs_create_dataset()
|
||||
54 | gcs_convert_dataset_to_openlineage()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR301
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Use `convert_asset_to_openlineage` from `airflow.providers.google.assets.gcs` instead.
|
||||
help: Use `convert_asset_to_openlineage` from `airflow.providers.google.assets.gcs` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
49 49 | convert_dataset_to_openlineage as gcs_convert_dataset_to_openlineage,
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_amazon.py:14:1: AIR302 [*] `airflow.hooks.S3_hook.S3Hook` is moved into `amazon` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.S3_hook.S3Hook` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:14:1
|
||||
|
|
||||
12 | from airflow.sensors.s3_key_sensor import S3KeySensor
|
||||
13 |
|
||||
14 | S3Hook()
|
||||
| ^^^^^^ AIR302
|
||||
| ^^^^^^
|
||||
15 | provide_bucket_name()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-amazon>=1.0.0` and use `S3Hook` from `airflow.providers.amazon.aws.hooks.s3` instead.
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `S3Hook` from `airflow.providers.amazon.aws.hooks.s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -28,15 +29,16 @@ AIR302_amazon.py:14:1: AIR302 [*] `airflow.hooks.S3_hook.S3Hook` is moved into `
|
|||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
|
||||
AIR302_amazon.py:15:1: AIR302 [*] `airflow.hooks.S3_hook.provide_bucket_name` is moved into `amazon` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.S3_hook.provide_bucket_name` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:15:1
|
||||
|
|
||||
14 | S3Hook()
|
||||
15 | provide_bucket_name()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
16 |
|
||||
17 | GCSToS3Operator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-amazon>=1.0.0` and use `provide_bucket_name` from `airflow.providers.amazon.aws.hooks.s3` instead.
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `provide_bucket_name` from `airflow.providers.amazon.aws.hooks.s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
@ -55,16 +57,17 @@ AIR302_amazon.py:15:1: AIR302 [*] `airflow.hooks.S3_hook.provide_bucket_name` is
|
|||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
|
||||
AIR302_amazon.py:17:1: AIR302 [*] `airflow.operators.gcs_to_s3.GCSToS3Operator` is moved into `amazon` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.gcs_to_s3.GCSToS3Operator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:17:1
|
||||
|
|
||||
15 | provide_bucket_name()
|
||||
16 |
|
||||
17 | GCSToS3Operator()
|
||||
| ^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^
|
||||
18 | GoogleApiToS3Operator()
|
||||
19 | RedshiftToS3Operator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-amazon>=1.0.0` and use `GCSToS3Operator` from `airflow.providers.amazon.aws.transfers.gcs_to_s3` instead.
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `GCSToS3Operator` from `airflow.providers.amazon.aws.transfers.gcs_to_s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
4 4 | S3Hook,
|
||||
|
|
@ -81,15 +84,16 @@ AIR302_amazon.py:17:1: AIR302 [*] `airflow.operators.gcs_to_s3.GCSToS3Operator`
|
|||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
|
||||
AIR302_amazon.py:18:1: AIR302 [*] `airflow.operators.google_api_to_s3_transfer.GoogleApiToS3Operator` is moved into `amazon` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.google_api_to_s3_transfer.GoogleApiToS3Operator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:18:1
|
||||
|
|
||||
17 | GCSToS3Operator()
|
||||
18 | GoogleApiToS3Operator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
19 | RedshiftToS3Operator()
|
||||
20 | S3FileTransformOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-amazon>=1.0.0` and use `GoogleApiToS3Operator` from `airflow.providers.amazon.aws.transfers.google_api_to_s3` instead.
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `GoogleApiToS3Operator` from `airflow.providers.amazon.aws.transfers.google_api_to_s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
5 5 | provide_bucket_name,
|
||||
|
|
@ -105,16 +109,17 @@ AIR302_amazon.py:18:1: AIR302 [*] `airflow.operators.google_api_to_s3_transfer.G
|
|||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
|
||||
AIR302_amazon.py:19:1: AIR302 [*] `airflow.operators.redshift_to_s3_operator.RedshiftToS3Operator` is moved into `amazon` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.redshift_to_s3_operator.RedshiftToS3Operator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:19:1
|
||||
|
|
||||
17 | GCSToS3Operator()
|
||||
18 | GoogleApiToS3Operator()
|
||||
19 | RedshiftToS3Operator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
20 | S3FileTransformOperator()
|
||||
21 | S3ToRedshiftOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-amazon>=1.0.0` and use `RedshiftToS3Operator` from `airflow.providers.amazon.aws.transfers.redshift_to_s3` instead.
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `RedshiftToS3Operator` from `airflow.providers.amazon.aws.transfers.redshift_to_s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
6 6 | )
|
||||
|
|
@ -129,16 +134,17 @@ AIR302_amazon.py:19:1: AIR302 [*] `airflow.operators.redshift_to_s3_operator.Red
|
|||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
|
||||
AIR302_amazon.py:20:1: AIR302 [*] `airflow.operators.s3_file_transform_operator.S3FileTransformOperator` is moved into `amazon` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.s3_file_transform_operator.S3FileTransformOperator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:20:1
|
||||
|
|
||||
18 | GoogleApiToS3Operator()
|
||||
19 | RedshiftToS3Operator()
|
||||
20 | S3FileTransformOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
21 | S3ToRedshiftOperator()
|
||||
22 | S3KeySensor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-amazon>=3.0.0` and use `S3FileTransformOperator` from `airflow.providers.amazon.aws.operators.s3` instead.
|
||||
help: Install `apache-airflow-providers-amazon>=3.0.0` and use `S3FileTransformOperator` from `airflow.providers.amazon.aws.operators.s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
7 7 | from airflow.operators.gcs_to_s3 import GCSToS3Operator
|
||||
|
|
@ -152,15 +158,16 @@ AIR302_amazon.py:20:1: AIR302 [*] `airflow.operators.s3_file_transform_operator.
|
|||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
|
||||
AIR302_amazon.py:21:1: AIR302 [*] `airflow.operators.s3_to_redshift_operator.S3ToRedshiftOperator` is moved into `amazon` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.s3_to_redshift_operator.S3ToRedshiftOperator` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:21:1
|
||||
|
|
||||
19 | RedshiftToS3Operator()
|
||||
20 | S3FileTransformOperator()
|
||||
21 | S3ToRedshiftOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
22 | S3KeySensor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-amazon>=1.0.0` and use `S3ToRedshiftOperator` from `airflow.providers.amazon.aws.transfers.s3_to_redshift` instead.
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `S3ToRedshiftOperator` from `airflow.providers.amazon.aws.transfers.s3_to_redshift` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
8 8 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Operator
|
||||
|
|
@ -173,16 +180,17 @@ AIR302_amazon.py:21:1: AIR302 [*] `airflow.operators.s3_to_redshift_operator.S3T
|
|||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
|
||||
AIR302_amazon.py:22:1: AIR302 [*] `airflow.sensors.s3_key_sensor.S3KeySensor` is moved into `amazon` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.s3_key_sensor.S3KeySensor` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:22:1
|
||||
|
|
||||
20 | S3FileTransformOperator()
|
||||
21 | S3ToRedshiftOperator()
|
||||
22 | S3KeySensor()
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
23 |
|
||||
24 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Transfer
|
||||
|
|
||||
= help: Install `apache-airflow-providers-amazon>=1.0.0` and use `S3KeySensor` from `airflow.providers.amazon.aws.sensors.s3` instead.
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `S3KeySensor` from `airflow.providers.amazon.aws.sensors.s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
9 9 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Operator
|
||||
|
|
@ -194,16 +202,17 @@ AIR302_amazon.py:22:1: AIR302 [*] `airflow.sensors.s3_key_sensor.S3KeySensor` is
|
|||
14 14 | S3Hook()
|
||||
15 15 | provide_bucket_name()
|
||||
|
||||
AIR302_amazon.py:26:1: AIR302 [*] `airflow.operators.google_api_to_s3_transfer.GoogleApiToS3Transfer` is moved into `amazon` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.google_api_to_s3_transfer.GoogleApiToS3Transfer` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:26:1
|
||||
|
|
||||
24 | from airflow.operators.google_api_to_s3_transfer import GoogleApiToS3Transfer
|
||||
25 |
|
||||
26 | GoogleApiToS3Transfer()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
27 |
|
||||
28 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Transfer
|
||||
|
|
||||
= help: Install `apache-airflow-providers-amazon>=1.0.0` and use `GoogleApiToS3Operator` from `airflow.providers.amazon.aws.transfers.google_api_to_s3` instead.
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `GoogleApiToS3Operator` from `airflow.providers.amazon.aws.transfers.google_api_to_s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
22 22 | S3KeySensor()
|
||||
|
|
@ -214,16 +223,17 @@ AIR302_amazon.py:26:1: AIR302 [*] `airflow.operators.google_api_to_s3_transfer.G
|
|||
26 27 | GoogleApiToS3Transfer()
|
||||
27 28 |
|
||||
|
||||
AIR302_amazon.py:30:1: AIR302 [*] `airflow.operators.redshift_to_s3_operator.RedshiftToS3Transfer` is moved into `amazon` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.redshift_to_s3_operator.RedshiftToS3Transfer` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:30:1
|
||||
|
|
||||
28 | from airflow.operators.redshift_to_s3_operator import RedshiftToS3Transfer
|
||||
29 |
|
||||
30 | RedshiftToS3Transfer()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
31 |
|
||||
32 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftTransfer
|
||||
|
|
||||
= help: Install `apache-airflow-providers-amazon>=1.0.0` and use `RedshiftToS3Operator` from `airflow.providers.amazon.aws.transfers.redshift_to_s3` instead.
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `RedshiftToS3Operator` from `airflow.providers.amazon.aws.transfers.redshift_to_s3` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
26 26 | GoogleApiToS3Transfer()
|
||||
|
|
@ -234,14 +244,15 @@ AIR302_amazon.py:30:1: AIR302 [*] `airflow.operators.redshift_to_s3_operator.Red
|
|||
30 31 | RedshiftToS3Transfer()
|
||||
31 32 |
|
||||
|
||||
AIR302_amazon.py:34:1: AIR302 [*] `airflow.operators.s3_to_redshift_operator.S3ToRedshiftTransfer` is moved into `amazon` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.s3_to_redshift_operator.S3ToRedshiftTransfer` is moved into `amazon` provider in Airflow 3.0;
|
||||
--> AIR302_amazon.py:34:1
|
||||
|
|
||||
32 | from airflow.operators.s3_to_redshift_operator import S3ToRedshiftTransfer
|
||||
33 |
|
||||
34 | S3ToRedshiftTransfer()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-amazon>=1.0.0` and use `S3ToRedshiftOperator` from `airflow.providers.amazon.aws.transfers.s3_to_redshift` instead.
|
||||
help: Install `apache-airflow-providers-amazon>=1.0.0` and use `S3ToRedshiftOperator` from `airflow.providers.amazon.aws.transfers.s3_to_redshift` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
30 30 | RedshiftToS3Transfer()
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_celery.py:9:1: AIR302 [*] `airflow.config_templates.default_celery.DEFAULT_CELERY_CONFIG` is moved into `celery` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.config_templates.default_celery.DEFAULT_CELERY_CONFIG` is moved into `celery` provider in Airflow 3.0;
|
||||
--> AIR302_celery.py:9:1
|
||||
|
|
||||
7 | )
|
||||
8 |
|
||||
9 | DEFAULT_CELERY_CONFIG
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
10 |
|
||||
11 | app
|
||||
|
|
||||
= help: Install `apache-airflow-providers-celery>=3.3.0` and use `DEFAULT_CELERY_CONFIG` from `airflow.providers.celery.executors.default_celery` instead.
|
||||
help: Install `apache-airflow-providers-celery>=3.3.0` and use `DEFAULT_CELERY_CONFIG` from `airflow.providers.celery.executors.default_celery` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -25,15 +26,16 @@ AIR302_celery.py:9:1: AIR302 [*] `airflow.config_templates.default_celery.DEFAUL
|
|||
9 9 | DEFAULT_CELERY_CONFIG
|
||||
10 10 |
|
||||
|
||||
AIR302_celery.py:11:1: AIR302 [*] `airflow.executors.celery_executor.app` is moved into `celery` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.executors.celery_executor.app` is moved into `celery` provider in Airflow 3.0;
|
||||
--> AIR302_celery.py:11:1
|
||||
|
|
||||
9 | DEFAULT_CELERY_CONFIG
|
||||
10 |
|
||||
11 | app
|
||||
| ^^^ AIR302
|
||||
| ^^^
|
||||
12 | CeleryExecutor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-celery>=3.3.0` and use `app` from `airflow.providers.celery.executors.celery_executor_utils` instead.
|
||||
help: Install `apache-airflow-providers-celery>=3.3.0` and use `app` from `airflow.providers.celery.executors.celery_executor_utils` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
3 3 | from airflow.config_templates.default_celery import DEFAULT_CELERY_CONFIG
|
||||
|
|
@ -46,13 +48,14 @@ AIR302_celery.py:11:1: AIR302 [*] `airflow.executors.celery_executor.app` is mov
|
|||
9 9 | DEFAULT_CELERY_CONFIG
|
||||
10 10 |
|
||||
|
||||
AIR302_celery.py:12:1: AIR302 [*] `airflow.executors.celery_executor.CeleryExecutor` is moved into `celery` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.executors.celery_executor.CeleryExecutor` is moved into `celery` provider in Airflow 3.0;
|
||||
--> AIR302_celery.py:12:1
|
||||
|
|
||||
11 | app
|
||||
12 | CeleryExecutor()
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-celery>=3.3.0` and use `CeleryExecutor` from `airflow.providers.celery.executors.celery_executor` instead.
|
||||
help: Install `apache-airflow-providers-celery>=3.3.0` and use `CeleryExecutor` from `airflow.providers.celery.executors.celery_executor` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_common_sql.py:8:1: AIR302 [*] `airflow.hooks.dbapi.ConnectorProtocol` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.dbapi.ConnectorProtocol` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:8:1
|
||||
|
|
||||
6 | )
|
||||
7 |
|
||||
8 | ConnectorProtocol()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
9 | DbApiHook()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `ConnectorProtocol` from `airflow.providers.common.sql.hooks.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `ConnectorProtocol` from `airflow.providers.common.sql.hooks.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -23,15 +24,16 @@ AIR302_common_sql.py:8:1: AIR302 [*] `airflow.hooks.dbapi.ConnectorProtocol` is
|
|||
8 8 | ConnectorProtocol()
|
||||
9 9 | DbApiHook()
|
||||
|
||||
AIR302_common_sql.py:9:1: AIR302 [*] `airflow.hooks.dbapi.DbApiHook` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.dbapi.DbApiHook` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:9:1
|
||||
|
|
||||
8 | ConnectorProtocol()
|
||||
9 | DbApiHook()
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^
|
||||
10 |
|
||||
11 | from airflow.hooks.dbapi_hook import DbApiHook
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `DbApiHook` from `airflow.providers.common.sql.hooks.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `DbApiHook` from `airflow.providers.common.sql.hooks.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
@ -44,15 +46,16 @@ AIR302_common_sql.py:9:1: AIR302 [*] `airflow.hooks.dbapi.DbApiHook` is moved in
|
|||
8 8 | ConnectorProtocol()
|
||||
9 9 | DbApiHook()
|
||||
|
||||
AIR302_common_sql.py:14:1: AIR302 [*] `airflow.hooks.dbapi_hook.DbApiHook` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.dbapi_hook.DbApiHook` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:14:1
|
||||
|
|
||||
12 | from airflow.operators.check_operator import SQLCheckOperator
|
||||
13 |
|
||||
14 | DbApiHook()
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^
|
||||
15 | SQLCheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `DbApiHook` from `airflow.providers.common.sql.hooks.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `DbApiHook` from `airflow.providers.common.sql.hooks.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
8 8 | ConnectorProtocol()
|
||||
|
|
@ -65,13 +68,14 @@ AIR302_common_sql.py:14:1: AIR302 [*] `airflow.hooks.dbapi_hook.DbApiHook` is mo
|
|||
14 14 | DbApiHook()
|
||||
15 15 | SQLCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:15:1: AIR302 [*] `airflow.operators.check_operator.SQLCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.check_operator.SQLCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:15:1
|
||||
|
|
||||
14 | DbApiHook()
|
||||
15 | SQLCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
9 9 | DbApiHook()
|
||||
|
|
@ -83,15 +87,16 @@ AIR302_common_sql.py:15:1: AIR302 [*] `airflow.operators.check_operator.SQLCheck
|
|||
14 14 | DbApiHook()
|
||||
15 15 | SQLCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:21:1: AIR302 [*] `airflow.operators.sql.SQLCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.sql.SQLCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:21:1
|
||||
|
|
||||
19 | from airflow.operators.sql import SQLCheckOperator
|
||||
20 |
|
||||
21 | SQLCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
22 | CheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
16 16 |
|
||||
|
|
@ -103,13 +108,14 @@ AIR302_common_sql.py:21:1: AIR302 [*] `airflow.operators.sql.SQLCheckOperator` i
|
|||
21 21 | SQLCheckOperator()
|
||||
22 22 | CheckOperator()
|
||||
|
||||
AIR302_common_sql.py:22:1: AIR302 [*] `airflow.operators.check_operator.CheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.check_operator.CheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:22:1
|
||||
|
|
||||
21 | SQLCheckOperator()
|
||||
22 | CheckOperator()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
17 17 |
|
||||
|
|
@ -120,14 +126,15 @@ AIR302_common_sql.py:22:1: AIR302 [*] `airflow.operators.check_operator.CheckOpe
|
|||
21 22 | SQLCheckOperator()
|
||||
22 23 | CheckOperator()
|
||||
|
||||
AIR302_common_sql.py:27:1: AIR302 [*] `airflow.operators.druid_check_operator.CheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.druid_check_operator.CheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:27:1
|
||||
|
|
||||
25 | from airflow.operators.druid_check_operator import CheckOperator
|
||||
26 |
|
||||
27 | CheckOperator()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
23 23 |
|
||||
|
|
@ -138,14 +145,15 @@ AIR302_common_sql.py:27:1: AIR302 [*] `airflow.operators.druid_check_operator.Ch
|
|||
27 28 | CheckOperator()
|
||||
28 29 |
|
||||
|
||||
AIR302_common_sql.py:32:1: AIR302 [*] `airflow.operators.presto_check_operator.CheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.CheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:32:1
|
||||
|
|
||||
30 | from airflow.operators.presto_check_operator import CheckOperator
|
||||
31 |
|
||||
32 | CheckOperator()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
28 28 |
|
||||
|
|
@ -156,16 +164,17 @@ AIR302_common_sql.py:32:1: AIR302 [*] `airflow.operators.presto_check_operator.C
|
|||
32 33 | CheckOperator()
|
||||
33 34 |
|
||||
|
||||
AIR302_common_sql.py:42:1: AIR302 [*] `airflow.operators.druid_check_operator.DruidCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.druid_check_operator.DruidCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:42:1
|
||||
|
|
||||
40 | from airflow.operators.presto_check_operator import PrestoCheckOperator
|
||||
41 |
|
||||
42 | DruidCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
43 | PrestoCheckOperator()
|
||||
44 | IntervalCheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
38 38 | )
|
||||
|
|
@ -176,15 +185,16 @@ AIR302_common_sql.py:42:1: AIR302 [*] `airflow.operators.druid_check_operator.Dr
|
|||
42 43 | DruidCheckOperator()
|
||||
43 44 | PrestoCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:43:1: AIR302 [*] `airflow.operators.presto_check_operator.PrestoCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.PrestoCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:43:1
|
||||
|
|
||||
42 | DruidCheckOperator()
|
||||
43 | PrestoCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
44 | IntervalCheckOperator()
|
||||
45 | SQLIntervalCheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
38 38 | )
|
||||
|
|
@ -195,15 +205,16 @@ AIR302_common_sql.py:43:1: AIR302 [*] `airflow.operators.presto_check_operator.P
|
|||
42 43 | DruidCheckOperator()
|
||||
43 44 | PrestoCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:44:1: AIR302 [*] `airflow.operators.check_operator.IntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.check_operator.IntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:44:1
|
||||
|
|
||||
42 | DruidCheckOperator()
|
||||
43 | PrestoCheckOperator()
|
||||
44 | IntervalCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
45 | SQLIntervalCheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
34 34 |
|
||||
|
|
@ -218,14 +229,15 @@ AIR302_common_sql.py:44:1: AIR302 [*] `airflow.operators.check_operator.Interval
|
|||
42 42 | DruidCheckOperator()
|
||||
43 43 | PrestoCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:45:1: AIR302 [*] `airflow.operators.check_operator.SQLIntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.check_operator.SQLIntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:45:1
|
||||
|
|
||||
43 | PrestoCheckOperator()
|
||||
44 | IntervalCheckOperator()
|
||||
45 | SQLIntervalCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
34 34 |
|
||||
|
|
@ -240,16 +252,17 @@ AIR302_common_sql.py:45:1: AIR302 [*] `airflow.operators.check_operator.SQLInter
|
|||
42 42 | DruidCheckOperator()
|
||||
43 43 | PrestoCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:54:1: AIR302 [*] `airflow.operators.presto_check_operator.IntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.IntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:54:1
|
||||
|
|
||||
52 | from airflow.operators.sql import SQLIntervalCheckOperator
|
||||
53 |
|
||||
54 | IntervalCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
55 | SQLIntervalCheckOperator()
|
||||
56 | PrestoIntervalCheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
50 50 | PrestoIntervalCheckOperator,
|
||||
|
|
@ -260,14 +273,15 @@ AIR302_common_sql.py:54:1: AIR302 [*] `airflow.operators.presto_check_operator.I
|
|||
54 55 | IntervalCheckOperator()
|
||||
55 56 | SQLIntervalCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:55:1: AIR302 [*] `airflow.operators.sql.SQLIntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.sql.SQLIntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:55:1
|
||||
|
|
||||
54 | IntervalCheckOperator()
|
||||
55 | SQLIntervalCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
56 | PrestoIntervalCheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
49 49 | IntervalCheckOperator,
|
||||
|
|
@ -279,14 +293,15 @@ AIR302_common_sql.py:55:1: AIR302 [*] `airflow.operators.sql.SQLIntervalCheckOpe
|
|||
54 54 | IntervalCheckOperator()
|
||||
55 55 | SQLIntervalCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:56:1: AIR302 [*] `airflow.operators.presto_check_operator.PrestoIntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.PrestoIntervalCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:56:1
|
||||
|
|
||||
54 | IntervalCheckOperator()
|
||||
55 | SQLIntervalCheckOperator()
|
||||
56 | PrestoIntervalCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLIntervalCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
50 50 | PrestoIntervalCheckOperator,
|
||||
|
|
@ -297,15 +312,16 @@ AIR302_common_sql.py:56:1: AIR302 [*] `airflow.operators.presto_check_operator.P
|
|||
54 55 | IntervalCheckOperator()
|
||||
55 56 | SQLIntervalCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:64:1: AIR302 [*] `airflow.operators.check_operator.SQLThresholdCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.check_operator.SQLThresholdCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:64:1
|
||||
|
|
||||
62 | )
|
||||
63 |
|
||||
64 | SQLThresholdCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
65 | ThresholdCheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLThresholdCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLThresholdCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
57 57 |
|
||||
|
|
@ -319,13 +335,14 @@ AIR302_common_sql.py:64:1: AIR302 [*] `airflow.operators.check_operator.SQLThres
|
|||
64 64 | SQLThresholdCheckOperator()
|
||||
65 65 | ThresholdCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:65:1: AIR302 [*] `airflow.operators.check_operator.ThresholdCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.check_operator.ThresholdCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:65:1
|
||||
|
|
||||
64 | SQLThresholdCheckOperator()
|
||||
65 | ThresholdCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLThresholdCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLThresholdCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
57 57 |
|
||||
|
|
@ -339,14 +356,15 @@ AIR302_common_sql.py:65:1: AIR302 [*] `airflow.operators.check_operator.Threshol
|
|||
64 64 | SQLThresholdCheckOperator()
|
||||
65 65 | ThresholdCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:70:1: AIR302 [*] `airflow.operators.sql.SQLThresholdCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.sql.SQLThresholdCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:70:1
|
||||
|
|
||||
68 | from airflow.operators.sql import SQLThresholdCheckOperator
|
||||
69 |
|
||||
70 | SQLThresholdCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLThresholdCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLThresholdCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
65 65 | ThresholdCheckOperator()
|
||||
|
|
@ -358,15 +376,16 @@ AIR302_common_sql.py:70:1: AIR302 [*] `airflow.operators.sql.SQLThresholdCheckOp
|
|||
70 70 | SQLThresholdCheckOperator()
|
||||
71 71 |
|
||||
|
||||
AIR302_common_sql.py:78:1: AIR302 [*] `airflow.operators.check_operator.SQLValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.check_operator.SQLValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:78:1
|
||||
|
|
||||
76 | )
|
||||
77 |
|
||||
78 | SQLValueCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
79 | ValueCheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
71 71 |
|
||||
|
|
@ -380,13 +399,14 @@ AIR302_common_sql.py:78:1: AIR302 [*] `airflow.operators.check_operator.SQLValue
|
|||
78 78 | SQLValueCheckOperator()
|
||||
79 79 | ValueCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:79:1: AIR302 [*] `airflow.operators.check_operator.ValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.check_operator.ValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:79:1
|
||||
|
|
||||
78 | SQLValueCheckOperator()
|
||||
79 | ValueCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
71 71 |
|
||||
|
|
@ -400,16 +420,17 @@ AIR302_common_sql.py:79:1: AIR302 [*] `airflow.operators.check_operator.ValueChe
|
|||
78 78 | SQLValueCheckOperator()
|
||||
79 79 | ValueCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:88:1: AIR302 [*] `airflow.operators.sql.SQLValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.sql.SQLValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:88:1
|
||||
|
|
||||
86 | from airflow.operators.sql import SQLValueCheckOperator
|
||||
87 |
|
||||
88 | SQLValueCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
89 | ValueCheckOperator()
|
||||
90 | PrestoValueCheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
83 83 | PrestoValueCheckOperator,
|
||||
|
|
@ -421,14 +442,15 @@ AIR302_common_sql.py:88:1: AIR302 [*] `airflow.operators.sql.SQLValueCheckOperat
|
|||
88 88 | SQLValueCheckOperator()
|
||||
89 89 | ValueCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:89:1: AIR302 [*] `airflow.operators.presto_check_operator.ValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.ValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:89:1
|
||||
|
|
||||
88 | SQLValueCheckOperator()
|
||||
89 | ValueCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
90 | PrestoValueCheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
84 84 | ValueCheckOperator,
|
||||
|
|
@ -439,14 +461,15 @@ AIR302_common_sql.py:89:1: AIR302 [*] `airflow.operators.presto_check_operator.V
|
|||
88 89 | SQLValueCheckOperator()
|
||||
89 90 | ValueCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:90:1: AIR302 [*] `airflow.operators.presto_check_operator.PrestoValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.presto_check_operator.PrestoValueCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:90:1
|
||||
|
|
||||
88 | SQLValueCheckOperator()
|
||||
89 | ValueCheckOperator()
|
||||
90 | PrestoValueCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLValueCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
84 84 | ValueCheckOperator,
|
||||
|
|
@ -457,16 +480,17 @@ AIR302_common_sql.py:90:1: AIR302 [*] `airflow.operators.presto_check_operator.P
|
|||
88 89 | SQLValueCheckOperator()
|
||||
89 90 | ValueCheckOperator()
|
||||
|
||||
AIR302_common_sql.py:102:1: AIR302 [*] `airflow.operators.sql.BaseSQLOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.sql.BaseSQLOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:102:1
|
||||
|
|
||||
100 | )
|
||||
101 |
|
||||
102 | BaseSQLOperator()
|
||||
| ^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^
|
||||
103 | BranchSQLOperator()
|
||||
104 | SQLTableCheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `BaseSQLOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `BaseSQLOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
91 91 |
|
||||
|
|
@ -484,15 +508,16 @@ AIR302_common_sql.py:102:1: AIR302 [*] `airflow.operators.sql.BaseSQLOperator` i
|
|||
102 102 | BaseSQLOperator()
|
||||
103 103 | BranchSQLOperator()
|
||||
|
||||
AIR302_common_sql.py:103:1: AIR302 [*] `airflow.operators.sql.BranchSQLOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.sql.BranchSQLOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:103:1
|
||||
|
|
||||
102 | BaseSQLOperator()
|
||||
103 | BranchSQLOperator()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
104 | SQLTableCheckOperator()
|
||||
105 | SQLColumnCheckOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `BranchSQLOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `BranchSQLOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
92 92 |
|
||||
|
|
@ -509,16 +534,17 @@ AIR302_common_sql.py:103:1: AIR302 [*] `airflow.operators.sql.BranchSQLOperator`
|
|||
102 102 | BaseSQLOperator()
|
||||
103 103 | BranchSQLOperator()
|
||||
|
||||
AIR302_common_sql.py:104:1: AIR302 [*] `airflow.operators.sql.SQLTableCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.sql.SQLTableCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:104:1
|
||||
|
|
||||
102 | BaseSQLOperator()
|
||||
103 | BranchSQLOperator()
|
||||
104 | SQLTableCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
105 | SQLColumnCheckOperator()
|
||||
106 | _convert_to_float_if_possible()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLTableCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.1.0` and use `SQLTableCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
94 94 | BaseSQLOperator,
|
||||
|
|
@ -533,16 +559,17 @@ AIR302_common_sql.py:104:1: AIR302 [*] `airflow.operators.sql.SQLTableCheckOpera
|
|||
102 102 | BaseSQLOperator()
|
||||
103 103 | BranchSQLOperator()
|
||||
|
||||
AIR302_common_sql.py:105:1: AIR302 [*] `airflow.operators.sql.SQLColumnCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.sql.SQLColumnCheckOperator` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:105:1
|
||||
|
|
||||
103 | BranchSQLOperator()
|
||||
104 | SQLTableCheckOperator()
|
||||
105 | SQLColumnCheckOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
106 | _convert_to_float_if_possible()
|
||||
107 | parse_boolean()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `SQLColumnCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `SQLColumnCheckOperator` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
93 93 | from airflow.operators.sql import (
|
||||
|
|
@ -558,15 +585,16 @@ AIR302_common_sql.py:105:1: AIR302 [*] `airflow.operators.sql.SQLColumnCheckOper
|
|||
102 102 | BaseSQLOperator()
|
||||
103 103 | BranchSQLOperator()
|
||||
|
||||
AIR302_common_sql.py:106:1: AIR302 [*] `airflow.operators.sql._convert_to_float_if_possible` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.sql._convert_to_float_if_possible` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:106:1
|
||||
|
|
||||
104 | SQLTableCheckOperator()
|
||||
105 | SQLColumnCheckOperator()
|
||||
106 | _convert_to_float_if_possible()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
107 | parse_boolean()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `_convert_to_float_if_possible` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `_convert_to_float_if_possible` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
95 95 | BranchSQLOperator,
|
||||
|
|
@ -580,14 +608,15 @@ AIR302_common_sql.py:106:1: AIR302 [*] `airflow.operators.sql._convert_to_float_
|
|||
102 102 | BaseSQLOperator()
|
||||
103 103 | BranchSQLOperator()
|
||||
|
||||
AIR302_common_sql.py:107:1: AIR302 [*] `airflow.operators.sql.parse_boolean` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.sql.parse_boolean` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:107:1
|
||||
|
|
||||
105 | SQLColumnCheckOperator()
|
||||
106 | _convert_to_float_if_possible()
|
||||
107 | parse_boolean()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `parse_boolean` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `parse_boolean` from `airflow.providers.common.sql.operators.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
96 96 | SQLColumnCheckOperator,
|
||||
|
|
@ -600,14 +629,15 @@ AIR302_common_sql.py:107:1: AIR302 [*] `airflow.operators.sql.parse_boolean` is
|
|||
102 102 | BaseSQLOperator()
|
||||
103 103 | BranchSQLOperator()
|
||||
|
||||
AIR302_common_sql.py:112:1: AIR302 [*] `airflow.sensors.sql.SqlSensor` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.sql.SqlSensor` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:112:1
|
||||
|
|
||||
110 | from airflow.sensors.sql import SqlSensor
|
||||
111 |
|
||||
112 | SqlSensor()
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `SqlSensor` from `airflow.providers.common.sql.sensors.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `SqlSensor` from `airflow.providers.common.sql.sensors.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
107 107 | parse_boolean()
|
||||
|
|
@ -619,14 +649,15 @@ AIR302_common_sql.py:112:1: AIR302 [*] `airflow.sensors.sql.SqlSensor` is moved
|
|||
112 112 | SqlSensor()
|
||||
113 113 |
|
||||
|
||||
AIR302_common_sql.py:117:1: AIR302 [*] `airflow.sensors.sql_sensor.SqlSensor` is moved into `common-sql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.sql_sensor.SqlSensor` is moved into `common-sql` provider in Airflow 3.0;
|
||||
--> AIR302_common_sql.py:117:1
|
||||
|
|
||||
115 | from airflow.sensors.sql_sensor import SqlSensor
|
||||
116 |
|
||||
117 | SqlSensor()
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `SqlSensor` from `airflow.providers.common.sql.sensors.sql` instead.
|
||||
help: Install `apache-airflow-providers-common-sql>=1.0.0` and use `SqlSensor` from `airflow.providers.common.sql.sensors.sql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
112 112 | SqlSensor()
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_daskexecutor.py:5:1: AIR302 [*] `airflow.executors.dask_executor.DaskExecutor` is moved into `daskexecutor` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.executors.dask_executor.DaskExecutor` is moved into `daskexecutor` provider in Airflow 3.0;
|
||||
--> AIR302_daskexecutor.py:5:1
|
||||
|
|
||||
3 | from airflow.executors.dask_executor import DaskExecutor
|
||||
4 |
|
||||
5 | DaskExecutor()
|
||||
| ^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-daskexecutor>=1.0.0` and use `DaskExecutor` from `airflow.providers.daskexecutor.executors.dask_executor` instead.
|
||||
help: Install `apache-airflow-providers-daskexecutor>=1.0.0` and use `DaskExecutor` from `airflow.providers.daskexecutor.executors.dask_executor` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_druid.py:12:1: AIR302 [*] `airflow.hooks.druid_hook.DruidDbApiHook` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.druid_hook.DruidDbApiHook` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
--> AIR302_druid.py:12:1
|
||||
|
|
||||
10 | )
|
||||
11 |
|
||||
12 | DruidDbApiHook()
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^
|
||||
13 | DruidHook()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-druid>=1.0.0` and use `DruidDbApiHook` from `airflow.providers.apache.druid.hooks.druid` instead.
|
||||
help: Install `apache-airflow-providers-apache-druid>=1.0.0` and use `DruidDbApiHook` from `airflow.providers.apache.druid.hooks.druid` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -27,15 +28,16 @@ AIR302_druid.py:12:1: AIR302 [*] `airflow.hooks.druid_hook.DruidDbApiHook` is mo
|
|||
12 12 | DruidDbApiHook()
|
||||
13 13 | DruidHook()
|
||||
|
||||
AIR302_druid.py:13:1: AIR302 [*] `airflow.hooks.druid_hook.DruidHook` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.druid_hook.DruidHook` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
--> AIR302_druid.py:13:1
|
||||
|
|
||||
12 | DruidDbApiHook()
|
||||
13 | DruidHook()
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^
|
||||
14 |
|
||||
15 | HiveToDruidOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-druid>=1.0.0` and use `DruidHook` from `airflow.providers.apache.druid.hooks.druid` instead.
|
||||
help: Install `apache-airflow-providers-apache-druid>=1.0.0` and use `DruidHook` from `airflow.providers.apache.druid.hooks.druid` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
@ -52,15 +54,16 @@ AIR302_druid.py:13:1: AIR302 [*] `airflow.hooks.druid_hook.DruidHook` is moved i
|
|||
12 12 | DruidDbApiHook()
|
||||
13 13 | DruidHook()
|
||||
|
||||
AIR302_druid.py:15:1: AIR302 [*] `airflow.operators.hive_to_druid.HiveToDruidOperator` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.hive_to_druid.HiveToDruidOperator` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
--> AIR302_druid.py:15:1
|
||||
|
|
||||
13 | DruidHook()
|
||||
14 |
|
||||
15 | HiveToDruidOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
16 | HiveToDruidTransfer()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-druid>=1.0.0` and use `HiveToDruidOperator` from `airflow.providers.apache.druid.transfers.hive_to_druid` instead.
|
||||
help: Install `apache-airflow-providers-apache-druid>=1.0.0` and use `HiveToDruidOperator` from `airflow.providers.apache.druid.transfers.hive_to_druid` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
5 5 | DruidHook,
|
||||
|
|
@ -74,13 +77,14 @@ AIR302_druid.py:15:1: AIR302 [*] `airflow.operators.hive_to_druid.HiveToDruidOpe
|
|||
12 12 | DruidDbApiHook()
|
||||
13 13 | DruidHook()
|
||||
|
||||
AIR302_druid.py:16:1: AIR302 [*] `airflow.operators.hive_to_druid.HiveToDruidTransfer` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.hive_to_druid.HiveToDruidTransfer` is moved into `apache-druid` provider in Airflow 3.0;
|
||||
--> AIR302_druid.py:16:1
|
||||
|
|
||||
15 | HiveToDruidOperator()
|
||||
16 | HiveToDruidTransfer()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-druid>=1.0.0` and use `HiveToDruidOperator` from `airflow.providers.apache.druid.transfers.hive_to_druid` instead.
|
||||
help: Install `apache-airflow-providers-apache-druid>=1.0.0` and use `HiveToDruidOperator` from `airflow.providers.apache.druid.transfers.hive_to_druid` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
5 5 | DruidHook,
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_fab.py:10:1: AIR302 [*] `airflow.api.auth.backend.basic_auth.CLIENT_AUTH` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.api.auth.backend.basic_auth.CLIENT_AUTH` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:10:1
|
||||
|
|
||||
8 | )
|
||||
9 |
|
||||
10 | CLIENT_AUTH
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
11 | init_app()
|
||||
12 | auth_current_user()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `CLIENT_AUTH` from `airflow.providers.fab.auth_manager.api.auth.backend.basic_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `CLIENT_AUTH` from `airflow.providers.fab.auth_manager.api.auth.backend.basic_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -26,15 +27,16 @@ AIR302_fab.py:10:1: AIR302 [*] `airflow.api.auth.backend.basic_auth.CLIENT_AUTH`
|
|||
10 10 | CLIENT_AUTH
|
||||
11 11 | init_app()
|
||||
|
||||
AIR302_fab.py:11:1: AIR302 [*] `airflow.api.auth.backend.basic_auth.init_app` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.api.auth.backend.basic_auth.init_app` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:11:1
|
||||
|
|
||||
10 | CLIENT_AUTH
|
||||
11 | init_app()
|
||||
| ^^^^^^^^ AIR302
|
||||
| ^^^^^^^^
|
||||
12 | auth_current_user()
|
||||
13 | requires_authentication()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `init_app` from `airflow.providers.fab.auth_manager.api.auth.backend.basic_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `init_app` from `airflow.providers.fab.auth_manager.api.auth.backend.basic_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
3 3 | from airflow.api.auth.backend.basic_auth import (
|
||||
|
|
@ -48,15 +50,16 @@ AIR302_fab.py:11:1: AIR302 [*] `airflow.api.auth.backend.basic_auth.init_app` is
|
|||
10 10 | CLIENT_AUTH
|
||||
11 11 | init_app()
|
||||
|
||||
AIR302_fab.py:12:1: AIR302 [*] `airflow.api.auth.backend.basic_auth.auth_current_user` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.api.auth.backend.basic_auth.auth_current_user` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:12:1
|
||||
|
|
||||
10 | CLIENT_AUTH
|
||||
11 | init_app()
|
||||
12 | auth_current_user()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
13 | requires_authentication()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `auth_current_user` from `airflow.providers.fab.auth_manager.api.auth.backend.basic_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `auth_current_user` from `airflow.providers.fab.auth_manager.api.auth.backend.basic_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
@ -71,16 +74,17 @@ AIR302_fab.py:12:1: AIR302 [*] `airflow.api.auth.backend.basic_auth.auth_current
|
|||
10 10 | CLIENT_AUTH
|
||||
11 11 | init_app()
|
||||
|
||||
AIR302_fab.py:13:1: AIR302 [*] `airflow.api.auth.backend.basic_auth.requires_authentication` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.api.auth.backend.basic_auth.requires_authentication` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:13:1
|
||||
|
|
||||
11 | init_app()
|
||||
12 | auth_current_user()
|
||||
13 | requires_authentication()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
14 |
|
||||
15 | from airflow.api.auth.backend.kerberos_auth import (
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `requires_authentication` from `airflow.providers.fab.auth_manager.api.auth.backend.basic_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `requires_authentication` from `airflow.providers.fab.auth_manager.api.auth.backend.basic_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
4 4 | CLIENT_AUTH,
|
||||
|
|
@ -93,16 +97,17 @@ AIR302_fab.py:13:1: AIR302 [*] `airflow.api.auth.backend.basic_auth.requires_aut
|
|||
10 10 | CLIENT_AUTH
|
||||
11 11 | init_app()
|
||||
|
||||
AIR302_fab.py:23:1: AIR302 [*] `airflow.api.auth.backend.kerberos_auth.log` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.log` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:23:1
|
||||
|
|
||||
21 | )
|
||||
22 |
|
||||
23 | log()
|
||||
| ^^^ AIR302
|
||||
| ^^^
|
||||
24 | CLIENT_AUTH
|
||||
25 | find_user()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `log` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `log` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
16 16 | CLIENT_AUTH,
|
||||
|
|
@ -116,15 +121,16 @@ AIR302_fab.py:23:1: AIR302 [*] `airflow.api.auth.backend.kerberos_auth.log` is m
|
|||
23 23 | log()
|
||||
24 24 | CLIENT_AUTH
|
||||
|
||||
AIR302_fab.py:24:1: AIR302 [*] `airflow.api.auth.backend.kerberos_auth.CLIENT_AUTH` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.CLIENT_AUTH` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:24:1
|
||||
|
|
||||
23 | log()
|
||||
24 | CLIENT_AUTH
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
25 | find_user()
|
||||
26 | init_app()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `CLIENT_AUTH` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `CLIENT_AUTH` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
13 13 | requires_authentication()
|
||||
|
|
@ -141,16 +147,17 @@ AIR302_fab.py:24:1: AIR302 [*] `airflow.api.auth.backend.kerberos_auth.CLIENT_AU
|
|||
23 23 | log()
|
||||
24 24 | CLIENT_AUTH
|
||||
|
||||
AIR302_fab.py:25:1: AIR302 [*] `airflow.api.auth.backend.kerberos_auth.find_user` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.find_user` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:25:1
|
||||
|
|
||||
23 | log()
|
||||
24 | CLIENT_AUTH
|
||||
25 | find_user()
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^
|
||||
26 | init_app()
|
||||
27 | requires_authentication()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `find_user` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `find_user` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
14 14 |
|
||||
|
|
@ -166,15 +173,16 @@ AIR302_fab.py:25:1: AIR302 [*] `airflow.api.auth.backend.kerberos_auth.find_user
|
|||
23 23 | log()
|
||||
24 24 | CLIENT_AUTH
|
||||
|
||||
AIR302_fab.py:26:1: AIR302 [*] `airflow.api.auth.backend.kerberos_auth.init_app` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.init_app` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:26:1
|
||||
|
|
||||
24 | CLIENT_AUTH
|
||||
25 | find_user()
|
||||
26 | init_app()
|
||||
| ^^^^^^^^ AIR302
|
||||
| ^^^^^^^^
|
||||
27 | requires_authentication()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `init_app` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `init_app` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
15 15 | from airflow.api.auth.backend.kerberos_auth import (
|
||||
|
|
@ -189,16 +197,17 @@ AIR302_fab.py:26:1: AIR302 [*] `airflow.api.auth.backend.kerberos_auth.init_app`
|
|||
23 23 | log()
|
||||
24 24 | CLIENT_AUTH
|
||||
|
||||
AIR302_fab.py:27:1: AIR302 [*] `airflow.api.auth.backend.kerberos_auth.requires_authentication` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.api.auth.backend.kerberos_auth.requires_authentication` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:27:1
|
||||
|
|
||||
25 | find_user()
|
||||
26 | init_app()
|
||||
27 | requires_authentication()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
28 |
|
||||
29 | from airflow.auth.managers.fab.api.auth.backend.kerberos_auth import (
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `requires_authentication` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `requires_authentication` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
17 17 | find_user,
|
||||
|
|
@ -211,16 +220,17 @@ AIR302_fab.py:27:1: AIR302 [*] `airflow.api.auth.backend.kerberos_auth.requires_
|
|||
23 23 | log()
|
||||
24 24 | CLIENT_AUTH
|
||||
|
||||
AIR302_fab.py:37:1: AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.log` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.log` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:37:1
|
||||
|
|
||||
35 | )
|
||||
36 |
|
||||
37 | log()
|
||||
| ^^^ AIR302
|
||||
| ^^^
|
||||
38 | CLIENT_AUTH
|
||||
39 | find_user()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `log` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `log` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
30 30 | CLIENT_AUTH,
|
||||
|
|
@ -234,15 +244,16 @@ AIR302_fab.py:37:1: AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerbe
|
|||
37 37 | log()
|
||||
38 38 | CLIENT_AUTH
|
||||
|
||||
AIR302_fab.py:38:1: AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.CLIENT_AUTH` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.CLIENT_AUTH` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:38:1
|
||||
|
|
||||
37 | log()
|
||||
38 | CLIENT_AUTH
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
39 | find_user()
|
||||
40 | init_app()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `CLIENT_AUTH` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `CLIENT_AUTH` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
27 27 | requires_authentication()
|
||||
|
|
@ -259,16 +270,17 @@ AIR302_fab.py:38:1: AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerbe
|
|||
37 37 | log()
|
||||
38 38 | CLIENT_AUTH
|
||||
|
||||
AIR302_fab.py:39:1: AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.find_user` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.find_user` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:39:1
|
||||
|
|
||||
37 | log()
|
||||
38 | CLIENT_AUTH
|
||||
39 | find_user()
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^
|
||||
40 | init_app()
|
||||
41 | requires_authentication()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `find_user` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `find_user` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
28 28 |
|
||||
|
|
@ -284,15 +296,16 @@ AIR302_fab.py:39:1: AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerbe
|
|||
37 37 | log()
|
||||
38 38 | CLIENT_AUTH
|
||||
|
||||
AIR302_fab.py:40:1: AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.init_app` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.init_app` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:40:1
|
||||
|
|
||||
38 | CLIENT_AUTH
|
||||
39 | find_user()
|
||||
40 | init_app()
|
||||
| ^^^^^^^^ AIR302
|
||||
| ^^^^^^^^
|
||||
41 | requires_authentication()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `init_app` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `init_app` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
29 29 | from airflow.auth.managers.fab.api.auth.backend.kerberos_auth import (
|
||||
|
|
@ -307,16 +320,17 @@ AIR302_fab.py:40:1: AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerbe
|
|||
37 37 | log()
|
||||
38 38 | CLIENT_AUTH
|
||||
|
||||
AIR302_fab.py:41:1: AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.requires_authentication` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerberos_auth.requires_authentication` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:41:1
|
||||
|
|
||||
39 | find_user()
|
||||
40 | init_app()
|
||||
41 | requires_authentication()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
42 |
|
||||
43 | from airflow.auth.managers.fab.fab_auth_manager import FabAuthManager
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `requires_authentication` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `requires_authentication` from `airflow.providers.fab.auth_manager.api.auth.backend.kerberos_auth` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
31 31 | find_user,
|
||||
|
|
@ -329,16 +343,17 @@ AIR302_fab.py:41:1: AIR302 [*] `airflow.auth.managers.fab.api.auth.backend.kerbe
|
|||
37 37 | log()
|
||||
38 38 | CLIENT_AUTH
|
||||
|
||||
AIR302_fab.py:49:1: AIR302 [*] `airflow.auth.managers.fab.fab_auth_manager.FabAuthManager` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.auth.managers.fab.fab_auth_manager.FabAuthManager` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:49:1
|
||||
|
|
||||
47 | )
|
||||
48 |
|
||||
49 | FabAuthManager()
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^
|
||||
50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
51 | FabAirflowSecurityManagerOverride()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `FabAuthManager` from `airflow.providers.fab.auth_manager.fab_auth_manager` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `FabAuthManager` from `airflow.providers.fab.auth_manager.fab_auth_manager` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
40 40 | init_app()
|
||||
|
|
@ -354,14 +369,15 @@ AIR302_fab.py:49:1: AIR302 [*] `airflow.auth.managers.fab.fab_auth_manager.FabAu
|
|||
49 49 | FabAuthManager()
|
||||
50 50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
|
||||
AIR302_fab.py:50:1: AIR302 [*] `airflow.auth.managers.fab.security_manager.override.MAX_NUM_DATABASE_USER_SESSIONS` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.auth.managers.fab.security_manager.override.MAX_NUM_DATABASE_USER_SESSIONS` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:50:1
|
||||
|
|
||||
49 | FabAuthManager()
|
||||
50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
51 | FabAirflowSecurityManagerOverride()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `MAX_NUM_DATABASE_USER_SESSIONS` from `airflow.providers.fab.auth_manager.security_manager.override` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `MAX_NUM_DATABASE_USER_SESSIONS` from `airflow.providers.fab.auth_manager.security_manager.override` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
42 42 |
|
||||
|
|
@ -375,16 +391,17 @@ AIR302_fab.py:50:1: AIR302 [*] `airflow.auth.managers.fab.security_manager.overr
|
|||
49 49 | FabAuthManager()
|
||||
50 50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
|
||||
AIR302_fab.py:51:1: AIR302 [*] `airflow.auth.managers.fab.security_manager.override.FabAirflowSecurityManagerOverride` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.auth.managers.fab.security_manager.override.FabAirflowSecurityManagerOverride` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:51:1
|
||||
|
|
||||
49 | FabAuthManager()
|
||||
50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
51 | FabAirflowSecurityManagerOverride()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
52 |
|
||||
53 | from airflow.www.security import FabAirflowSecurityManagerOverride
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `FabAirflowSecurityManagerOverride` from `airflow.providers.fab.auth_manager.security_manager.override` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `FabAirflowSecurityManagerOverride` from `airflow.providers.fab.auth_manager.security_manager.override` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
43 43 | from airflow.auth.managers.fab.fab_auth_manager import FabAuthManager
|
||||
|
|
@ -397,14 +414,15 @@ AIR302_fab.py:51:1: AIR302 [*] `airflow.auth.managers.fab.security_manager.overr
|
|||
49 49 | FabAuthManager()
|
||||
50 50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
|
||||
AIR302_fab.py:55:1: AIR302 [*] `airflow.www.security.FabAirflowSecurityManagerOverride` is moved into `fab` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.www.security.FabAirflowSecurityManagerOverride` is moved into `fab` provider in Airflow 3.0;
|
||||
--> AIR302_fab.py:55:1
|
||||
|
|
||||
53 | from airflow.www.security import FabAirflowSecurityManagerOverride
|
||||
54 |
|
||||
55 | FabAirflowSecurityManagerOverride()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-fab>=1.0.0` and use `FabAirflowSecurityManagerOverride` from `airflow.providers.fab.auth_manager.security_manager.override` instead.
|
||||
help: Install `apache-airflow-providers-fab>=1.0.0` and use `FabAirflowSecurityManagerOverride` from `airflow.providers.fab.auth_manager.security_manager.override` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
50 50 | MAX_NUM_DATABASE_USER_SESSIONS
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_hdfs.py:6:1: AIR302 [*] `airflow.hooks.webhdfs_hook.WebHDFSHook` is moved into `apache-hdfs` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.webhdfs_hook.WebHDFSHook` is moved into `apache-hdfs` provider in Airflow 3.0;
|
||||
--> AIR302_hdfs.py:6:1
|
||||
|
|
||||
4 | from airflow.sensors.web_hdfs_sensor import WebHdfsSensor
|
||||
5 |
|
||||
6 | WebHDFSHook()
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
7 | WebHdfsSensor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hdfs>=1.0.0` and use `WebHDFSHook` from `airflow.providers.apache.hdfs.hooks.webhdfs` instead.
|
||||
help: Install `apache-airflow-providers-apache-hdfs>=1.0.0` and use `WebHDFSHook` from `airflow.providers.apache.hdfs.hooks.webhdfs` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -21,13 +22,14 @@ AIR302_hdfs.py:6:1: AIR302 [*] `airflow.hooks.webhdfs_hook.WebHDFSHook` is moved
|
|||
6 6 | WebHDFSHook()
|
||||
7 7 | WebHdfsSensor()
|
||||
|
||||
AIR302_hdfs.py:7:1: AIR302 [*] `airflow.sensors.web_hdfs_sensor.WebHdfsSensor` is moved into `apache-hdfs` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.web_hdfs_sensor.WebHdfsSensor` is moved into `apache-hdfs` provider in Airflow 3.0;
|
||||
--> AIR302_hdfs.py:7:1
|
||||
|
|
||||
6 | WebHDFSHook()
|
||||
7 | WebHdfsSensor()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hdfs>=1.0.0` and use `WebHdfsSensor` from `airflow.providers.apache.hdfs.sensors.web_hdfs` instead.
|
||||
help: Install `apache-airflow-providers-apache-hdfs>=1.0.0` and use `WebHdfsSensor` from `airflow.providers.apache.hdfs.sensors.web_hdfs` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_hive.py:18:1: AIR302 [*] `airflow.hooks.hive_hooks.HIVE_QUEUE_PRIORITIES` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.hive_hooks.HIVE_QUEUE_PRIORITIES` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:18:1
|
||||
|
|
||||
16 | from airflow.operators.hive_to_samba_operator import HiveToSambaOperator
|
||||
17 |
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
19 | HiveCliHook()
|
||||
20 | HiveMetastoreHook()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HIVE_QUEUE_PRIORITIES` from `airflow.providers.apache.hive.hooks.hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HIVE_QUEUE_PRIORITIES` from `airflow.providers.apache.hive.hooks.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -29,15 +30,16 @@ AIR302_hive.py:18:1: AIR302 [*] `airflow.hooks.hive_hooks.HIVE_QUEUE_PRIORITIES`
|
|||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
|
||||
AIR302_hive.py:19:1: AIR302 [*] `airflow.hooks.hive_hooks.HiveCliHook` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.hive_hooks.HiveCliHook` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:19:1
|
||||
|
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
19 | HiveCliHook()
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
20 | HiveMetastoreHook()
|
||||
21 | HiveServer2Hook()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveCliHook` from `airflow.providers.apache.hive.hooks.hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveCliHook` from `airflow.providers.apache.hive.hooks.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
@ -56,15 +58,16 @@ AIR302_hive.py:19:1: AIR302 [*] `airflow.hooks.hive_hooks.HiveCliHook` is moved
|
|||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
|
||||
AIR302_hive.py:20:1: AIR302 [*] `airflow.hooks.hive_hooks.HiveMetastoreHook` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.hive_hooks.HiveMetastoreHook` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:20:1
|
||||
|
|
||||
18 | HIVE_QUEUE_PRIORITIES
|
||||
19 | HiveCliHook()
|
||||
20 | HiveMetastoreHook()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
21 | HiveServer2Hook()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveMetastoreHook` from `airflow.providers.apache.hive.hooks.hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveMetastoreHook` from `airflow.providers.apache.hive.hooks.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
3 3 | from airflow.hooks.hive_hooks import (
|
||||
|
|
@ -83,16 +86,17 @@ AIR302_hive.py:20:1: AIR302 [*] `airflow.hooks.hive_hooks.HiveMetastoreHook` is
|
|||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
|
||||
AIR302_hive.py:21:1: AIR302 [*] `airflow.hooks.hive_hooks.HiveServer2Hook` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.hive_hooks.HiveServer2Hook` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:21:1
|
||||
|
|
||||
19 | HiveCliHook()
|
||||
20 | HiveMetastoreHook()
|
||||
21 | HiveServer2Hook()
|
||||
| ^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^
|
||||
22 |
|
||||
23 | closest_ds_partition()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveServer2Hook` from `airflow.providers.apache.hive.hooks.hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveServer2Hook` from `airflow.providers.apache.hive.hooks.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
4 4 | HIVE_QUEUE_PRIORITIES,
|
||||
|
|
@ -111,15 +115,16 @@ AIR302_hive.py:21:1: AIR302 [*] `airflow.hooks.hive_hooks.HiveServer2Hook` is mo
|
|||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
|
||||
AIR302_hive.py:23:1: AIR302 [*] `airflow.macros.hive.closest_ds_partition` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.macros.hive.closest_ds_partition` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:23:1
|
||||
|
|
||||
21 | HiveServer2Hook()
|
||||
22 |
|
||||
23 | closest_ds_partition()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
24 | max_partition()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=5.1.0` and use `closest_ds_partition` from `airflow.providers.apache.hive.macros.hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=5.1.0` and use `closest_ds_partition` from `airflow.providers.apache.hive.macros.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
7 7 | HiveServer2Hook,
|
||||
|
|
@ -137,15 +142,16 @@ AIR302_hive.py:23:1: AIR302 [*] `airflow.macros.hive.closest_ds_partition` is mo
|
|||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
|
||||
AIR302_hive.py:24:1: AIR302 [*] `airflow.macros.hive.max_partition` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.macros.hive.max_partition` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:24:1
|
||||
|
|
||||
23 | closest_ds_partition()
|
||||
24 | max_partition()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
25 |
|
||||
26 | HiveOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=5.1.0` and use `max_partition` from `airflow.providers.apache.hive.macros.hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=5.1.0` and use `max_partition` from `airflow.providers.apache.hive.macros.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
8 8 | )
|
||||
|
|
@ -162,16 +168,17 @@ AIR302_hive.py:24:1: AIR302 [*] `airflow.macros.hive.max_partition` is moved int
|
|||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
|
||||
AIR302_hive.py:26:1: AIR302 [*] `airflow.operators.hive_operator.HiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.hive_operator.HiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:26:1
|
||||
|
|
||||
24 | max_partition()
|
||||
25 |
|
||||
26 | HiveOperator()
|
||||
| ^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^
|
||||
27 | HiveStatsCollectionOperator()
|
||||
28 | HiveToMySqlOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveOperator` from `airflow.providers.apache.hive.operators.hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveOperator` from `airflow.providers.apache.hive.operators.hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
10 10 | closest_ds_partition,
|
||||
|
|
@ -186,15 +193,16 @@ AIR302_hive.py:26:1: AIR302 [*] `airflow.operators.hive_operator.HiveOperator` i
|
|||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
|
||||
AIR302_hive.py:27:1: AIR302 [*] `airflow.operators.hive_stats_operator.HiveStatsCollectionOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.hive_stats_operator.HiveStatsCollectionOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:27:1
|
||||
|
|
||||
26 | HiveOperator()
|
||||
27 | HiveStatsCollectionOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
28 | HiveToMySqlOperator()
|
||||
29 | HiveToSambaOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveStatsCollectionOperator` from `airflow.providers.apache.hive.operators.hive_stats` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveStatsCollectionOperator` from `airflow.providers.apache.hive.operators.hive_stats` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
11 11 | max_partition,
|
||||
|
|
@ -208,15 +216,16 @@ AIR302_hive.py:27:1: AIR302 [*] `airflow.operators.hive_stats_operator.HiveStats
|
|||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
|
||||
AIR302_hive.py:28:1: AIR302 [*] `airflow.operators.hive_to_mysql.HiveToMySqlOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.hive_to_mysql.HiveToMySqlOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:28:1
|
||||
|
|
||||
26 | HiveOperator()
|
||||
27 | HiveStatsCollectionOperator()
|
||||
28 | HiveToMySqlOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
29 | HiveToSambaOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveToMySqlOperator` from `airflow.providers.apache.hive.transfers.hive_to_mysql` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveToMySqlOperator` from `airflow.providers.apache.hive.transfers.hive_to_mysql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | )
|
||||
|
|
@ -229,14 +238,15 @@ AIR302_hive.py:28:1: AIR302 [*] `airflow.operators.hive_to_mysql.HiveToMySqlOper
|
|||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
|
||||
AIR302_hive.py:29:1: AIR302 [*] `airflow.operators.hive_to_samba_operator.HiveToSambaOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.hive_to_samba_operator.HiveToSambaOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:29:1
|
||||
|
|
||||
27 | HiveStatsCollectionOperator()
|
||||
28 | HiveToMySqlOperator()
|
||||
29 | HiveToSambaOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveToSambaOperator` from `airflow.providers.apache.hive.transfers.hive_to_samba` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveToSambaOperator` from `airflow.providers.apache.hive.transfers.hive_to_samba` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
13 13 | from airflow.operators.hive_operator import HiveOperator
|
||||
|
|
@ -248,16 +258,17 @@ AIR302_hive.py:29:1: AIR302 [*] `airflow.operators.hive_to_samba_operator.HiveTo
|
|||
18 18 | HIVE_QUEUE_PRIORITIES
|
||||
19 19 | HiveCliHook()
|
||||
|
||||
AIR302_hive.py:34:1: AIR302 [*] `airflow.operators.hive_to_mysql.HiveToMySqlTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.hive_to_mysql.HiveToMySqlTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:34:1
|
||||
|
|
||||
32 | from airflow.operators.hive_to_mysql import HiveToMySqlTransfer
|
||||
33 |
|
||||
34 | HiveToMySqlTransfer()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
35 |
|
||||
36 | from airflow.operators.mysql_to_hive import MySqlToHiveOperator
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveToMySqlOperator` from `airflow.providers.apache.hive.transfers.hive_to_mysql` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HiveToMySqlOperator` from `airflow.providers.apache.hive.transfers.hive_to_mysql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
30 30 |
|
||||
|
|
@ -268,16 +279,17 @@ AIR302_hive.py:34:1: AIR302 [*] `airflow.operators.hive_to_mysql.HiveToMySqlTran
|
|||
34 35 | HiveToMySqlTransfer()
|
||||
35 36 |
|
||||
|
||||
AIR302_hive.py:38:1: AIR302 [*] `airflow.operators.mysql_to_hive.MySqlToHiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.mysql_to_hive.MySqlToHiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:38:1
|
||||
|
|
||||
36 | from airflow.operators.mysql_to_hive import MySqlToHiveOperator
|
||||
37 |
|
||||
38 | MySqlToHiveOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
39 |
|
||||
40 | from airflow.operators.mysql_to_hive import MySqlToHiveTransfer
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MySqlToHiveOperator` from `airflow.providers.apache.hive.transfers.mysql_to_hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MySqlToHiveOperator` from `airflow.providers.apache.hive.transfers.mysql_to_hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
33 33 |
|
||||
|
|
@ -289,16 +301,17 @@ AIR302_hive.py:38:1: AIR302 [*] `airflow.operators.mysql_to_hive.MySqlToHiveOper
|
|||
38 38 | MySqlToHiveOperator()
|
||||
39 39 |
|
||||
|
||||
AIR302_hive.py:42:1: AIR302 [*] `airflow.operators.mysql_to_hive.MySqlToHiveTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.mysql_to_hive.MySqlToHiveTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:42:1
|
||||
|
|
||||
40 | from airflow.operators.mysql_to_hive import MySqlToHiveTransfer
|
||||
41 |
|
||||
42 | MySqlToHiveTransfer()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
43 |
|
||||
44 | from airflow.operators.mssql_to_hive import MsSqlToHiveOperator
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MySqlToHiveOperator` from `airflow.providers.apache.hive.transfers.mysql_to_hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MySqlToHiveOperator` from `airflow.providers.apache.hive.transfers.mysql_to_hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
38 38 | MySqlToHiveOperator()
|
||||
|
|
@ -309,16 +322,17 @@ AIR302_hive.py:42:1: AIR302 [*] `airflow.operators.mysql_to_hive.MySqlToHiveTran
|
|||
42 43 | MySqlToHiveTransfer()
|
||||
43 44 |
|
||||
|
||||
AIR302_hive.py:46:1: AIR302 [*] `airflow.operators.mssql_to_hive.MsSqlToHiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.mssql_to_hive.MsSqlToHiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:46:1
|
||||
|
|
||||
44 | from airflow.operators.mssql_to_hive import MsSqlToHiveOperator
|
||||
45 |
|
||||
46 | MsSqlToHiveOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
47 |
|
||||
48 | from airflow.operators.mssql_to_hive import MsSqlToHiveTransfer
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MsSqlToHiveOperator` from `airflow.providers.apache.hive.transfers.mssql_to_hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MsSqlToHiveOperator` from `airflow.providers.apache.hive.transfers.mssql_to_hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
41 41 |
|
||||
|
|
@ -330,16 +344,17 @@ AIR302_hive.py:46:1: AIR302 [*] `airflow.operators.mssql_to_hive.MsSqlToHiveOper
|
|||
46 46 | MsSqlToHiveOperator()
|
||||
47 47 |
|
||||
|
||||
AIR302_hive.py:50:1: AIR302 [*] `airflow.operators.mssql_to_hive.MsSqlToHiveTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.mssql_to_hive.MsSqlToHiveTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:50:1
|
||||
|
|
||||
48 | from airflow.operators.mssql_to_hive import MsSqlToHiveTransfer
|
||||
49 |
|
||||
50 | MsSqlToHiveTransfer()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
51 |
|
||||
52 | from airflow.operators.s3_to_hive_operator import S3ToHiveOperator
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MsSqlToHiveOperator` from `airflow.providers.apache.hive.transfers.mssql_to_hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MsSqlToHiveOperator` from `airflow.providers.apache.hive.transfers.mssql_to_hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
46 46 | MsSqlToHiveOperator()
|
||||
|
|
@ -350,16 +365,17 @@ AIR302_hive.py:50:1: AIR302 [*] `airflow.operators.mssql_to_hive.MsSqlToHiveTran
|
|||
50 51 | MsSqlToHiveTransfer()
|
||||
51 52 |
|
||||
|
||||
AIR302_hive.py:54:1: AIR302 [*] `airflow.operators.s3_to_hive_operator.S3ToHiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.s3_to_hive_operator.S3ToHiveOperator` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:54:1
|
||||
|
|
||||
52 | from airflow.operators.s3_to_hive_operator import S3ToHiveOperator
|
||||
53 |
|
||||
54 | S3ToHiveOperator()
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
55 |
|
||||
56 | from airflow.operators.s3_to_hive_operator import S3ToHiveTransfer
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `S3ToHiveOperator` from `airflow.providers.apache.hive.transfers.s3_to_hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `S3ToHiveOperator` from `airflow.providers.apache.hive.transfers.s3_to_hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
49 49 |
|
||||
|
|
@ -371,16 +387,17 @@ AIR302_hive.py:54:1: AIR302 [*] `airflow.operators.s3_to_hive_operator.S3ToHiveO
|
|||
54 54 | S3ToHiveOperator()
|
||||
55 55 |
|
||||
|
||||
AIR302_hive.py:58:1: AIR302 [*] `airflow.operators.s3_to_hive_operator.S3ToHiveTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.s3_to_hive_operator.S3ToHiveTransfer` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:58:1
|
||||
|
|
||||
56 | from airflow.operators.s3_to_hive_operator import S3ToHiveTransfer
|
||||
57 |
|
||||
58 | S3ToHiveTransfer()
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
59 |
|
||||
60 | from airflow.sensors.hive_partition_sensor import HivePartitionSensor
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `S3ToHiveOperator` from `airflow.providers.apache.hive.transfers.s3_to_hive` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `S3ToHiveOperator` from `airflow.providers.apache.hive.transfers.s3_to_hive` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
54 54 | S3ToHiveOperator()
|
||||
|
|
@ -391,16 +408,17 @@ AIR302_hive.py:58:1: AIR302 [*] `airflow.operators.s3_to_hive_operator.S3ToHiveT
|
|||
58 59 | S3ToHiveTransfer()
|
||||
59 60 |
|
||||
|
||||
AIR302_hive.py:62:1: AIR302 [*] `airflow.sensors.hive_partition_sensor.HivePartitionSensor` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.hive_partition_sensor.HivePartitionSensor` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:62:1
|
||||
|
|
||||
60 | from airflow.sensors.hive_partition_sensor import HivePartitionSensor
|
||||
61 |
|
||||
62 | HivePartitionSensor()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
63 |
|
||||
64 | from airflow.sensors.metastore_partition_sensor import MetastorePartitionSensor
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HivePartitionSensor` from `airflow.providers.apache.hive.sensors.hive_partition` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `HivePartitionSensor` from `airflow.providers.apache.hive.sensors.hive_partition` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
57 57 |
|
||||
|
|
@ -412,16 +430,17 @@ AIR302_hive.py:62:1: AIR302 [*] `airflow.sensors.hive_partition_sensor.HiveParti
|
|||
62 62 | HivePartitionSensor()
|
||||
63 63 |
|
||||
|
||||
AIR302_hive.py:66:1: AIR302 [*] `airflow.sensors.metastore_partition_sensor.MetastorePartitionSensor` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.metastore_partition_sensor.MetastorePartitionSensor` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:66:1
|
||||
|
|
||||
64 | from airflow.sensors.metastore_partition_sensor import MetastorePartitionSensor
|
||||
65 |
|
||||
66 | MetastorePartitionSensor()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
67 |
|
||||
68 | from airflow.sensors.named_hive_partition_sensor import NamedHivePartitionSensor
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MetastorePartitionSensor` from `airflow.providers.apache.hive.sensors.metastore_partition` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `MetastorePartitionSensor` from `airflow.providers.apache.hive.sensors.metastore_partition` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
61 61 |
|
||||
|
|
@ -433,14 +452,15 @@ AIR302_hive.py:66:1: AIR302 [*] `airflow.sensors.metastore_partition_sensor.Meta
|
|||
66 66 | MetastorePartitionSensor()
|
||||
67 67 |
|
||||
|
||||
AIR302_hive.py:70:1: AIR302 [*] `airflow.sensors.named_hive_partition_sensor.NamedHivePartitionSensor` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.named_hive_partition_sensor.NamedHivePartitionSensor` is moved into `apache-hive` provider in Airflow 3.0;
|
||||
--> AIR302_hive.py:70:1
|
||||
|
|
||||
68 | from airflow.sensors.named_hive_partition_sensor import NamedHivePartitionSensor
|
||||
69 |
|
||||
70 | NamedHivePartitionSensor()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `NamedHivePartitionSensor` from `airflow.providers.apache.hive.sensors.named_hive_partition` instead.
|
||||
help: Install `apache-airflow-providers-apache-hive>=1.0.0` and use `NamedHivePartitionSensor` from `airflow.providers.apache.hive.sensors.named_hive_partition` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
65 65 |
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_http.py:7:1: AIR302 [*] `airflow.hooks.http_hook.HttpHook` is moved into `http` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.http_hook.HttpHook` is moved into `http` provider in Airflow 3.0;
|
||||
--> AIR302_http.py:7:1
|
||||
|
|
||||
5 | from airflow.sensors.http_sensor import HttpSensor
|
||||
6 |
|
||||
7 | HttpHook()
|
||||
| ^^^^^^^^ AIR302
|
||||
| ^^^^^^^^
|
||||
8 | SimpleHttpOperator()
|
||||
9 | HttpSensor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-http>=1.0.0` and use `HttpHook` from `airflow.providers.http.hooks.http` instead.
|
||||
help: Install `apache-airflow-providers-http>=1.0.0` and use `HttpHook` from `airflow.providers.http.hooks.http` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -23,14 +24,15 @@ AIR302_http.py:7:1: AIR302 [*] `airflow.hooks.http_hook.HttpHook` is moved into
|
|||
7 7 | HttpHook()
|
||||
8 8 | SimpleHttpOperator()
|
||||
|
||||
AIR302_http.py:8:1: AIR302 [*] `airflow.operators.http_operator.SimpleHttpOperator` is moved into `http` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.http_operator.SimpleHttpOperator` is moved into `http` provider in Airflow 3.0;
|
||||
--> AIR302_http.py:8:1
|
||||
|
|
||||
7 | HttpHook()
|
||||
8 | SimpleHttpOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
9 | HttpSensor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-http>=5.0.0` and use `HttpOperator` from `airflow.providers.http.operators.http` instead.
|
||||
help: Install `apache-airflow-providers-http>=5.0.0` and use `HttpOperator` from `airflow.providers.http.operators.http` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
3 3 | from airflow.hooks.http_hook import HttpHook
|
||||
|
|
@ -43,14 +45,15 @@ AIR302_http.py:8:1: AIR302 [*] `airflow.operators.http_operator.SimpleHttpOperat
|
|||
9 |+HttpOperator()
|
||||
9 10 | HttpSensor()
|
||||
|
||||
AIR302_http.py:9:1: AIR302 [*] `airflow.sensors.http_sensor.HttpSensor` is moved into `http` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.http_sensor.HttpSensor` is moved into `http` provider in Airflow 3.0;
|
||||
--> AIR302_http.py:9:1
|
||||
|
|
||||
7 | HttpHook()
|
||||
8 | SimpleHttpOperator()
|
||||
9 | HttpSensor()
|
||||
| ^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-http>=1.0.0` and use `HttpSensor` from `airflow.providers.http.sensors.http` instead.
|
||||
help: Install `apache-airflow-providers-http>=1.0.0` and use `HttpSensor` from `airflow.providers.http.sensors.http` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_jdbc.py:8:1: AIR302 [*] `airflow.hooks.jdbc_hook.JdbcHook` is moved into `jdbc` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.jdbc_hook.JdbcHook` is moved into `jdbc` provider in Airflow 3.0;
|
||||
--> AIR302_jdbc.py:8:1
|
||||
|
|
||||
6 | )
|
||||
7 |
|
||||
8 | JdbcHook()
|
||||
| ^^^^^^^^ AIR302
|
||||
| ^^^^^^^^
|
||||
9 | jaydebeapi()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-jdbc>=1.0.0` and use `JdbcHook` from `airflow.providers.jdbc.hooks.jdbc` instead.
|
||||
help: Install `apache-airflow-providers-jdbc>=1.0.0` and use `JdbcHook` from `airflow.providers.jdbc.hooks.jdbc` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -23,13 +24,14 @@ AIR302_jdbc.py:8:1: AIR302 [*] `airflow.hooks.jdbc_hook.JdbcHook` is moved into
|
|||
8 8 | JdbcHook()
|
||||
9 9 | jaydebeapi()
|
||||
|
||||
AIR302_jdbc.py:9:1: AIR302 [*] `airflow.hooks.jdbc_hook.jaydebeapi` is moved into `jdbc` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.jdbc_hook.jaydebeapi` is moved into `jdbc` provider in Airflow 3.0;
|
||||
--> AIR302_jdbc.py:9:1
|
||||
|
|
||||
8 | JdbcHook()
|
||||
9 | jaydebeapi()
|
||||
| ^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-jdbc>=1.0.0` and use `jaydebeapi` from `airflow.providers.jdbc.hooks.jdbc` instead.
|
||||
help: Install `apache-airflow-providers-jdbc>=1.0.0` and use `jaydebeapi` from `airflow.providers.jdbc.hooks.jdbc` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_kubernetes.py:22:1: AIR302 [*] `airflow.executors.kubernetes_executor_types.ALL_NAMESPACES` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.executors.kubernetes_executor_types.ALL_NAMESPACES` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:22:1
|
||||
|
|
||||
20 | )
|
||||
21 |
|
||||
22 | ALL_NAMESPACES
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^
|
||||
23 | POD_EXECUTOR_DONE_KEY
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `ALL_NAMESPACES` from `airflow.providers.cncf.kubernetes.executors.kubernetes_executor_types` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `ALL_NAMESPACES` from `airflow.providers.cncf.kubernetes.executors.kubernetes_executor_types` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -28,15 +29,16 @@ AIR302_kubernetes.py:22:1: AIR302 [*] `airflow.executors.kubernetes_executor_typ
|
|||
22 22 | ALL_NAMESPACES
|
||||
23 23 | POD_EXECUTOR_DONE_KEY
|
||||
|
||||
AIR302_kubernetes.py:23:1: AIR302 [*] `airflow.executors.kubernetes_executor_types.POD_EXECUTOR_DONE_KEY` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.executors.kubernetes_executor_types.POD_EXECUTOR_DONE_KEY` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:23:1
|
||||
|
|
||||
22 | ALL_NAMESPACES
|
||||
23 | POD_EXECUTOR_DONE_KEY
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
24 |
|
||||
25 | K8SModel()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `POD_EXECUTOR_DONE_KEY` from `airflow.providers.cncf.kubernetes.executors.kubernetes_executor_types` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `POD_EXECUTOR_DONE_KEY` from `airflow.providers.cncf.kubernetes.executors.kubernetes_executor_types` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
@ -55,15 +57,16 @@ AIR302_kubernetes.py:23:1: AIR302 [*] `airflow.executors.kubernetes_executor_typ
|
|||
22 22 | ALL_NAMESPACES
|
||||
23 23 | POD_EXECUTOR_DONE_KEY
|
||||
|
||||
AIR302_kubernetes.py:25:1: AIR302 [*] `airflow.kubernetes.k8s_model.K8SModel` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.k8s_model.K8SModel` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:25:1
|
||||
|
|
||||
23 | POD_EXECUTOR_DONE_KEY
|
||||
24 |
|
||||
25 | K8SModel()
|
||||
| ^^^^^^^^ AIR302
|
||||
| ^^^^^^^^
|
||||
26 | append_to_pod()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `K8SModel` from `airflow.providers.cncf.kubernetes.k8s_model` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `K8SModel` from `airflow.providers.cncf.kubernetes.k8s_model` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
5 5 | POD_EXECUTOR_DONE_KEY,
|
||||
|
|
@ -82,15 +85,16 @@ AIR302_kubernetes.py:25:1: AIR302 [*] `airflow.kubernetes.k8s_model.K8SModel` is
|
|||
22 22 | ALL_NAMESPACES
|
||||
23 23 | POD_EXECUTOR_DONE_KEY
|
||||
|
||||
AIR302_kubernetes.py:26:1: AIR302 [*] `airflow.kubernetes.k8s_model.append_to_pod` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.k8s_model.append_to_pod` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:26:1
|
||||
|
|
||||
25 | K8SModel()
|
||||
26 | append_to_pod()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
27 |
|
||||
28 | _disable_verify_ssl()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `append_to_pod` from `airflow.providers.cncf.kubernetes.k8s_model` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `append_to_pod` from `airflow.providers.cncf.kubernetes.k8s_model` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
6 6 | )
|
||||
|
|
@ -109,16 +113,17 @@ AIR302_kubernetes.py:26:1: AIR302 [*] `airflow.kubernetes.k8s_model.append_to_po
|
|||
22 22 | ALL_NAMESPACES
|
||||
23 23 | POD_EXECUTOR_DONE_KEY
|
||||
|
||||
AIR302_kubernetes.py:28:1: AIR302 [*] `airflow.kubernetes.kube_client._disable_verify_ssl` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.kube_client._disable_verify_ssl` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:28:1
|
||||
|
|
||||
26 | append_to_pod()
|
||||
27 |
|
||||
28 | _disable_verify_ssl()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
29 | _enable_tcp_keepalive()
|
||||
30 | get_kube_client()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `_disable_verify_ssl` from `airflow.providers.cncf.kubernetes.kube_client` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `_disable_verify_ssl` from `airflow.providers.cncf.kubernetes.kube_client` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
9 9 | append_to_pod,
|
||||
|
|
@ -137,14 +142,15 @@ AIR302_kubernetes.py:28:1: AIR302 [*] `airflow.kubernetes.kube_client._disable_v
|
|||
22 22 | ALL_NAMESPACES
|
||||
23 23 | POD_EXECUTOR_DONE_KEY
|
||||
|
||||
AIR302_kubernetes.py:29:1: AIR302 [*] `airflow.kubernetes.kube_client._enable_tcp_keepalive` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.kube_client._enable_tcp_keepalive` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:29:1
|
||||
|
|
||||
28 | _disable_verify_ssl()
|
||||
29 | _enable_tcp_keepalive()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
30 | get_kube_client()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `_enable_tcp_keepalive` from `airflow.providers.cncf.kubernetes.kube_client` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `_enable_tcp_keepalive` from `airflow.providers.cncf.kubernetes.kube_client` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
10 10 | )
|
||||
|
|
@ -163,16 +169,17 @@ AIR302_kubernetes.py:29:1: AIR302 [*] `airflow.kubernetes.kube_client._enable_tc
|
|||
22 22 | ALL_NAMESPACES
|
||||
23 23 | POD_EXECUTOR_DONE_KEY
|
||||
|
||||
AIR302_kubernetes.py:30:1: AIR302 [*] `airflow.kubernetes.kube_client.get_kube_client` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.kube_client.get_kube_client` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:30:1
|
||||
|
|
||||
28 | _disable_verify_ssl()
|
||||
29 | _enable_tcp_keepalive()
|
||||
30 | get_kube_client()
|
||||
| ^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^
|
||||
31 |
|
||||
32 | add_pod_suffix()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `get_kube_client` from `airflow.providers.cncf.kubernetes.kube_client` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `get_kube_client` from `airflow.providers.cncf.kubernetes.kube_client` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
11 11 | from airflow.kubernetes.kube_client import (
|
||||
|
|
@ -190,16 +197,17 @@ AIR302_kubernetes.py:30:1: AIR302 [*] `airflow.kubernetes.kube_client.get_kube_c
|
|||
22 22 | ALL_NAMESPACES
|
||||
23 23 | POD_EXECUTOR_DONE_KEY
|
||||
|
||||
AIR302_kubernetes.py:32:1: AIR302 [*] `airflow.kubernetes.kubernetes_helper_functions.add_pod_suffix` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.kubernetes_helper_functions.add_pod_suffix` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:32:1
|
||||
|
|
||||
30 | get_kube_client()
|
||||
31 |
|
||||
32 | add_pod_suffix()
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^
|
||||
33 | annotations_for_logging_task_metadata()
|
||||
34 | create_pod_id()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=10.0.0` and use `add_unique_suffix` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=10.0.0` and use `add_unique_suffix` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
18 18 | annotations_for_logging_task_metadata,
|
||||
|
|
@ -219,14 +227,15 @@ AIR302_kubernetes.py:32:1: AIR302 [*] `airflow.kubernetes.kubernetes_helper_func
|
|||
34 35 | create_pod_id()
|
||||
35 36 |
|
||||
|
||||
AIR302_kubernetes.py:33:1: AIR302 [*] `airflow.kubernetes.kubernetes_helper_functions.annotations_for_logging_task_metadata` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.kubernetes_helper_functions.annotations_for_logging_task_metadata` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:33:1
|
||||
|
|
||||
32 | add_pod_suffix()
|
||||
33 | annotations_for_logging_task_metadata()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
34 | create_pod_id()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `annotations_for_logging_task_metadata` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `annotations_for_logging_task_metadata` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
15 15 | )
|
||||
|
|
@ -240,14 +249,15 @@ AIR302_kubernetes.py:33:1: AIR302 [*] `airflow.kubernetes.kubernetes_helper_func
|
|||
22 22 | ALL_NAMESPACES
|
||||
23 23 | POD_EXECUTOR_DONE_KEY
|
||||
|
||||
AIR302_kubernetes.py:34:1: AIR302 [*] `airflow.kubernetes.kubernetes_helper_functions.create_pod_id` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.kubernetes_helper_functions.create_pod_id` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:34:1
|
||||
|
|
||||
32 | add_pod_suffix()
|
||||
33 | annotations_for_logging_task_metadata()
|
||||
34 | create_pod_id()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=10.0.0` and use `create_unique_id` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=10.0.0` and use `create_unique_id` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
18 18 | annotations_for_logging_task_metadata,
|
||||
|
|
@ -267,16 +277,17 @@ AIR302_kubernetes.py:34:1: AIR302 [*] `airflow.kubernetes.kubernetes_helper_func
|
|||
36 37 |
|
||||
37 38 | from airflow.kubernetes.pod_generator import (
|
||||
|
||||
AIR302_kubernetes.py:49:1: AIR302 [*] `airflow.kubernetes.pod_generator.PodDefaults` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator.PodDefaults` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:49:1
|
||||
|
|
||||
47 | )
|
||||
48 |
|
||||
49 | PodDefaults()
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
50 | PodGenerator()
|
||||
51 | add_pod_suffix()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `PodDefaults` from `airflow.providers.cncf.kubernetes.utils.xcom_sidecar` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `PodDefaults` from `airflow.providers.cncf.kubernetes.utils.xcom_sidecar` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
35 35 |
|
||||
|
|
@ -295,15 +306,16 @@ AIR302_kubernetes.py:49:1: AIR302 [*] `airflow.kubernetes.pod_generator.PodDefau
|
|||
49 49 | PodDefaults()
|
||||
50 50 | PodGenerator()
|
||||
|
||||
AIR302_kubernetes.py:50:1: AIR302 [*] `airflow.kubernetes.pod_generator.PodGenerator` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator.PodGenerator` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:50:1
|
||||
|
|
||||
49 | PodDefaults()
|
||||
50 | PodGenerator()
|
||||
| ^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^
|
||||
51 | add_pod_suffix()
|
||||
52 | datetime_to_label_safe_datestring()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `PodGenerator` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `PodGenerator` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
36 36 |
|
||||
|
|
@ -322,16 +334,17 @@ AIR302_kubernetes.py:50:1: AIR302 [*] `airflow.kubernetes.pod_generator.PodGener
|
|||
49 49 | PodDefaults()
|
||||
50 50 | PodGenerator()
|
||||
|
||||
AIR302_kubernetes.py:51:1: AIR302 [*] `airflow.kubernetes.pod_generator.add_pod_suffix` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator.add_pod_suffix` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:51:1
|
||||
|
|
||||
49 | PodDefaults()
|
||||
50 | PodGenerator()
|
||||
51 | add_pod_suffix()
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^
|
||||
52 | datetime_to_label_safe_datestring()
|
||||
53 | extend_object_field()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=10.0.0` and use `add_unique_suffix` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=10.0.0` and use `add_unique_suffix` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
45 45 | merge_objects,
|
||||
|
|
@ -347,16 +360,17 @@ AIR302_kubernetes.py:51:1: AIR302 [*] `airflow.kubernetes.pod_generator.add_pod_
|
|||
53 54 | extend_object_field()
|
||||
54 55 | label_safe_datestring_to_datetime()
|
||||
|
||||
AIR302_kubernetes.py:52:1: AIR302 [*] `airflow.kubernetes.pod_generator.datetime_to_label_safe_datestring` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator.datetime_to_label_safe_datestring` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:52:1
|
||||
|
|
||||
50 | PodGenerator()
|
||||
51 | add_pod_suffix()
|
||||
52 | datetime_to_label_safe_datestring()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
53 | extend_object_field()
|
||||
54 | label_safe_datestring_to_datetime()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `datetime_to_label_safe_datestring` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `datetime_to_label_safe_datestring` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
38 38 | PodDefaults,
|
||||
|
|
@ -374,16 +388,17 @@ AIR302_kubernetes.py:52:1: AIR302 [*] `airflow.kubernetes.pod_generator.datetime
|
|||
49 49 | PodDefaults()
|
||||
50 50 | PodGenerator()
|
||||
|
||||
AIR302_kubernetes.py:53:1: AIR302 [*] `airflow.kubernetes.pod_generator.extend_object_field` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator.extend_object_field` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:53:1
|
||||
|
|
||||
51 | add_pod_suffix()
|
||||
52 | datetime_to_label_safe_datestring()
|
||||
53 | extend_object_field()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
54 | label_safe_datestring_to_datetime()
|
||||
55 | make_safe_label_value()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `extend_object_field` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `extend_object_field` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
39 39 | PodGenerator,
|
||||
|
|
@ -400,16 +415,17 @@ AIR302_kubernetes.py:53:1: AIR302 [*] `airflow.kubernetes.pod_generator.extend_o
|
|||
49 49 | PodDefaults()
|
||||
50 50 | PodGenerator()
|
||||
|
||||
AIR302_kubernetes.py:54:1: AIR302 [*] `airflow.kubernetes.pod_generator.label_safe_datestring_to_datetime` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator.label_safe_datestring_to_datetime` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:54:1
|
||||
|
|
||||
52 | datetime_to_label_safe_datestring()
|
||||
53 | extend_object_field()
|
||||
54 | label_safe_datestring_to_datetime()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
55 | make_safe_label_value()
|
||||
56 | merge_objects()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `label_safe_datestring_to_datetime` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `label_safe_datestring_to_datetime` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
40 40 | add_pod_suffix,
|
||||
|
|
@ -425,16 +441,17 @@ AIR302_kubernetes.py:54:1: AIR302 [*] `airflow.kubernetes.pod_generator.label_sa
|
|||
49 49 | PodDefaults()
|
||||
50 50 | PodGenerator()
|
||||
|
||||
AIR302_kubernetes.py:55:1: AIR302 [*] `airflow.kubernetes.pod_generator.make_safe_label_value` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator.make_safe_label_value` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:55:1
|
||||
|
|
||||
53 | extend_object_field()
|
||||
54 | label_safe_datestring_to_datetime()
|
||||
55 | make_safe_label_value()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
56 | merge_objects()
|
||||
57 | rand_str()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `make_safe_label_value` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `make_safe_label_value` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
41 41 | datetime_to_label_safe_datestring,
|
||||
|
|
@ -449,15 +466,16 @@ AIR302_kubernetes.py:55:1: AIR302 [*] `airflow.kubernetes.pod_generator.make_saf
|
|||
49 49 | PodDefaults()
|
||||
50 50 | PodGenerator()
|
||||
|
||||
AIR302_kubernetes.py:56:1: AIR302 [*] `airflow.kubernetes.pod_generator.merge_objects` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator.merge_objects` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:56:1
|
||||
|
|
||||
54 | label_safe_datestring_to_datetime()
|
||||
55 | make_safe_label_value()
|
||||
56 | merge_objects()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
57 | rand_str()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `merge_objects` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `merge_objects` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
42 42 | extend_object_field,
|
||||
|
|
@ -471,16 +489,17 @@ AIR302_kubernetes.py:56:1: AIR302 [*] `airflow.kubernetes.pod_generator.merge_ob
|
|||
49 49 | PodDefaults()
|
||||
50 50 | PodGenerator()
|
||||
|
||||
AIR302_kubernetes.py:57:1: AIR302 [*] `airflow.kubernetes.pod_generator.rand_str` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator.rand_str` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:57:1
|
||||
|
|
||||
55 | make_safe_label_value()
|
||||
56 | merge_objects()
|
||||
57 | rand_str()
|
||||
| ^^^^^^^^ AIR302
|
||||
| ^^^^^^^^
|
||||
58 |
|
||||
59 | from airflow.kubernetes.pod_generator_deprecated import (
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `rand_str` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `rand_str` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
43 43 | label_safe_datestring_to_datetime,
|
||||
|
|
@ -493,16 +512,17 @@ AIR302_kubernetes.py:57:1: AIR302 [*] `airflow.kubernetes.pod_generator.rand_str
|
|||
49 49 | PodDefaults()
|
||||
50 50 | PodGenerator()
|
||||
|
||||
AIR302_kubernetes.py:69:1: AIR302 [*] `airflow.kubernetes.pod_generator_deprecated.PodDefaults` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator_deprecated.PodDefaults` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:69:1
|
||||
|
|
||||
67 | )
|
||||
68 |
|
||||
69 | PodDefaults()
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
70 | PodGenerator()
|
||||
71 | make_safe_label_value()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `PodDefaults` from `airflow.providers.cncf.kubernetes.utils.xcom_sidecar` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `PodDefaults` from `airflow.providers.cncf.kubernetes.utils.xcom_sidecar` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
57 57 | rand_str()
|
||||
|
|
@ -521,14 +541,15 @@ AIR302_kubernetes.py:69:1: AIR302 [*] `airflow.kubernetes.pod_generator_deprecat
|
|||
69 69 | PodDefaults()
|
||||
70 70 | PodGenerator()
|
||||
|
||||
AIR302_kubernetes.py:70:1: AIR302 [*] `airflow.kubernetes.pod_generator_deprecated.PodGenerator` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator_deprecated.PodGenerator` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:70:1
|
||||
|
|
||||
69 | PodDefaults()
|
||||
70 | PodGenerator()
|
||||
| ^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^
|
||||
71 | make_safe_label_value()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `PodGenerator` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `PodGenerator` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
58 58 |
|
||||
|
|
@ -546,16 +567,17 @@ AIR302_kubernetes.py:70:1: AIR302 [*] `airflow.kubernetes.pod_generator_deprecat
|
|||
69 69 | PodDefaults()
|
||||
70 70 | PodGenerator()
|
||||
|
||||
AIR302_kubernetes.py:71:1: AIR302 [*] `airflow.kubernetes.pod_generator_deprecated.make_safe_label_value` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator_deprecated.make_safe_label_value` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:71:1
|
||||
|
|
||||
69 | PodDefaults()
|
||||
70 | PodGenerator()
|
||||
71 | make_safe_label_value()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
72 |
|
||||
73 | PodLauncher()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `make_safe_label_value` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `make_safe_label_value` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
59 59 | from airflow.kubernetes.pod_generator_deprecated import (
|
||||
|
|
@ -572,15 +594,16 @@ AIR302_kubernetes.py:71:1: AIR302 [*] `airflow.kubernetes.pod_generator_deprecat
|
|||
69 69 | PodDefaults()
|
||||
70 70 | PodGenerator()
|
||||
|
||||
AIR302_kubernetes.py:73:1: AIR302 [*] `airflow.kubernetes.pod_launcher.PodLauncher` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_launcher.PodLauncher` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:73:1
|
||||
|
|
||||
71 | make_safe_label_value()
|
||||
72 |
|
||||
73 | PodLauncher()
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
74 | PodStatus()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=3.0.0` and use `PodManager` from `airflow.providers.cncf.kubernetes.utils.pod_manager` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=3.0.0` and use `PodManager` from `airflow.providers.cncf.kubernetes.utils.pod_manager` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
65 65 | PodLauncher,
|
||||
|
|
@ -598,15 +621,16 @@ AIR302_kubernetes.py:73:1: AIR302 [*] `airflow.kubernetes.pod_launcher.PodLaunch
|
|||
75 76 |
|
||||
76 77 | from airflow.kubernetes.pod_launcher_deprecated import (
|
||||
|
||||
AIR302_kubernetes.py:74:1: AIR302 [*] `airflow.kubernetes.pod_launcher.PodStatus` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_launcher.PodStatus` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:74:1
|
||||
|
|
||||
73 | PodLauncher()
|
||||
74 | PodStatus()
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^
|
||||
75 |
|
||||
76 | from airflow.kubernetes.pod_launcher_deprecated import (
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=3.0.0` and use `PodPhase` from ` airflow.providers.cncf.kubernetes.utils.pod_manager` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=3.0.0` and use `PodPhase` from ` airflow.providers.cncf.kubernetes.utils.pod_manager` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
65 65 | PodLauncher,
|
||||
|
|
@ -625,16 +649,17 @@ AIR302_kubernetes.py:74:1: AIR302 [*] `airflow.kubernetes.pod_launcher.PodStatus
|
|||
76 77 | from airflow.kubernetes.pod_launcher_deprecated import (
|
||||
77 78 | PodDefaults,
|
||||
|
||||
AIR302_kubernetes.py:90:1: AIR302 [*] `airflow.kubernetes.pod_launcher_deprecated.PodDefaults` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_launcher_deprecated.PodDefaults` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:90:1
|
||||
|
|
||||
88 | from airflow.kubernetes.volume_mount import VolumeMount
|
||||
89 |
|
||||
90 | PodDefaults()
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
91 | PodLauncher()
|
||||
92 | PodStatus()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `PodDefaults` from `airflow.providers.cncf.kubernetes.utils.xcom_sidecar` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `PodDefaults` from `airflow.providers.cncf.kubernetes.utils.xcom_sidecar` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
74 74 | PodStatus()
|
||||
|
|
@ -653,15 +678,16 @@ AIR302_kubernetes.py:90:1: AIR302 [*] `airflow.kubernetes.pod_launcher_deprecate
|
|||
90 90 | PodDefaults()
|
||||
91 91 | PodLauncher()
|
||||
|
||||
AIR302_kubernetes.py:91:1: AIR302 [*] `airflow.kubernetes.pod_launcher_deprecated.PodLauncher` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_launcher_deprecated.PodLauncher` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:91:1
|
||||
|
|
||||
90 | PodDefaults()
|
||||
91 | PodLauncher()
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
92 | PodStatus()
|
||||
93 | get_kube_client()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=3.0.0` and use `PodManager` from `airflow.providers.cncf.kubernetes.utils.pod_manager` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=3.0.0` and use `PodManager` from `airflow.providers.cncf.kubernetes.utils.pod_manager` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
86 86 | )
|
||||
|
|
@ -676,15 +702,16 @@ AIR302_kubernetes.py:91:1: AIR302 [*] `airflow.kubernetes.pod_launcher_deprecate
|
|||
93 94 | get_kube_client()
|
||||
94 95 |
|
||||
|
||||
AIR302_kubernetes.py:92:1: AIR302 [*] `airflow.kubernetes.pod_launcher_deprecated.PodStatus` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_launcher_deprecated.PodStatus` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:92:1
|
||||
|
|
||||
90 | PodDefaults()
|
||||
91 | PodLauncher()
|
||||
92 | PodStatus()
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^
|
||||
93 | get_kube_client()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=3.0.0` and use `PodPhase` from ` airflow.providers.cncf.kubernetes.utils.pod_manager` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=3.0.0` and use `PodPhase` from ` airflow.providers.cncf.kubernetes.utils.pod_manager` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
86 86 | )
|
||||
|
|
@ -700,16 +727,17 @@ AIR302_kubernetes.py:92:1: AIR302 [*] `airflow.kubernetes.pod_launcher_deprecate
|
|||
94 95 |
|
||||
95 96 | PodRuntimeInfoEnv()
|
||||
|
||||
AIR302_kubernetes.py:93:1: AIR302 [*] `airflow.kubernetes.pod_launcher_deprecated.get_kube_client` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_launcher_deprecated.get_kube_client` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:93:1
|
||||
|
|
||||
91 | PodLauncher()
|
||||
92 | PodStatus()
|
||||
93 | get_kube_client()
|
||||
| ^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^
|
||||
94 |
|
||||
95 | PodRuntimeInfoEnv()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `get_kube_client` from `airflow.providers.cncf.kubernetes.kube_client` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `get_kube_client` from `airflow.providers.cncf.kubernetes.kube_client` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
77 77 | PodDefaults,
|
||||
|
|
@ -728,16 +756,17 @@ AIR302_kubernetes.py:93:1: AIR302 [*] `airflow.kubernetes.pod_launcher_deprecate
|
|||
90 90 | PodDefaults()
|
||||
91 91 | PodLauncher()
|
||||
|
||||
AIR302_kubernetes.py:95:1: AIR302 [*] `airflow.kubernetes.pod_runtime_info_env.PodRuntimeInfoEnv` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_runtime_info_env.PodRuntimeInfoEnv` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:95:1
|
||||
|
|
||||
93 | get_kube_client()
|
||||
94 |
|
||||
95 | PodRuntimeInfoEnv()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
96 | K8SModel()
|
||||
97 | Secret()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `V1EnvVar` from `kubernetes.client.models` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `V1EnvVar` from `kubernetes.client.models` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
86 86 | )
|
||||
|
|
@ -756,15 +785,16 @@ AIR302_kubernetes.py:95:1: AIR302 [*] `airflow.kubernetes.pod_runtime_info_env.P
|
|||
97 98 | Secret()
|
||||
98 99 | Volume()
|
||||
|
||||
AIR302_kubernetes.py:96:1: AIR302 [*] `airflow.kubernetes.secret.K8SModel` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.secret.K8SModel` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:96:1
|
||||
|
|
||||
95 | PodRuntimeInfoEnv()
|
||||
96 | K8SModel()
|
||||
| ^^^^^^^^ AIR302
|
||||
| ^^^^^^^^
|
||||
97 | Secret()
|
||||
98 | Volume()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `K8SModel` from `airflow.providers.cncf.kubernetes.k8s_model` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `K8SModel` from `airflow.providers.cncf.kubernetes.k8s_model` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
81 81 | )
|
||||
|
|
@ -780,16 +810,17 @@ AIR302_kubernetes.py:96:1: AIR302 [*] `airflow.kubernetes.secret.K8SModel` is mo
|
|||
90 90 | PodDefaults()
|
||||
91 91 | PodLauncher()
|
||||
|
||||
AIR302_kubernetes.py:97:1: AIR302 [*] `airflow.kubernetes.secret.Secret` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.secret.Secret` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:97:1
|
||||
|
|
||||
95 | PodRuntimeInfoEnv()
|
||||
96 | K8SModel()
|
||||
97 | Secret()
|
||||
| ^^^^^^ AIR302
|
||||
| ^^^^^^
|
||||
98 | Volume()
|
||||
99 | VolumeMount()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `Secret` from `airflow.providers.cncf.kubernetes.secret` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `Secret` from `airflow.providers.cncf.kubernetes.secret` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
82 82 | from airflow.kubernetes.pod_runtime_info_env import PodRuntimeInfoEnv
|
||||
|
|
@ -804,15 +835,16 @@ AIR302_kubernetes.py:97:1: AIR302 [*] `airflow.kubernetes.secret.Secret` is move
|
|||
90 90 | PodDefaults()
|
||||
91 91 | PodLauncher()
|
||||
|
||||
AIR302_kubernetes.py:98:1: AIR302 [*] `airflow.kubernetes.volume.Volume` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.volume.Volume` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:98:1
|
||||
|
|
||||
96 | K8SModel()
|
||||
97 | Secret()
|
||||
98 | Volume()
|
||||
| ^^^^^^ AIR302
|
||||
| ^^^^^^
|
||||
99 | VolumeMount()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `V1Volume` from `kubernetes.client.models` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `V1Volume` from `kubernetes.client.models` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
86 86 | )
|
||||
|
|
@ -832,16 +864,17 @@ AIR302_kubernetes.py:98:1: AIR302 [*] `airflow.kubernetes.volume.Volume` is move
|
|||
100 101 |
|
||||
101 102 | from airflow.kubernetes.kubernetes_helper_functions import (
|
||||
|
||||
AIR302_kubernetes.py:99:1: AIR302 [*] `airflow.kubernetes.volume_mount.VolumeMount` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.volume_mount.VolumeMount` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:99:1
|
||||
|
|
||||
97 | Secret()
|
||||
98 | Volume()
|
||||
99 | VolumeMount()
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
100 |
|
||||
101 | from airflow.kubernetes.kubernetes_helper_functions import (
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `V1VolumeMount` from `kubernetes.client.models` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `V1VolumeMount` from `kubernetes.client.models` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
86 86 | )
|
||||
|
|
@ -861,16 +894,17 @@ AIR302_kubernetes.py:99:1: AIR302 [*] `airflow.kubernetes.volume_mount.VolumeMou
|
|||
101 102 | from airflow.kubernetes.kubernetes_helper_functions import (
|
||||
102 103 | annotations_to_key,
|
||||
|
||||
AIR302_kubernetes.py:107:1: AIR302 [*] `airflow.kubernetes.kubernetes_helper_functions.annotations_to_key` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.kubernetes_helper_functions.annotations_to_key` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:107:1
|
||||
|
|
||||
105 | )
|
||||
106 |
|
||||
107 | annotations_to_key()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
108 | get_logs_task_metadata()
|
||||
109 | rand_str()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `annotations_to_key` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `annotations_to_key` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
99 99 | VolumeMount()
|
||||
|
|
@ -885,14 +919,15 @@ AIR302_kubernetes.py:107:1: AIR302 [*] `airflow.kubernetes.kubernetes_helper_fun
|
|||
107 107 | annotations_to_key()
|
||||
108 108 | get_logs_task_metadata()
|
||||
|
||||
AIR302_kubernetes.py:108:1: AIR302 [*] `airflow.kubernetes.kubernetes_helper_functions.get_logs_task_metadata` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.kubernetes_helper_functions.get_logs_task_metadata` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:108:1
|
||||
|
|
||||
107 | annotations_to_key()
|
||||
108 | get_logs_task_metadata()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
109 | rand_str()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `get_logs_task_metadata` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `get_logs_task_metadata` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
100 100 |
|
||||
|
|
@ -906,16 +941,17 @@ AIR302_kubernetes.py:108:1: AIR302 [*] `airflow.kubernetes.kubernetes_helper_fun
|
|||
107 107 | annotations_to_key()
|
||||
108 108 | get_logs_task_metadata()
|
||||
|
||||
AIR302_kubernetes.py:109:1: AIR302 [*] `airflow.kubernetes.kubernetes_helper_functions.rand_str` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.kubernetes_helper_functions.rand_str` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:109:1
|
||||
|
|
||||
107 | annotations_to_key()
|
||||
108 | get_logs_task_metadata()
|
||||
109 | rand_str()
|
||||
| ^^^^^^^^ AIR302
|
||||
| ^^^^^^^^
|
||||
110 |
|
||||
111 | from airflow.kubernetes.pod_generator import PodGeneratorDeprecated
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `rand_str` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `rand_str` from `airflow.providers.cncf.kubernetes.kubernetes_helper_functions` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
101 101 | from airflow.kubernetes.kubernetes_helper_functions import (
|
||||
|
|
@ -928,14 +964,15 @@ AIR302_kubernetes.py:109:1: AIR302 [*] `airflow.kubernetes.kubernetes_helper_fun
|
|||
107 107 | annotations_to_key()
|
||||
108 108 | get_logs_task_metadata()
|
||||
|
||||
AIR302_kubernetes.py:113:1: AIR302 [*] `airflow.kubernetes.pod_generator.PodGeneratorDeprecated` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.kubernetes.pod_generator.PodGeneratorDeprecated` is moved into `cncf-kubernetes` provider in Airflow 3.0;
|
||||
--> AIR302_kubernetes.py:113:1
|
||||
|
|
||||
111 | from airflow.kubernetes.pod_generator import PodGeneratorDeprecated
|
||||
112 |
|
||||
113 | PodGeneratorDeprecated()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `PodGenerator` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
help: Install `apache-airflow-providers-cncf-kubernetes>=7.4.0` and use `PodGenerator` from `airflow.providers.cncf.kubernetes.pod_generator` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
109 109 | rand_str()
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_mysql.py:9:1: AIR302 [*] `airflow.hooks.mysql_hook.MySqlHook` is moved into `mysql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.mysql_hook.MySqlHook` is moved into `mysql` provider in Airflow 3.0;
|
||||
--> AIR302_mysql.py:9:1
|
||||
|
|
||||
7 | )
|
||||
8 |
|
||||
9 | MySqlHook()
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^
|
||||
10 | PrestoToMySqlOperator()
|
||||
11 | PrestoToMySqlTransfer()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-mysql>=1.0.0` and use `MySqlHook` from `airflow.providers.mysql.hooks.mysql` instead.
|
||||
help: Install `apache-airflow-providers-mysql>=1.0.0` and use `MySqlHook` from `airflow.providers.mysql.hooks.mysql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -25,14 +26,15 @@ AIR302_mysql.py:9:1: AIR302 [*] `airflow.hooks.mysql_hook.MySqlHook` is moved in
|
|||
9 9 | MySqlHook()
|
||||
10 10 | PrestoToMySqlOperator()
|
||||
|
||||
AIR302_mysql.py:10:1: AIR302 [*] `airflow.operators.presto_to_mysql.PrestoToMySqlOperator` is moved into `mysql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.presto_to_mysql.PrestoToMySqlOperator` is moved into `mysql` provider in Airflow 3.0;
|
||||
--> AIR302_mysql.py:10:1
|
||||
|
|
||||
9 | MySqlHook()
|
||||
10 | PrestoToMySqlOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
11 | PrestoToMySqlTransfer()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-mysql>=1.0.0` and use `PrestoToMySqlOperator` from `airflow.providers.mysql.transfers.presto_to_mysql` instead.
|
||||
help: Install `apache-airflow-providers-mysql>=1.0.0` and use `PrestoToMySqlOperator` from `airflow.providers.mysql.transfers.presto_to_mysql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
@ -46,14 +48,15 @@ AIR302_mysql.py:10:1: AIR302 [*] `airflow.operators.presto_to_mysql.PrestoToMySq
|
|||
9 9 | MySqlHook()
|
||||
10 10 | PrestoToMySqlOperator()
|
||||
|
||||
AIR302_mysql.py:11:1: AIR302 [*] `airflow.operators.presto_to_mysql.PrestoToMySqlTransfer` is moved into `mysql` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.presto_to_mysql.PrestoToMySqlTransfer` is moved into `mysql` provider in Airflow 3.0;
|
||||
--> AIR302_mysql.py:11:1
|
||||
|
|
||||
9 | MySqlHook()
|
||||
10 | PrestoToMySqlOperator()
|
||||
11 | PrestoToMySqlTransfer()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-mysql>=1.0.0` and use `PrestoToMySqlOperator` from `airflow.providers.mysql.transfers.presto_to_mysql` instead.
|
||||
help: Install `apache-airflow-providers-mysql>=1.0.0` and use `PrestoToMySqlOperator` from `airflow.providers.mysql.transfers.presto_to_mysql` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_oracle.py:5:1: AIR302 [*] `airflow.hooks.oracle_hook.OracleHook` is moved into `oracle` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.oracle_hook.OracleHook` is moved into `oracle` provider in Airflow 3.0;
|
||||
--> AIR302_oracle.py:5:1
|
||||
|
|
||||
3 | from airflow.hooks.oracle_hook import OracleHook
|
||||
4 |
|
||||
5 | OracleHook()
|
||||
| ^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-oracle>=1.0.0` and use `OracleHook` from `airflow.providers.oracle.hooks.oracle` instead.
|
||||
help: Install `apache-airflow-providers-oracle>=1.0.0` and use `OracleHook` from `airflow.providers.oracle.hooks.oracle` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_papermill.py:5:1: AIR302 [*] `airflow.operators.papermill_operator.PapermillOperator` is moved into `papermill` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.papermill_operator.PapermillOperator` is moved into `papermill` provider in Airflow 3.0;
|
||||
--> AIR302_papermill.py:5:1
|
||||
|
|
||||
3 | from airflow.operators.papermill_operator import PapermillOperator
|
||||
4 |
|
||||
5 | PapermillOperator()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-papermill>=1.0.0` and use `PapermillOperator` from `airflow.providers.papermill.operators.papermill` instead.
|
||||
help: Install `apache-airflow-providers-papermill>=1.0.0` and use `PapermillOperator` from `airflow.providers.papermill.operators.papermill` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_pig.py:6:1: AIR302 [*] `airflow.hooks.pig_hook.PigCliHook` is moved into `apache-pig` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.pig_hook.PigCliHook` is moved into `apache-pig` provider in Airflow 3.0;
|
||||
--> AIR302_pig.py:6:1
|
||||
|
|
||||
4 | from airflow.operators.pig_operator import PigOperator
|
||||
5 |
|
||||
6 | PigCliHook()
|
||||
| ^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^
|
||||
7 | PigOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-pig>=1.0.0` and use `PigCliHook` from `airflow.providers.apache.pig.hooks.pig` instead.
|
||||
help: Install `apache-airflow-providers-apache-pig>=1.0.0` and use `PigCliHook` from `airflow.providers.apache.pig.hooks.pig` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -21,13 +22,14 @@ AIR302_pig.py:6:1: AIR302 [*] `airflow.hooks.pig_hook.PigCliHook` is moved into
|
|||
6 6 | PigCliHook()
|
||||
7 7 | PigOperator()
|
||||
|
||||
AIR302_pig.py:7:1: AIR302 [*] `airflow.operators.pig_operator.PigOperator` is moved into `apache-pig` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.pig_operator.PigOperator` is moved into `apache-pig` provider in Airflow 3.0;
|
||||
--> AIR302_pig.py:7:1
|
||||
|
|
||||
6 | PigCliHook()
|
||||
7 | PigOperator()
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-apache-pig>=1.0.0` and use `PigOperator` from `airflow.providers.apache.pig.operators.pig` instead.
|
||||
help: Install `apache-airflow-providers-apache-pig>=1.0.0` and use `PigOperator` from `airflow.providers.apache.pig.operators.pig` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_postgres.py:6:1: AIR302 [*] `airflow.hooks.postgres_hook.PostgresHook` is moved into `postgres` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.postgres_hook.PostgresHook` is moved into `postgres` provider in Airflow 3.0;
|
||||
--> AIR302_postgres.py:6:1
|
||||
|
|
||||
4 | from airflow.operators.postgres_operator import Mapping
|
||||
5 |
|
||||
6 | PostgresHook()
|
||||
| ^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^
|
||||
7 | Mapping()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-postgres>=1.0.0` and use `PostgresHook` from `airflow.providers.postgres.hooks.postgres` instead.
|
||||
help: Install `apache-airflow-providers-postgres>=1.0.0` and use `PostgresHook` from `airflow.providers.postgres.hooks.postgres` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -21,9 +22,10 @@ AIR302_postgres.py:6:1: AIR302 [*] `airflow.hooks.postgres_hook.PostgresHook` is
|
|||
6 6 | PostgresHook()
|
||||
7 7 | Mapping()
|
||||
|
||||
AIR302_postgres.py:7:1: AIR302 `airflow.operators.postgres_operator.Mapping` is removed in Airflow 3.0
|
||||
AIR302 `airflow.operators.postgres_operator.Mapping` is removed in Airflow 3.0
|
||||
--> AIR302_postgres.py:7:1
|
||||
|
|
||||
6 | PostgresHook()
|
||||
7 | Mapping()
|
||||
| ^^^^^^^ AIR302
|
||||
| ^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_presto.py:5:1: AIR302 [*] `airflow.hooks.presto_hook.PrestoHook` is moved into `presto` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.presto_hook.PrestoHook` is moved into `presto` provider in Airflow 3.0;
|
||||
--> AIR302_presto.py:5:1
|
||||
|
|
||||
3 | from airflow.hooks.presto_hook import PrestoHook
|
||||
4 |
|
||||
5 | PrestoHook()
|
||||
| ^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-presto>=1.0.0` and use `PrestoHook` from `airflow.providers.presto.hooks.presto` instead.
|
||||
help: Install `apache-airflow-providers-presto>=1.0.0` and use `PrestoHook` from `airflow.providers.presto.hooks.presto` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_samba.py:5:1: AIR302 [*] `airflow.hooks.samba_hook.SambaHook` is moved into `samba` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.samba_hook.SambaHook` is moved into `samba` provider in Airflow 3.0;
|
||||
--> AIR302_samba.py:5:1
|
||||
|
|
||||
3 | from airflow.hooks.samba_hook import SambaHook
|
||||
4 |
|
||||
5 | SambaHook()
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-samba>=1.0.0` and use `SambaHook` from `airflow.providers.samba.hooks.samba` instead.
|
||||
help: Install `apache-airflow-providers-samba>=1.0.0` and use `SambaHook` from `airflow.providers.samba.hooks.samba` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_slack.py:6:1: AIR302 [*] `airflow.hooks.slack_hook.SlackHook` is moved into `slack` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.slack_hook.SlackHook` is moved into `slack` provider in Airflow 3.0;
|
||||
--> AIR302_slack.py:6:1
|
||||
|
|
||||
4 | from airflow.operators.slack_operator import SlackAPIOperator, SlackAPIPostOperator
|
||||
5 |
|
||||
6 | SlackHook()
|
||||
| ^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^
|
||||
7 | SlackAPIOperator()
|
||||
8 | SlackAPIPostOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-slack>=1.0.0` and use `SlackHook` from `airflow.providers.slack.hooks.slack` instead.
|
||||
help: Install `apache-airflow-providers-slack>=1.0.0` and use `SlackHook` from `airflow.providers.slack.hooks.slack` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -22,14 +23,15 @@ AIR302_slack.py:6:1: AIR302 [*] `airflow.hooks.slack_hook.SlackHook` is moved in
|
|||
6 6 | SlackHook()
|
||||
7 7 | SlackAPIOperator()
|
||||
|
||||
AIR302_slack.py:7:1: AIR302 [*] `airflow.operators.slack_operator.SlackAPIOperator` is moved into `slack` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.slack_operator.SlackAPIOperator` is moved into `slack` provider in Airflow 3.0;
|
||||
--> AIR302_slack.py:7:1
|
||||
|
|
||||
6 | SlackHook()
|
||||
7 | SlackAPIOperator()
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
8 | SlackAPIPostOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-slack>=1.0.0` and use `SlackAPIOperator` from `airflow.providers.slack.operators.slack` instead.
|
||||
help: Install `apache-airflow-providers-slack>=1.0.0` and use `SlackAPIOperator` from `airflow.providers.slack.operators.slack` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -42,14 +44,15 @@ AIR302_slack.py:7:1: AIR302 [*] `airflow.operators.slack_operator.SlackAPIOperat
|
|||
6 7 | SlackHook()
|
||||
7 8 | SlackAPIOperator()
|
||||
|
||||
AIR302_slack.py:8:1: AIR302 [*] `airflow.operators.slack_operator.SlackAPIPostOperator` is moved into `slack` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.slack_operator.SlackAPIPostOperator` is moved into `slack` provider in Airflow 3.0;
|
||||
--> AIR302_slack.py:8:1
|
||||
|
|
||||
6 | SlackHook()
|
||||
7 | SlackAPIOperator()
|
||||
8 | SlackAPIPostOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-slack>=1.0.0` and use `SlackAPIPostOperator` from `airflow.providers.slack.operators.slack` instead.
|
||||
help: Install `apache-airflow-providers-slack>=1.0.0` and use `SlackAPIPostOperator` from `airflow.providers.slack.operators.slack` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_smtp.py:5:1: AIR302 [*] `airflow.operators.email_operator.EmailOperator` is moved into `smtp` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.email_operator.EmailOperator` is moved into `smtp` provider in Airflow 3.0;
|
||||
--> AIR302_smtp.py:5:1
|
||||
|
|
||||
3 | from airflow.operators.email_operator import EmailOperator
|
||||
4 |
|
||||
5 | EmailOperator()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
6 |
|
||||
7 | from airflow.operators.email import EmailOperator
|
||||
|
|
||||
= help: Install `apache-airflow-providers-smtp>=1.0.0` and use `EmailOperator` from `airflow.providers.smtp.operators.smtp` instead.
|
||||
help: Install `apache-airflow-providers-smtp>=1.0.0` and use `EmailOperator` from `airflow.providers.smtp.operators.smtp` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -21,14 +22,15 @@ AIR302_smtp.py:5:1: AIR302 [*] `airflow.operators.email_operator.EmailOperator`
|
|||
5 5 | EmailOperator()
|
||||
6 6 |
|
||||
|
||||
AIR302_smtp.py:9:1: AIR302 [*] `airflow.operators.email.EmailOperator` is moved into `smtp` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.email.EmailOperator` is moved into `smtp` provider in Airflow 3.0;
|
||||
--> AIR302_smtp.py:9:1
|
||||
|
|
||||
7 | from airflow.operators.email import EmailOperator
|
||||
8 |
|
||||
9 | EmailOperator()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-smtp>=1.0.0` and use `EmailOperator` from `airflow.providers.smtp.operators.smtp` instead.
|
||||
help: Install `apache-airflow-providers-smtp>=1.0.0` and use `EmailOperator` from `airflow.providers.smtp.operators.smtp` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
4 4 |
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_sqlite.py:5:1: AIR302 [*] `airflow.hooks.sqlite_hook.SqliteHook` is moved into `sqlite` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.sqlite_hook.SqliteHook` is moved into `sqlite` provider in Airflow 3.0;
|
||||
--> AIR302_sqlite.py:5:1
|
||||
|
|
||||
3 | from airflow.hooks.sqlite_hook import SqliteHook
|
||||
4 |
|
||||
5 | SqliteHook()
|
||||
| ^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-sqlite>=1.0.0` and use `SqliteHook` from `airflow.providers.sqlite.hooks.sqlite` instead.
|
||||
help: Install `apache-airflow-providers-sqlite>=1.0.0` and use `SqliteHook` from `airflow.providers.sqlite.hooks.sqlite` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_standard.py:20:1: AIR302 [*] `airflow.operators.bash_operator.BashOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.bash_operator.BashOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:20:1
|
||||
|
|
||||
18 | )
|
||||
19 |
|
||||
20 | BashOperator()
|
||||
| ^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^
|
||||
21 |
|
||||
22 | TriggerDagRunLink()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `BashOperator` from `airflow.providers.standard.operators.bash` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `BashOperator` from `airflow.providers.standard.operators.bash` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -28,15 +29,16 @@ AIR302_standard.py:20:1: AIR302 [*] `airflow.operators.bash_operator.BashOperato
|
|||
20 20 | BashOperator()
|
||||
21 21 |
|
||||
|
||||
AIR302_standard.py:22:1: AIR302 [*] `airflow.operators.dagrun_operator.TriggerDagRunLink` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.dagrun_operator.TriggerDagRunLink` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:22:1
|
||||
|
|
||||
20 | BashOperator()
|
||||
21 |
|
||||
22 | TriggerDagRunLink()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
23 | TriggerDagRunOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.2` and use `TriggerDagRunLink` from `airflow.providers.standard.operators.trigger_dagrun` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.2` and use `TriggerDagRunLink` from `airflow.providers.standard.operators.trigger_dagrun` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
@ -55,15 +57,16 @@ AIR302_standard.py:22:1: AIR302 [*] `airflow.operators.dagrun_operator.TriggerDa
|
|||
20 20 | BashOperator()
|
||||
21 21 |
|
||||
|
||||
AIR302_standard.py:23:1: AIR302 [*] `airflow.operators.dagrun_operator.TriggerDagRunOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.dagrun_operator.TriggerDagRunOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:23:1
|
||||
|
|
||||
22 | TriggerDagRunLink()
|
||||
23 | TriggerDagRunOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
24 |
|
||||
25 | LatestOnlyOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.2` and use `TriggerDagRunOperator` from `airflow.providers.standard.operators.trigger_dagrun` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.2` and use `TriggerDagRunOperator` from `airflow.providers.standard.operators.trigger_dagrun` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
3 3 | from airflow.operators.bash_operator import BashOperator
|
||||
|
|
@ -82,16 +85,17 @@ AIR302_standard.py:23:1: AIR302 [*] `airflow.operators.dagrun_operator.TriggerDa
|
|||
20 20 | BashOperator()
|
||||
21 21 |
|
||||
|
||||
AIR302_standard.py:25:1: AIR302 [*] `airflow.operators.latest_only_operator.LatestOnlyOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.latest_only_operator.LatestOnlyOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:25:1
|
||||
|
|
||||
23 | TriggerDagRunOperator()
|
||||
24 |
|
||||
25 | LatestOnlyOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
26 |
|
||||
27 | BranchPythonOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `LatestOnlyOperator` from `airflow.providers.standard.operators.latest_only` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `LatestOnlyOperator` from `airflow.providers.standard.operators.latest_only` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
5 5 | TriggerDagRunLink,
|
||||
|
|
@ -110,16 +114,17 @@ AIR302_standard.py:25:1: AIR302 [*] `airflow.operators.latest_only_operator.Late
|
|||
20 20 | BashOperator()
|
||||
21 21 |
|
||||
|
||||
AIR302_standard.py:27:1: AIR302 [*] `airflow.operators.python_operator.BranchPythonOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.python_operator.BranchPythonOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:27:1
|
||||
|
|
||||
25 | LatestOnlyOperator()
|
||||
26 |
|
||||
27 | BranchPythonOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
28 | PythonOperator()
|
||||
29 | PythonVirtualenvOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `BranchPythonOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `BranchPythonOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
7 7 | )
|
||||
|
|
@ -138,15 +143,16 @@ AIR302_standard.py:27:1: AIR302 [*] `airflow.operators.python_operator.BranchPyt
|
|||
20 20 | BashOperator()
|
||||
21 21 |
|
||||
|
||||
AIR302_standard.py:28:1: AIR302 [*] `airflow.operators.python_operator.PythonOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.python_operator.PythonOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:28:1
|
||||
|
|
||||
27 | BranchPythonOperator()
|
||||
28 | PythonOperator()
|
||||
| ^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^
|
||||
29 | PythonVirtualenvOperator()
|
||||
30 | ShortCircuitOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `PythonOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `PythonOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
8 8 | from airflow.operators.latest_only_operator import LatestOnlyOperator
|
||||
|
|
@ -165,15 +171,16 @@ AIR302_standard.py:28:1: AIR302 [*] `airflow.operators.python_operator.PythonOpe
|
|||
20 20 | BashOperator()
|
||||
21 21 |
|
||||
|
||||
AIR302_standard.py:29:1: AIR302 [*] `airflow.operators.python_operator.PythonVirtualenvOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.python_operator.PythonVirtualenvOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:29:1
|
||||
|
|
||||
27 | BranchPythonOperator()
|
||||
28 | PythonOperator()
|
||||
29 | PythonVirtualenvOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
30 | ShortCircuitOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `PythonVirtualenvOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `PythonVirtualenvOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
9 9 | from airflow.operators.python_operator import (
|
||||
|
|
@ -191,16 +198,17 @@ AIR302_standard.py:29:1: AIR302 [*] `airflow.operators.python_operator.PythonVir
|
|||
20 20 | BashOperator()
|
||||
21 21 |
|
||||
|
||||
AIR302_standard.py:30:1: AIR302 [*] `airflow.operators.python_operator.ShortCircuitOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.python_operator.ShortCircuitOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:30:1
|
||||
|
|
||||
28 | PythonOperator()
|
||||
29 | PythonVirtualenvOperator()
|
||||
30 | ShortCircuitOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
31 |
|
||||
32 | ExternalTaskMarker()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `ShortCircuitOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `ShortCircuitOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
10 10 | BranchPythonOperator,
|
||||
|
|
@ -217,15 +225,16 @@ AIR302_standard.py:30:1: AIR302 [*] `airflow.operators.python_operator.ShortCirc
|
|||
20 20 | BashOperator()
|
||||
21 21 |
|
||||
|
||||
AIR302_standard.py:32:1: AIR302 [*] `airflow.sensors.external_task_sensor.ExternalTaskMarker` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.external_task_sensor.ExternalTaskMarker` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:32:1
|
||||
|
|
||||
30 | ShortCircuitOperator()
|
||||
31 |
|
||||
32 | ExternalTaskMarker()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
33 | ExternalTaskSensor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `ExternalTaskMarker` from `airflow.providers.standard.sensors.external_task` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `ExternalTaskMarker` from `airflow.providers.standard.sensors.external_task` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
13 13 | ShortCircuitOperator,
|
||||
|
|
@ -239,13 +248,14 @@ AIR302_standard.py:32:1: AIR302 [*] `airflow.sensors.external_task_sensor.Extern
|
|||
20 20 | BashOperator()
|
||||
21 21 |
|
||||
|
||||
AIR302_standard.py:33:1: AIR302 [*] `airflow.sensors.external_task_sensor.ExternalTaskSensor` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.external_task_sensor.ExternalTaskSensor` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:33:1
|
||||
|
|
||||
32 | ExternalTaskMarker()
|
||||
33 | ExternalTaskSensor()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `ExternalTaskSensor` from `airflow.providers.standard.sensors.external_task` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `ExternalTaskSensor` from `airflow.providers.standard.sensors.external_task` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
14 14 | )
|
||||
|
|
@ -258,16 +268,17 @@ AIR302_standard.py:33:1: AIR302 [*] `airflow.sensors.external_task_sensor.Extern
|
|||
20 20 | BashOperator()
|
||||
21 21 |
|
||||
|
||||
AIR302_standard.py:38:1: AIR302 [*] `airflow.hooks.subprocess.SubprocessResult` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.subprocess.SubprocessResult` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:38:1
|
||||
|
|
||||
36 | from airflow.hooks.subprocess import SubprocessResult
|
||||
37 |
|
||||
38 | SubprocessResult()
|
||||
| ^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
39 |
|
||||
40 | from airflow.hooks.subprocess import working_directory
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `SubprocessResult` from `airflow.providers.standard.hooks.subprocess` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `SubprocessResult` from `airflow.providers.standard.hooks.subprocess` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
33 33 | ExternalTaskSensor()
|
||||
|
|
@ -279,16 +290,17 @@ AIR302_standard.py:38:1: AIR302 [*] `airflow.hooks.subprocess.SubprocessResult`
|
|||
38 38 | SubprocessResult()
|
||||
39 39 |
|
||||
|
||||
AIR302_standard.py:42:1: AIR302 [*] `airflow.hooks.subprocess.working_directory` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.subprocess.working_directory` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:42:1
|
||||
|
|
||||
40 | from airflow.hooks.subprocess import working_directory
|
||||
41 |
|
||||
42 | working_directory()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
43 |
|
||||
44 | from airflow.operators.datetime import target_times_as_dates
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `working_directory` from `airflow.providers.standard.hooks.subprocess` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `working_directory` from `airflow.providers.standard.hooks.subprocess` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
37 37 |
|
||||
|
|
@ -300,16 +312,17 @@ AIR302_standard.py:42:1: AIR302 [*] `airflow.hooks.subprocess.working_directory`
|
|||
42 42 | working_directory()
|
||||
43 43 |
|
||||
|
||||
AIR302_standard.py:46:1: AIR302 [*] `airflow.operators.datetime.target_times_as_dates` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.datetime.target_times_as_dates` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:46:1
|
||||
|
|
||||
44 | from airflow.operators.datetime import target_times_as_dates
|
||||
45 |
|
||||
46 | target_times_as_dates()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
47 |
|
||||
48 | from airflow.operators.trigger_dagrun import TriggerDagRunLink
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `target_times_as_dates` from `airflow.providers.standard.operators.datetime` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `target_times_as_dates` from `airflow.providers.standard.operators.datetime` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
41 41 |
|
||||
|
|
@ -321,16 +334,17 @@ AIR302_standard.py:46:1: AIR302 [*] `airflow.operators.datetime.target_times_as_
|
|||
46 46 | target_times_as_dates()
|
||||
47 47 |
|
||||
|
||||
AIR302_standard.py:50:1: AIR302 [*] `airflow.operators.trigger_dagrun.TriggerDagRunLink` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.trigger_dagrun.TriggerDagRunLink` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:50:1
|
||||
|
|
||||
48 | from airflow.operators.trigger_dagrun import TriggerDagRunLink
|
||||
49 |
|
||||
50 | TriggerDagRunLink()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
51 |
|
||||
52 | from airflow.sensors.external_task import ExternalTaskSensorLink
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.2` and use `TriggerDagRunLink` from `airflow.providers.standard.operators.trigger_dagrun` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.2` and use `TriggerDagRunLink` from `airflow.providers.standard.operators.trigger_dagrun` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
45 45 |
|
||||
|
|
@ -342,16 +356,17 @@ AIR302_standard.py:50:1: AIR302 [*] `airflow.operators.trigger_dagrun.TriggerDag
|
|||
50 50 | TriggerDagRunLink()
|
||||
51 51 |
|
||||
|
||||
AIR302_standard.py:54:1: AIR302 [*] `airflow.sensors.external_task.ExternalTaskSensorLink` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.external_task.ExternalTaskSensorLink` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:54:1
|
||||
|
|
||||
52 | from airflow.sensors.external_task import ExternalTaskSensorLink
|
||||
53 |
|
||||
54 | ExternalTaskSensorLink()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
55 |
|
||||
56 | from airflow.sensors.time_delta import WaitSensor
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `ExternalDagLink` from `airflow.providers.standard.sensors.external_task` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `ExternalDagLink` from `airflow.providers.standard.sensors.external_task` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
50 50 | TriggerDagRunLink()
|
||||
|
|
@ -365,16 +380,17 @@ AIR302_standard.py:54:1: AIR302 [*] `airflow.sensors.external_task.ExternalTaskS
|
|||
56 57 | from airflow.sensors.time_delta import WaitSensor
|
||||
57 58 |
|
||||
|
||||
AIR302_standard.py:58:1: AIR302 [*] `airflow.sensors.time_delta.WaitSensor` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.time_delta.WaitSensor` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:58:1
|
||||
|
|
||||
56 | from airflow.sensors.time_delta import WaitSensor
|
||||
57 |
|
||||
58 | WaitSensor()
|
||||
| ^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^
|
||||
59 |
|
||||
60 | from airflow.operators.dummy import DummyOperator
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `WaitSensor` from `airflow.providers.standard.sensors.time_delta` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `WaitSensor` from `airflow.providers.standard.sensors.time_delta` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
53 53 |
|
||||
|
|
@ -386,16 +402,17 @@ AIR302_standard.py:58:1: AIR302 [*] `airflow.sensors.time_delta.WaitSensor` is m
|
|||
58 58 | WaitSensor()
|
||||
59 59 |
|
||||
|
||||
AIR302_standard.py:62:1: AIR302 [*] `airflow.operators.dummy.DummyOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.dummy.DummyOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:62:1
|
||||
|
|
||||
60 | from airflow.operators.dummy import DummyOperator
|
||||
61 |
|
||||
62 | DummyOperator()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
63 |
|
||||
64 | from airflow.operators.dummy import EmptyOperator
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.2` and use `EmptyOperator` from `airflow.providers.standard.operators.empty` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.2` and use `EmptyOperator` from `airflow.providers.standard.operators.empty` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
58 58 | WaitSensor()
|
||||
|
|
@ -409,16 +426,17 @@ AIR302_standard.py:62:1: AIR302 [*] `airflow.operators.dummy.DummyOperator` is m
|
|||
64 65 | from airflow.operators.dummy import EmptyOperator
|
||||
65 66 |
|
||||
|
||||
AIR302_standard.py:66:1: AIR302 [*] `airflow.operators.dummy.EmptyOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.dummy.EmptyOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:66:1
|
||||
|
|
||||
64 | from airflow.operators.dummy import EmptyOperator
|
||||
65 |
|
||||
66 | EmptyOperator()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
67 |
|
||||
68 | from airflow.operators.dummy_operator import DummyOperator
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.2` and use `EmptyOperator` from `airflow.providers.standard.operators.empty` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.2` and use `EmptyOperator` from `airflow.providers.standard.operators.empty` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
61 61 |
|
||||
|
|
@ -430,16 +448,17 @@ AIR302_standard.py:66:1: AIR302 [*] `airflow.operators.dummy.EmptyOperator` is m
|
|||
66 66 | EmptyOperator()
|
||||
67 67 |
|
||||
|
||||
AIR302_standard.py:70:1: AIR302 [*] `airflow.operators.dummy_operator.DummyOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.dummy_operator.DummyOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:70:1
|
||||
|
|
||||
68 | from airflow.operators.dummy_operator import DummyOperator
|
||||
69 |
|
||||
70 | DummyOperator()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
71 |
|
||||
72 | from airflow.operators.dummy_operator import EmptyOperator
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.2` and use `EmptyOperator` from `airflow.providers.standard.operators.empty` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.2` and use `EmptyOperator` from `airflow.providers.standard.operators.empty` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
66 66 | EmptyOperator()
|
||||
|
|
@ -450,16 +469,17 @@ AIR302_standard.py:70:1: AIR302 [*] `airflow.operators.dummy_operator.DummyOpera
|
|||
70 71 | DummyOperator()
|
||||
71 72 |
|
||||
|
||||
AIR302_standard.py:74:1: AIR302 [*] `airflow.operators.dummy_operator.EmptyOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.operators.dummy_operator.EmptyOperator` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:74:1
|
||||
|
|
||||
72 | from airflow.operators.dummy_operator import EmptyOperator
|
||||
73 |
|
||||
74 | EmptyOperator()
|
||||
| ^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^
|
||||
75 |
|
||||
76 | from airflow.sensors.external_task_sensor import ExternalTaskSensorLink
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.2` and use `EmptyOperator` from `airflow.providers.standard.operators.empty` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.2` and use `EmptyOperator` from `airflow.providers.standard.operators.empty` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
69 69 |
|
||||
|
|
@ -471,14 +491,15 @@ AIR302_standard.py:74:1: AIR302 [*] `airflow.operators.dummy_operator.EmptyOpera
|
|||
74 74 | EmptyOperator()
|
||||
75 75 |
|
||||
|
||||
AIR302_standard.py:78:1: AIR302 [*] `airflow.sensors.external_task_sensor.ExternalTaskSensorLink` is moved into `standard` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.sensors.external_task_sensor.ExternalTaskSensorLink` is moved into `standard` provider in Airflow 3.0;
|
||||
--> AIR302_standard.py:78:1
|
||||
|
|
||||
76 | from airflow.sensors.external_task_sensor import ExternalTaskSensorLink
|
||||
77 |
|
||||
78 | ExternalTaskSensorLink()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `ExternalDagLink` from `airflow.providers.standard.sensors.external_task` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `ExternalDagLink` from `airflow.providers.standard.sensors.external_task` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
74 74 | EmptyOperator()
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR302_zendesk.py:5:1: AIR302 [*] `airflow.hooks.zendesk_hook.ZendeskHook` is moved into `zendesk` provider in Airflow 3.0;
|
||||
AIR302 [*] `airflow.hooks.zendesk_hook.ZendeskHook` is moved into `zendesk` provider in Airflow 3.0;
|
||||
--> AIR302_zendesk.py:5:1
|
||||
|
|
||||
3 | from airflow.hooks.zendesk_hook import ZendeskHook
|
||||
4 |
|
||||
5 | ZendeskHook()
|
||||
| ^^^^^^^^^^^ AIR302
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-zendesk>=1.0.0` and use `ZendeskHook` from `airflow.providers.zendesk.hooks.zendesk` instead.
|
||||
help: Install `apache-airflow-providers-zendesk>=1.0.0` and use `ZendeskHook` from `airflow.providers.zendesk.hooks.zendesk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
|
|||
|
|
@ -1,25 +1,28 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR311_args.py:13:34: AIR311 `sla_miss_callback` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 `sla_miss_callback` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_args.py:13:34
|
||||
|
|
||||
13 | DAG(dag_id="class_sla_callback", sla_miss_callback=sla_callback)
|
||||
| ^^^^^^^^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
AIR311_args.py:16:6: AIR311 `sla_miss_callback` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 `sla_miss_callback` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_args.py:16:6
|
||||
|
|
||||
16 | @dag(sla_miss_callback=sla_callback)
|
||||
| ^^^^^^^^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
17 | def decorator_sla_callback():
|
||||
18 | pass
|
||||
|
|
||||
|
||||
AIR311_args.py:25:9: AIR311 `sla` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 `sla` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_args.py:25:9
|
||||
|
|
||||
23 | branch_dt_op2 = BranchDateTimeOperator(
|
||||
24 | task_id="branch_dt_op2",
|
||||
25 | sla=timedelta(seconds=10),
|
||||
| ^^^ AIR311
|
||||
| ^^^
|
||||
26 | )
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR311_names.py:20:1: AIR311 [*] `airflow.Dataset` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.Dataset` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:20:1
|
||||
|
|
||||
19 | # airflow
|
||||
20 | DatasetFromRoot()
|
||||
| ^^^^^^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^^^^^^
|
||||
21 |
|
||||
22 | # airflow.datasets
|
||||
|
|
||||
= help: Use `Asset` from `airflow.sdk` instead.
|
||||
help: Use `Asset` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
15 15 | task,
|
||||
|
|
@ -24,15 +25,16 @@ AIR311_names.py:20:1: AIR311 [*] `airflow.Dataset` is removed in Airflow 3.0; It
|
|||
22 23 | # airflow.datasets
|
||||
23 24 | Dataset()
|
||||
|
||||
AIR311_names.py:23:1: AIR311 [*] `airflow.datasets.Dataset` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.datasets.Dataset` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:23:1
|
||||
|
|
||||
22 | # airflow.datasets
|
||||
23 | Dataset()
|
||||
| ^^^^^^^ AIR311
|
||||
| ^^^^^^^
|
||||
24 | DatasetAlias()
|
||||
25 | DatasetAll()
|
||||
|
|
||||
= help: Use `Asset` from `airflow.sdk` instead.
|
||||
help: Use `Asset` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
15 15 | task,
|
||||
|
|
@ -50,16 +52,17 @@ AIR311_names.py:23:1: AIR311 [*] `airflow.datasets.Dataset` is removed in Airflo
|
|||
25 26 | DatasetAll()
|
||||
26 27 | DatasetAny()
|
||||
|
||||
AIR311_names.py:24:1: AIR311 [*] `airflow.datasets.DatasetAlias` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.datasets.DatasetAlias` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:24:1
|
||||
|
|
||||
22 | # airflow.datasets
|
||||
23 | Dataset()
|
||||
24 | DatasetAlias()
|
||||
| ^^^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^^^
|
||||
25 | DatasetAll()
|
||||
26 | DatasetAny()
|
||||
|
|
||||
= help: Use `AssetAlias` from `airflow.sdk` instead.
|
||||
help: Use `AssetAlias` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
15 15 | task,
|
||||
|
|
@ -78,16 +81,17 @@ AIR311_names.py:24:1: AIR311 [*] `airflow.datasets.DatasetAlias` is removed in A
|
|||
26 27 | DatasetAny()
|
||||
27 28 | Metadata()
|
||||
|
||||
AIR311_names.py:25:1: AIR311 [*] `airflow.datasets.DatasetAll` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.datasets.DatasetAll` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:25:1
|
||||
|
|
||||
23 | Dataset()
|
||||
24 | DatasetAlias()
|
||||
25 | DatasetAll()
|
||||
| ^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^
|
||||
26 | DatasetAny()
|
||||
27 | Metadata()
|
||||
|
|
||||
= help: Use `AssetAll` from `airflow.sdk` instead.
|
||||
help: Use `AssetAll` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
15 15 | task,
|
||||
|
|
@ -107,16 +111,17 @@ AIR311_names.py:25:1: AIR311 [*] `airflow.datasets.DatasetAll` is removed in Air
|
|||
27 28 | Metadata()
|
||||
28 29 | expand_alias_to_datasets()
|
||||
|
||||
AIR311_names.py:26:1: AIR311 [*] `airflow.datasets.DatasetAny` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.datasets.DatasetAny` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:26:1
|
||||
|
|
||||
24 | DatasetAlias()
|
||||
25 | DatasetAll()
|
||||
26 | DatasetAny()
|
||||
| ^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^
|
||||
27 | Metadata()
|
||||
28 | expand_alias_to_datasets()
|
||||
|
|
||||
= help: Use `AssetAny` from `airflow.sdk` instead.
|
||||
help: Use `AssetAny` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
15 15 | task,
|
||||
|
|
@ -136,15 +141,16 @@ AIR311_names.py:26:1: AIR311 [*] `airflow.datasets.DatasetAny` is removed in Air
|
|||
28 29 | expand_alias_to_datasets()
|
||||
29 30 |
|
||||
|
||||
AIR311_names.py:27:1: AIR311 [*] `airflow.datasets.metadata.Metadata` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.datasets.metadata.Metadata` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:27:1
|
||||
|
|
||||
25 | DatasetAll()
|
||||
26 | DatasetAny()
|
||||
27 | Metadata()
|
||||
| ^^^^^^^^ AIR311
|
||||
| ^^^^^^^^
|
||||
28 | expand_alias_to_datasets()
|
||||
|
|
||||
= help: Use `Metadata` from `airflow.sdk` instead.
|
||||
help: Use `Metadata` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
8 8 | DatasetAny,
|
||||
|
|
@ -162,16 +168,17 @@ AIR311_names.py:27:1: AIR311 [*] `airflow.datasets.metadata.Metadata` is removed
|
|||
19 19 | # airflow
|
||||
20 20 | DatasetFromRoot()
|
||||
|
||||
AIR311_names.py:28:1: AIR311 [*] `airflow.datasets.expand_alias_to_datasets` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.datasets.expand_alias_to_datasets` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:28:1
|
||||
|
|
||||
26 | DatasetAny()
|
||||
27 | Metadata()
|
||||
28 | expand_alias_to_datasets()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
29 |
|
||||
30 | # airflow.decorators
|
||||
|
|
||||
= help: Use `expand_alias_to_assets` from `airflow.models.asset` instead.
|
||||
help: Use `expand_alias_to_assets` from `airflow.models.asset` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
15 15 | task,
|
||||
|
|
@ -191,15 +198,16 @@ AIR311_names.py:28:1: AIR311 [*] `airflow.datasets.expand_alias_to_datasets` is
|
|||
30 31 | # airflow.decorators
|
||||
31 32 | dag()
|
||||
|
||||
AIR311_names.py:31:1: AIR311 [*] `airflow.decorators.dag` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.decorators.dag` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:31:1
|
||||
|
|
||||
30 | # airflow.decorators
|
||||
31 | dag()
|
||||
| ^^^ AIR311
|
||||
| ^^^
|
||||
32 | task()
|
||||
33 | task_group()
|
||||
|
|
||||
= help: Use `dag` from `airflow.sdk` instead.
|
||||
help: Use `dag` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
10 10 | )
|
||||
|
|
@ -215,16 +223,17 @@ AIR311_names.py:31:1: AIR311 [*] `airflow.decorators.dag` is removed in Airflow
|
|||
19 19 | # airflow
|
||||
20 20 | DatasetFromRoot()
|
||||
|
||||
AIR311_names.py:32:1: AIR311 [*] `airflow.decorators.task` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.decorators.task` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:32:1
|
||||
|
|
||||
30 | # airflow.decorators
|
||||
31 | dag()
|
||||
32 | task()
|
||||
| ^^^^ AIR311
|
||||
| ^^^^
|
||||
33 | task_group()
|
||||
34 | setup()
|
||||
|
|
||||
= help: Use `task` from `airflow.sdk` instead.
|
||||
help: Use `task` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | from airflow.decorators import (
|
||||
|
|
@ -238,16 +247,17 @@ AIR311_names.py:32:1: AIR311 [*] `airflow.decorators.task` is removed in Airflow
|
|||
19 19 | # airflow
|
||||
20 20 | DatasetFromRoot()
|
||||
|
||||
AIR311_names.py:33:1: AIR311 [*] `airflow.decorators.task_group` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.decorators.task_group` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:33:1
|
||||
|
|
||||
31 | dag()
|
||||
32 | task()
|
||||
33 | task_group()
|
||||
| ^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^
|
||||
34 | setup()
|
||||
35 | from airflow.decorators import teardown
|
||||
|
|
||||
= help: Use `task_group` from `airflow.sdk` instead.
|
||||
help: Use `task_group` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
13 13 | dag,
|
||||
|
|
@ -260,16 +270,17 @@ AIR311_names.py:33:1: AIR311 [*] `airflow.decorators.task_group` is removed in A
|
|||
19 19 | # airflow
|
||||
20 20 | DatasetFromRoot()
|
||||
|
||||
AIR311_names.py:34:1: AIR311 [*] `airflow.decorators.setup` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.decorators.setup` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:34:1
|
||||
|
|
||||
32 | task()
|
||||
33 | task_group()
|
||||
34 | setup()
|
||||
| ^^^^^ AIR311
|
||||
| ^^^^^
|
||||
35 | from airflow.decorators import teardown
|
||||
36 | from airflow.io.path import ObjectStoragePath
|
||||
|
|
||||
= help: Use `setup` from `airflow.sdk` instead.
|
||||
help: Use `setup` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
11 11 | from airflow.datasets.metadata import Metadata
|
||||
|
|
@ -284,15 +295,16 @@ AIR311_names.py:34:1: AIR311 [*] `airflow.decorators.setup` is removed in Airflo
|
|||
19 19 | # airflow
|
||||
20 20 | DatasetFromRoot()
|
||||
|
||||
AIR311_names.py:48:1: AIR311 [*] `airflow.decorators.teardown` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.decorators.teardown` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:48:1
|
||||
|
|
||||
47 | # airflow.decorators
|
||||
48 | teardown()
|
||||
| ^^^^^^^^ AIR311
|
||||
| ^^^^^^^^
|
||||
49 |
|
||||
50 | # # airflow.io
|
||||
|
|
||||
= help: Use `teardown` from `airflow.sdk` instead.
|
||||
help: Use `teardown` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
32 32 | task()
|
||||
|
|
@ -311,14 +323,15 @@ AIR311_names.py:48:1: AIR311 [*] `airflow.decorators.teardown` is removed in Air
|
|||
47 47 | # airflow.decorators
|
||||
48 48 | teardown()
|
||||
|
||||
AIR311_names.py:51:1: AIR311 [*] `airflow.io.path.ObjectStoragePath` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.io.path.ObjectStoragePath` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:51:1
|
||||
|
|
||||
50 | # # airflow.io
|
||||
51 | ObjectStoragePath()
|
||||
| ^^^^^^^^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
52 | attach()
|
||||
|
|
||||
= help: Use `ObjectStoragePath` from `airflow.sdk` instead.
|
||||
help: Use `ObjectStoragePath` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
33 33 | task_group()
|
||||
|
|
@ -337,16 +350,17 @@ AIR311_names.py:51:1: AIR311 [*] `airflow.io.path.ObjectStoragePath` is removed
|
|||
47 47 | # airflow.decorators
|
||||
48 48 | teardown()
|
||||
|
||||
AIR311_names.py:52:1: AIR311 [*] `airflow.io.storage.attach` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.io.storage.attach` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:52:1
|
||||
|
|
||||
50 | # # airflow.io
|
||||
51 | ObjectStoragePath()
|
||||
52 | attach()
|
||||
| ^^^^^^ AIR311
|
||||
| ^^^^^^
|
||||
53 |
|
||||
54 | # airflow.models
|
||||
|
|
||||
= help: Use `attach` from `airflow.sdk.io` instead.
|
||||
help: Use `attach` from `airflow.sdk.io` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
34 34 | setup()
|
||||
|
|
@ -365,15 +379,16 @@ AIR311_names.py:52:1: AIR311 [*] `airflow.io.storage.attach` is removed in Airfl
|
|||
47 47 | # airflow.decorators
|
||||
48 48 | teardown()
|
||||
|
||||
AIR311_names.py:55:1: AIR311 [*] `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.models.Connection` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:55:1
|
||||
|
|
||||
54 | # airflow.models
|
||||
55 | Connection()
|
||||
| ^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^
|
||||
56 | DAGFromModel()
|
||||
57 | Variable()
|
||||
|
|
||||
= help: Use `Connection` from `airflow.sdk` instead.
|
||||
help: Use `Connection` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
37 37 | from airflow.io.storage import attach
|
||||
|
|
@ -390,15 +405,16 @@ AIR311_names.py:55:1: AIR311 [*] `airflow.models.Connection` is removed in Airfl
|
|||
47 47 | # airflow.decorators
|
||||
48 48 | teardown()
|
||||
|
||||
AIR311_names.py:56:1: AIR311 [*] `airflow.models.DAG` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.models.DAG` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:56:1
|
||||
|
|
||||
54 | # airflow.models
|
||||
55 | Connection()
|
||||
56 | DAGFromModel()
|
||||
| ^^^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^^^
|
||||
57 | Variable()
|
||||
|
|
||||
= help: Use `DAG` from `airflow.sdk` instead.
|
||||
help: Use `DAG` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
43 43 | from airflow.models.baseoperator import chain, chain_linear, cross_downstream
|
||||
|
|
@ -418,16 +434,17 @@ AIR311_names.py:56:1: AIR311 [*] `airflow.models.DAG` is removed in Airflow 3.0;
|
|||
58 59 |
|
||||
59 60 | # airflow.models.baseoperator
|
||||
|
||||
AIR311_names.py:57:1: AIR311 [*] `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.models.Variable` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:57:1
|
||||
|
|
||||
55 | Connection()
|
||||
56 | DAGFromModel()
|
||||
57 | Variable()
|
||||
| ^^^^^^^^ AIR311
|
||||
| ^^^^^^^^
|
||||
58 |
|
||||
59 | # airflow.models.baseoperator
|
||||
|
|
||||
= help: Use `Variable` from `airflow.sdk` instead.
|
||||
help: Use `Variable` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
38 38 | from airflow.models import DAG as DAGFromModel
|
||||
|
|
@ -443,15 +460,16 @@ AIR311_names.py:57:1: AIR311 [*] `airflow.models.Variable` is removed in Airflow
|
|||
47 47 | # airflow.decorators
|
||||
48 48 | teardown()
|
||||
|
||||
AIR311_names.py:60:1: AIR311 [*] `airflow.models.baseoperator.chain` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.models.baseoperator.chain` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:60:1
|
||||
|
|
||||
59 | # airflow.models.baseoperator
|
||||
60 | chain()
|
||||
| ^^^^^ AIR311
|
||||
| ^^^^^
|
||||
61 | chain_linear()
|
||||
62 | cross_downstream()
|
||||
|
|
||||
= help: Use `chain` from `airflow.sdk` instead.
|
||||
help: Use `chain` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
40 40 | Connection,
|
||||
|
|
@ -466,15 +484,16 @@ AIR311_names.py:60:1: AIR311 [*] `airflow.models.baseoperator.chain` is removed
|
|||
47 48 | # airflow.decorators
|
||||
48 49 | teardown()
|
||||
|
||||
AIR311_names.py:61:1: AIR311 [*] `airflow.models.baseoperator.chain_linear` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.models.baseoperator.chain_linear` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:61:1
|
||||
|
|
||||
59 | # airflow.models.baseoperator
|
||||
60 | chain()
|
||||
61 | chain_linear()
|
||||
| ^^^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^^^
|
||||
62 | cross_downstream()
|
||||
|
|
||||
= help: Use `chain_linear` from `airflow.sdk` instead.
|
||||
help: Use `chain_linear` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
40 40 | Connection,
|
||||
|
|
@ -489,16 +508,17 @@ AIR311_names.py:61:1: AIR311 [*] `airflow.models.baseoperator.chain_linear` is r
|
|||
47 48 | # airflow.decorators
|
||||
48 49 | teardown()
|
||||
|
||||
AIR311_names.py:62:1: AIR311 [*] `airflow.models.baseoperator.cross_downstream` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.models.baseoperator.cross_downstream` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:62:1
|
||||
|
|
||||
60 | chain()
|
||||
61 | chain_linear()
|
||||
62 | cross_downstream()
|
||||
| ^^^^^^^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
63 |
|
||||
64 | # airflow.models.baseoperatolinker
|
||||
|
|
||||
= help: Use `cross_downstream` from `airflow.sdk` instead.
|
||||
help: Use `cross_downstream` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
40 40 | Connection,
|
||||
|
|
@ -513,15 +533,16 @@ AIR311_names.py:62:1: AIR311 [*] `airflow.models.baseoperator.cross_downstream`
|
|||
47 48 | # airflow.decorators
|
||||
48 49 | teardown()
|
||||
|
||||
AIR311_names.py:65:1: AIR311 [*] `airflow.models.baseoperatorlink.BaseOperatorLink` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.models.baseoperatorlink.BaseOperatorLink` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:65:1
|
||||
|
|
||||
64 | # airflow.models.baseoperatolinker
|
||||
65 | BaseOperatorLink()
|
||||
| ^^^^^^^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
66 |
|
||||
67 | # airflow.models.dag
|
||||
|
|
||||
= help: Use `BaseOperatorLink` from `airflow.sdk` instead.
|
||||
help: Use `BaseOperatorLink` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
41 41 | Variable,
|
||||
|
|
@ -534,15 +555,16 @@ AIR311_names.py:65:1: AIR311 [*] `airflow.models.baseoperatorlink.BaseOperatorLi
|
|||
47 47 | # airflow.decorators
|
||||
48 48 | teardown()
|
||||
|
||||
AIR311_names.py:68:1: AIR311 [*] `airflow.models.dag.DAG` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.models.dag.DAG` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:68:1
|
||||
|
|
||||
67 | # airflow.models.dag
|
||||
68 | DAGFromDag()
|
||||
| ^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^
|
||||
69 | from airflow.timetables.datasets import DatasetOrTimeSchedule
|
||||
70 | from airflow.utils.dag_parsing_context import get_parsing_context
|
||||
|
|
||||
= help: Use `DAG` from `airflow.sdk` instead.
|
||||
help: Use `DAG` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
43 43 | from airflow.models.baseoperator import chain, chain_linear, cross_downstream
|
||||
|
|
@ -562,15 +584,16 @@ AIR311_names.py:68:1: AIR311 [*] `airflow.models.dag.DAG` is removed in Airflow
|
|||
70 71 | from airflow.utils.dag_parsing_context import get_parsing_context
|
||||
71 72 |
|
||||
|
||||
AIR311_names.py:73:1: AIR311 [*] `airflow.timetables.datasets.DatasetOrTimeSchedule` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.timetables.datasets.DatasetOrTimeSchedule` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:73:1
|
||||
|
|
||||
72 | # airflow.timetables.datasets
|
||||
73 | DatasetOrTimeSchedule()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
74 |
|
||||
75 | # airflow.utils.dag_parsing_context
|
||||
|
|
||||
= help: Use `AssetOrTimeSchedule` from `airflow.timetables.assets` instead.
|
||||
help: Use `AssetOrTimeSchedule` from `airflow.timetables.assets` instead.
|
||||
|
||||
ℹ Safe fix
|
||||
68 68 | DAGFromDag()
|
||||
|
|
@ -585,13 +608,14 @@ AIR311_names.py:73:1: AIR311 [*] `airflow.timetables.datasets.DatasetOrTimeSched
|
|||
75 76 | # airflow.utils.dag_parsing_context
|
||||
76 77 | get_parsing_context()
|
||||
|
||||
AIR311_names.py:76:1: AIR311 [*] `airflow.utils.dag_parsing_context.get_parsing_context` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR311 [*] `airflow.utils.dag_parsing_context.get_parsing_context` is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR311_names.py:76:1
|
||||
|
|
||||
75 | # airflow.utils.dag_parsing_context
|
||||
76 | get_parsing_context()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR311
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Use `get_parsing_context` from `airflow.sdk` instead.
|
||||
help: Use `get_parsing_context` from `airflow.sdk` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
67 67 | # airflow.models.dag
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/airflow/mod.rs
|
||||
---
|
||||
AIR312.py:14:1: AIR312 [*] `airflow.hooks.filesystem.FSHook` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.hooks.filesystem.FSHook` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:14:1
|
||||
|
|
||||
12 | from airflow.sensors.date_time import DateTimeSensor
|
||||
13 |
|
||||
14 | FSHook()
|
||||
| ^^^^^^ AIR312
|
||||
| ^^^^^^
|
||||
15 | PackageIndexHook()
|
||||
16 | SubprocessHook()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `FSHook` from `airflow.providers.standard.hooks.filesystem` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `FSHook` from `airflow.providers.standard.hooks.filesystem` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -28,14 +29,15 @@ AIR312.py:14:1: AIR312 [*] `airflow.hooks.filesystem.FSHook` is deprecated and m
|
|||
14 14 | FSHook()
|
||||
15 15 | PackageIndexHook()
|
||||
|
||||
AIR312.py:15:1: AIR312 [*] `airflow.hooks.package_index.PackageIndexHook` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.hooks.package_index.PackageIndexHook` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:15:1
|
||||
|
|
||||
14 | FSHook()
|
||||
15 | PackageIndexHook()
|
||||
| ^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
16 | SubprocessHook()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `PackageIndexHook` from `airflow.providers.standard.hooks.package_index` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `PackageIndexHook` from `airflow.providers.standard.hooks.package_index` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | from __future__ import annotations
|
||||
|
|
@ -54,16 +56,17 @@ AIR312.py:15:1: AIR312 [*] `airflow.hooks.package_index.PackageIndexHook` is dep
|
|||
14 14 | FSHook()
|
||||
15 15 | PackageIndexHook()
|
||||
|
||||
AIR312.py:16:1: AIR312 [*] `airflow.hooks.subprocess.SubprocessHook` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.hooks.subprocess.SubprocessHook` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:16:1
|
||||
|
|
||||
14 | FSHook()
|
||||
15 | PackageIndexHook()
|
||||
16 | SubprocessHook()
|
||||
| ^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^
|
||||
17 |
|
||||
18 | BashOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `SubprocessHook` from `airflow.providers.standard.hooks.subprocess` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `SubprocessHook` from `airflow.providers.standard.hooks.subprocess` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
@ -82,16 +85,17 @@ AIR312.py:16:1: AIR312 [*] `airflow.hooks.subprocess.SubprocessHook` is deprecat
|
|||
14 14 | FSHook()
|
||||
15 15 | PackageIndexHook()
|
||||
|
||||
AIR312.py:18:1: AIR312 [*] `airflow.operators.bash.BashOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.operators.bash.BashOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:18:1
|
||||
|
|
||||
16 | SubprocessHook()
|
||||
17 |
|
||||
18 | BashOperator()
|
||||
| ^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^
|
||||
19 | BranchDateTimeOperator()
|
||||
20 | TriggerDagRunOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `BashOperator` from `airflow.providers.standard.operators.bash` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `BashOperator` from `airflow.providers.standard.operators.bash` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
3 3 | from airflow.hooks.filesystem import FSHook
|
||||
|
|
@ -109,15 +113,16 @@ AIR312.py:18:1: AIR312 [*] `airflow.operators.bash.BashOperator` is deprecated a
|
|||
14 14 | FSHook()
|
||||
15 15 | PackageIndexHook()
|
||||
|
||||
AIR312.py:19:1: AIR312 [*] `airflow.operators.datetime.BranchDateTimeOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.operators.datetime.BranchDateTimeOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:19:1
|
||||
|
|
||||
18 | BashOperator()
|
||||
19 | BranchDateTimeOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
20 | TriggerDagRunOperator()
|
||||
21 | EmptyOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `BranchDateTimeOperator` from `airflow.providers.standard.operators.datetime` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `BranchDateTimeOperator` from `airflow.providers.standard.operators.datetime` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
4 4 | from airflow.hooks.package_index import PackageIndexHook
|
||||
|
|
@ -134,15 +139,16 @@ AIR312.py:19:1: AIR312 [*] `airflow.operators.datetime.BranchDateTimeOperator` i
|
|||
14 14 | FSHook()
|
||||
15 15 | PackageIndexHook()
|
||||
|
||||
AIR312.py:20:1: AIR312 [*] `airflow.operators.trigger_dagrun.TriggerDagRunOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.operators.trigger_dagrun.TriggerDagRunOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:20:1
|
||||
|
|
||||
18 | BashOperator()
|
||||
19 | BranchDateTimeOperator()
|
||||
20 | TriggerDagRunOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
21 | EmptyOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.2` and use `TriggerDagRunOperator` from `airflow.providers.standard.operators.trigger_dagrun` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.2` and use `TriggerDagRunOperator` from `airflow.providers.standard.operators.trigger_dagrun` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
7 7 | from airflow.operators.datetime import BranchDateTimeOperator
|
||||
|
|
@ -156,16 +162,17 @@ AIR312.py:20:1: AIR312 [*] `airflow.operators.trigger_dagrun.TriggerDagRunOperat
|
|||
14 14 | FSHook()
|
||||
15 15 | PackageIndexHook()
|
||||
|
||||
AIR312.py:21:1: AIR312 [*] `airflow.operators.empty.EmptyOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.operators.empty.EmptyOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:21:1
|
||||
|
|
||||
19 | BranchDateTimeOperator()
|
||||
20 | TriggerDagRunOperator()
|
||||
21 | EmptyOperator()
|
||||
| ^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^
|
||||
22 |
|
||||
23 | LatestOnlyOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.2` and use `EmptyOperator` from `airflow.providers.standard.operators.empty` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.2` and use `EmptyOperator` from `airflow.providers.standard.operators.empty` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
5 5 | from airflow.hooks.subprocess import SubprocessHook
|
||||
|
|
@ -181,16 +188,17 @@ AIR312.py:21:1: AIR312 [*] `airflow.operators.empty.EmptyOperator` is deprecated
|
|||
14 14 | FSHook()
|
||||
15 15 | PackageIndexHook()
|
||||
|
||||
AIR312.py:23:1: AIR312 [*] `airflow.operators.latest_only.LatestOnlyOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.operators.latest_only.LatestOnlyOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:23:1
|
||||
|
|
||||
21 | EmptyOperator()
|
||||
22 |
|
||||
23 | LatestOnlyOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
24 | BranchDayOfWeekOperator()
|
||||
25 | DateTimeSensor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `LatestOnlyOperator` from `airflow.providers.standard.operators.latest_only` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `LatestOnlyOperator` from `airflow.providers.standard.operators.latest_only` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
6 6 | from airflow.operators.bash import BashOperator
|
||||
|
|
@ -205,14 +213,15 @@ AIR312.py:23:1: AIR312 [*] `airflow.operators.latest_only.LatestOnlyOperator` is
|
|||
14 14 | FSHook()
|
||||
15 15 | PackageIndexHook()
|
||||
|
||||
AIR312.py:24:1: AIR312 [*] `airflow.operators.weekday.BranchDayOfWeekOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.operators.weekday.BranchDayOfWeekOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:24:1
|
||||
|
|
||||
23 | LatestOnlyOperator()
|
||||
24 | BranchDayOfWeekOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
25 | DateTimeSensor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `BranchDayOfWeekOperator` from `airflow.providers.standard.operators.weekday` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `BranchDayOfWeekOperator` from `airflow.providers.standard.operators.weekday` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
8 8 | from airflow.operators.empty import EmptyOperator
|
||||
|
|
@ -225,16 +234,17 @@ AIR312.py:24:1: AIR312 [*] `airflow.operators.weekday.BranchDayOfWeekOperator` i
|
|||
14 14 | FSHook()
|
||||
15 15 | PackageIndexHook()
|
||||
|
||||
AIR312.py:25:1: AIR312 [*] `airflow.sensors.date_time.DateTimeSensor` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.sensors.date_time.DateTimeSensor` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:25:1
|
||||
|
|
||||
23 | LatestOnlyOperator()
|
||||
24 | BranchDayOfWeekOperator()
|
||||
25 | DateTimeSensor()
|
||||
| ^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^
|
||||
26 |
|
||||
27 | from airflow.operators.python import (
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `DateTimeSensor` from `airflow.providers.standard.sensors.date_time` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `DateTimeSensor` from `airflow.providers.standard.sensors.date_time` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
9 9 | from airflow.operators.latest_only import LatestOnlyOperator
|
||||
|
|
@ -246,16 +256,17 @@ AIR312.py:25:1: AIR312 [*] `airflow.sensors.date_time.DateTimeSensor` is depreca
|
|||
14 14 | FSHook()
|
||||
15 15 | PackageIndexHook()
|
||||
|
||||
AIR312.py:44:1: AIR312 [*] `airflow.operators.python.BranchPythonOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.operators.python.BranchPythonOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:44:1
|
||||
|
|
||||
42 | from airflow.sensors.filesystem import FileSensor
|
||||
43 |
|
||||
44 | BranchPythonOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
45 | PythonOperator()
|
||||
46 | PythonVirtualenvOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `BranchPythonOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `BranchPythonOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
25 25 | DateTimeSensor()
|
||||
|
|
@ -274,15 +285,16 @@ AIR312.py:44:1: AIR312 [*] `airflow.operators.python.BranchPythonOperator` is de
|
|||
44 44 | BranchPythonOperator()
|
||||
45 45 | PythonOperator()
|
||||
|
||||
AIR312.py:45:1: AIR312 [*] `airflow.operators.python.PythonOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.operators.python.PythonOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:45:1
|
||||
|
|
||||
44 | BranchPythonOperator()
|
||||
45 | PythonOperator()
|
||||
| ^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^
|
||||
46 | PythonVirtualenvOperator()
|
||||
47 | ShortCircuitOperator()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `PythonOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `PythonOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
26 26 |
|
||||
|
|
@ -301,16 +313,17 @@ AIR312.py:45:1: AIR312 [*] `airflow.operators.python.PythonOperator` is deprecat
|
|||
44 44 | BranchPythonOperator()
|
||||
45 45 | PythonOperator()
|
||||
|
||||
AIR312.py:46:1: AIR312 [*] `airflow.operators.python.PythonVirtualenvOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.operators.python.PythonVirtualenvOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:46:1
|
||||
|
|
||||
44 | BranchPythonOperator()
|
||||
45 | PythonOperator()
|
||||
46 | PythonVirtualenvOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
47 | ShortCircuitOperator()
|
||||
48 | DateTimeSensorAsync()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `PythonVirtualenvOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `PythonVirtualenvOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
27 27 | from airflow.operators.python import (
|
||||
|
|
@ -329,16 +342,17 @@ AIR312.py:46:1: AIR312 [*] `airflow.operators.python.PythonVirtualenvOperator` i
|
|||
44 44 | BranchPythonOperator()
|
||||
45 45 | PythonOperator()
|
||||
|
||||
AIR312.py:47:1: AIR312 [*] `airflow.operators.python.ShortCircuitOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.operators.python.ShortCircuitOperator` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:47:1
|
||||
|
|
||||
45 | PythonOperator()
|
||||
46 | PythonVirtualenvOperator()
|
||||
47 | ShortCircuitOperator()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
48 | DateTimeSensorAsync()
|
||||
49 | ExternalTaskMarker()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `ShortCircuitOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `ShortCircuitOperator` from `airflow.providers.standard.operators.python` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
28 28 | BranchPythonOperator,
|
||||
|
|
@ -357,16 +371,17 @@ AIR312.py:47:1: AIR312 [*] `airflow.operators.python.ShortCircuitOperator` is de
|
|||
44 44 | BranchPythonOperator()
|
||||
45 45 | PythonOperator()
|
||||
|
||||
AIR312.py:48:1: AIR312 [*] `airflow.sensors.date_time.DateTimeSensorAsync` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.sensors.date_time.DateTimeSensorAsync` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:48:1
|
||||
|
|
||||
46 | PythonVirtualenvOperator()
|
||||
47 | ShortCircuitOperator()
|
||||
48 | DateTimeSensorAsync()
|
||||
| ^^^^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
49 | ExternalTaskMarker()
|
||||
50 | ExternalTaskSensor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `DateTimeSensorAsync` from `airflow.providers.standard.sensors.date_time` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `DateTimeSensorAsync` from `airflow.providers.standard.sensors.date_time` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
30 30 | PythonVirtualenvOperator,
|
||||
|
|
@ -385,16 +400,17 @@ AIR312.py:48:1: AIR312 [*] `airflow.sensors.date_time.DateTimeSensorAsync` is de
|
|||
44 44 | BranchPythonOperator()
|
||||
45 45 | PythonOperator()
|
||||
|
||||
AIR312.py:49:1: AIR312 [*] `airflow.sensors.external_task.ExternalTaskMarker` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.sensors.external_task.ExternalTaskMarker` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:49:1
|
||||
|
|
||||
47 | ShortCircuitOperator()
|
||||
48 | DateTimeSensorAsync()
|
||||
49 | ExternalTaskMarker()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
50 | ExternalTaskSensor()
|
||||
51 | FileSensor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `ExternalTaskMarker` from `airflow.providers.standard.sensors.external_task` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `ExternalTaskMarker` from `airflow.providers.standard.sensors.external_task` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
32 32 | )
|
||||
|
|
@ -413,16 +429,17 @@ AIR312.py:49:1: AIR312 [*] `airflow.sensors.external_task.ExternalTaskMarker` is
|
|||
44 44 | BranchPythonOperator()
|
||||
45 45 | PythonOperator()
|
||||
|
||||
AIR312.py:50:1: AIR312 [*] `airflow.sensors.external_task.ExternalTaskSensor` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.sensors.external_task.ExternalTaskSensor` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:50:1
|
||||
|
|
||||
48 | DateTimeSensorAsync()
|
||||
49 | ExternalTaskMarker()
|
||||
50 | ExternalTaskSensor()
|
||||
| ^^^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
51 | FileSensor()
|
||||
52 | TimeSensor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `ExternalTaskSensor` from `airflow.providers.standard.sensors.external_task` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `ExternalTaskSensor` from `airflow.providers.standard.sensors.external_task` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
33 33 | from airflow.sensors.date_time import DateTimeSensorAsync
|
||||
|
|
@ -440,16 +457,17 @@ AIR312.py:50:1: AIR312 [*] `airflow.sensors.external_task.ExternalTaskSensor` is
|
|||
44 44 | BranchPythonOperator()
|
||||
45 45 | PythonOperator()
|
||||
|
||||
AIR312.py:51:1: AIR312 [*] `airflow.sensors.filesystem.FileSensor` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.sensors.filesystem.FileSensor` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:51:1
|
||||
|
|
||||
49 | ExternalTaskMarker()
|
||||
50 | ExternalTaskSensor()
|
||||
51 | FileSensor()
|
||||
| ^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^
|
||||
52 | TimeSensor()
|
||||
53 | TimeSensorAsync()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.2` and use `FileSensor` from `airflow.providers.standard.sensors.filesystem` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.2` and use `FileSensor` from `airflow.providers.standard.sensors.filesystem` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
39 39 | TimeSensor,
|
||||
|
|
@ -461,15 +479,16 @@ AIR312.py:51:1: AIR312 [*] `airflow.sensors.filesystem.FileSensor` is deprecated
|
|||
44 44 | BranchPythonOperator()
|
||||
45 45 | PythonOperator()
|
||||
|
||||
AIR312.py:52:1: AIR312 [*] `airflow.sensors.time_sensor.TimeSensor` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.sensors.time_sensor.TimeSensor` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:52:1
|
||||
|
|
||||
50 | ExternalTaskSensor()
|
||||
51 | FileSensor()
|
||||
52 | TimeSensor()
|
||||
| ^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^
|
||||
53 | TimeSensorAsync()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `TimeSensor` from `airflow.providers.standard.sensors.time` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `TimeSensor` from `airflow.providers.standard.sensors.time` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
36 36 | ExternalTaskSensor,
|
||||
|
|
@ -484,16 +503,17 @@ AIR312.py:52:1: AIR312 [*] `airflow.sensors.time_sensor.TimeSensor` is deprecate
|
|||
44 44 | BranchPythonOperator()
|
||||
45 45 | PythonOperator()
|
||||
|
||||
AIR312.py:53:1: AIR312 [*] `airflow.sensors.time_sensor.TimeSensorAsync` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.sensors.time_sensor.TimeSensorAsync` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:53:1
|
||||
|
|
||||
51 | FileSensor()
|
||||
52 | TimeSensor()
|
||||
53 | TimeSensorAsync()
|
||||
| ^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^
|
||||
54 |
|
||||
55 | from airflow.sensors.time_delta import (
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `TimeSensorAsync` from `airflow.providers.standard.sensors.time` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `TimeSensorAsync` from `airflow.providers.standard.sensors.time` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
37 37 | )
|
||||
|
|
@ -507,16 +527,17 @@ AIR312.py:53:1: AIR312 [*] `airflow.sensors.time_sensor.TimeSensorAsync` is depr
|
|||
44 44 | BranchPythonOperator()
|
||||
45 45 | PythonOperator()
|
||||
|
||||
AIR312.py:70:1: AIR312 [*] `airflow.sensors.time_delta.TimeDeltaSensor` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.sensors.time_delta.TimeDeltaSensor` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:70:1
|
||||
|
|
||||
68 | )
|
||||
69 |
|
||||
70 | TimeDeltaSensor()
|
||||
| ^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^
|
||||
71 | TimeDeltaSensorAsync()
|
||||
72 | DayOfWeekSensor()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `TimeDeltaSensor` from `airflow.providers.standard.sensors.time_delta` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `TimeDeltaSensor` from `airflow.providers.standard.sensors.time_delta` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
53 53 | TimeSensorAsync()
|
||||
|
|
@ -535,15 +556,16 @@ AIR312.py:70:1: AIR312 [*] `airflow.sensors.time_delta.TimeDeltaSensor` is depre
|
|||
70 70 | TimeDeltaSensor()
|
||||
71 71 | TimeDeltaSensorAsync()
|
||||
|
||||
AIR312.py:71:1: AIR312 [*] `airflow.sensors.time_delta.TimeDeltaSensorAsync` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.sensors.time_delta.TimeDeltaSensorAsync` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:71:1
|
||||
|
|
||||
70 | TimeDeltaSensor()
|
||||
71 | TimeDeltaSensorAsync()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
72 | DayOfWeekSensor()
|
||||
73 | DagStateTrigger()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `TimeDeltaSensorAsync` from `airflow.providers.standard.sensors.time_delta` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `TimeDeltaSensorAsync` from `airflow.providers.standard.sensors.time_delta` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
54 54 |
|
||||
|
|
@ -562,16 +584,17 @@ AIR312.py:71:1: AIR312 [*] `airflow.sensors.time_delta.TimeDeltaSensorAsync` is
|
|||
70 70 | TimeDeltaSensor()
|
||||
71 71 | TimeDeltaSensorAsync()
|
||||
|
||||
AIR312.py:72:1: AIR312 [*] `airflow.sensors.weekday.DayOfWeekSensor` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.sensors.weekday.DayOfWeekSensor` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:72:1
|
||||
|
|
||||
70 | TimeDeltaSensor()
|
||||
71 | TimeDeltaSensorAsync()
|
||||
72 | DayOfWeekSensor()
|
||||
| ^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^
|
||||
73 | DagStateTrigger()
|
||||
74 | WorkflowTrigger()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.1` and use `DayOfWeekSensor` from `airflow.providers.standard.sensors.weekday` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.1` and use `DayOfWeekSensor` from `airflow.providers.standard.sensors.weekday` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
56 56 | TimeDeltaSensor,
|
||||
|
|
@ -590,16 +613,17 @@ AIR312.py:72:1: AIR312 [*] `airflow.sensors.weekday.DayOfWeekSensor` is deprecat
|
|||
70 70 | TimeDeltaSensor()
|
||||
71 71 | TimeDeltaSensorAsync()
|
||||
|
||||
AIR312.py:73:1: AIR312 [*] `airflow.triggers.external_task.DagStateTrigger` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.triggers.external_task.DagStateTrigger` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:73:1
|
||||
|
|
||||
71 | TimeDeltaSensorAsync()
|
||||
72 | DayOfWeekSensor()
|
||||
73 | DagStateTrigger()
|
||||
| ^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^
|
||||
74 | WorkflowTrigger()
|
||||
75 | FileTrigger()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `DagStateTrigger` from `airflow.providers.standard.triggers.external_task` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `DagStateTrigger` from `airflow.providers.standard.triggers.external_task` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
58 58 | )
|
||||
|
|
@ -618,16 +642,17 @@ AIR312.py:73:1: AIR312 [*] `airflow.triggers.external_task.DagStateTrigger` is d
|
|||
70 70 | TimeDeltaSensor()
|
||||
71 71 | TimeDeltaSensorAsync()
|
||||
|
||||
AIR312.py:74:1: AIR312 [*] `airflow.triggers.external_task.WorkflowTrigger` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.triggers.external_task.WorkflowTrigger` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:74:1
|
||||
|
|
||||
72 | DayOfWeekSensor()
|
||||
73 | DagStateTrigger()
|
||||
74 | WorkflowTrigger()
|
||||
| ^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^
|
||||
75 | FileTrigger()
|
||||
76 | DateTimeTrigger()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `WorkflowTrigger` from `airflow.providers.standard.triggers.external_task` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `WorkflowTrigger` from `airflow.providers.standard.triggers.external_task` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
59 59 | from airflow.sensors.weekday import DayOfWeekSensor
|
||||
|
|
@ -645,16 +670,17 @@ AIR312.py:74:1: AIR312 [*] `airflow.triggers.external_task.WorkflowTrigger` is d
|
|||
70 70 | TimeDeltaSensor()
|
||||
71 71 | TimeDeltaSensorAsync()
|
||||
|
||||
AIR312.py:75:1: AIR312 [*] `airflow.triggers.file.FileTrigger` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.triggers.file.FileTrigger` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:75:1
|
||||
|
|
||||
73 | DagStateTrigger()
|
||||
74 | WorkflowTrigger()
|
||||
75 | FileTrigger()
|
||||
| ^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^
|
||||
76 | DateTimeTrigger()
|
||||
77 | TimeDeltaTrigger()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `FileTrigger` from `airflow.providers.standard.triggers.file` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `FileTrigger` from `airflow.providers.standard.triggers.file` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
61 61 | DagStateTrigger,
|
||||
|
|
@ -670,15 +696,16 @@ AIR312.py:75:1: AIR312 [*] `airflow.triggers.file.FileTrigger` is deprecated and
|
|||
70 70 | TimeDeltaSensor()
|
||||
71 71 | TimeDeltaSensorAsync()
|
||||
|
||||
AIR312.py:76:1: AIR312 [*] `airflow.triggers.temporal.DateTimeTrigger` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.triggers.temporal.DateTimeTrigger` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:76:1
|
||||
|
|
||||
74 | WorkflowTrigger()
|
||||
75 | FileTrigger()
|
||||
76 | DateTimeTrigger()
|
||||
| ^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^
|
||||
77 | TimeDeltaTrigger()
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `DateTimeTrigger` from `airflow.providers.standard.triggers.temporal` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `DateTimeTrigger` from `airflow.providers.standard.triggers.temporal` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
63 63 | )
|
||||
|
|
@ -692,14 +719,15 @@ AIR312.py:76:1: AIR312 [*] `airflow.triggers.temporal.DateTimeTrigger` is deprec
|
|||
70 70 | TimeDeltaSensor()
|
||||
71 71 | TimeDeltaSensorAsync()
|
||||
|
||||
AIR312.py:77:1: AIR312 [*] `airflow.triggers.temporal.TimeDeltaTrigger` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
AIR312 [*] `airflow.triggers.temporal.TimeDeltaTrigger` is deprecated and moved into `standard` provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.
|
||||
--> AIR312.py:77:1
|
||||
|
|
||||
75 | FileTrigger()
|
||||
76 | DateTimeTrigger()
|
||||
77 | TimeDeltaTrigger()
|
||||
| ^^^^^^^^^^^^^^^^ AIR312
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Install `apache-airflow-providers-standard>=0.0.3` and use `TimeDeltaTrigger` from `airflow.providers.standard.triggers.temporal` instead.
|
||||
help: Install `apache-airflow-providers-standard>=0.0.3` and use `TimeDeltaTrigger` from `airflow.providers.standard.triggers.temporal` instead.
|
||||
|
||||
ℹ Unsafe fix
|
||||
64 64 | from airflow.triggers.file import FileTrigger
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/eradicate/mod.rs
|
||||
---
|
||||
ERA001.py:1:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:1:1
|
||||
|
|
||||
1 | #import os
|
||||
| ^^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^^
|
||||
2 | # from foo import junk
|
||||
3 | #a = 3
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
1 |-#import os
|
||||
|
|
@ -16,15 +17,16 @@ ERA001.py:1:1: ERA001 Found commented-out code
|
|||
3 2 | #a = 3
|
||||
4 3 | a = 4
|
||||
|
||||
ERA001.py:2:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:2:1
|
||||
|
|
||||
1 | #import os
|
||||
2 | # from foo import junk
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
3 | #a = 3
|
||||
4 | a = 4
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
1 1 | #import os
|
||||
|
|
@ -33,16 +35,17 @@ ERA001.py:2:1: ERA001 Found commented-out code
|
|||
4 3 | a = 4
|
||||
5 4 | #foo(1, 2, 3)
|
||||
|
||||
ERA001.py:3:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:3:1
|
||||
|
|
||||
1 | #import os
|
||||
2 | # from foo import junk
|
||||
3 | #a = 3
|
||||
| ^^^^^^ ERA001
|
||||
| ^^^^^^
|
||||
4 | a = 4
|
||||
5 | #foo(1, 2, 3)
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
1 1 | #import os
|
||||
|
|
@ -52,16 +55,17 @@ ERA001.py:3:1: ERA001 Found commented-out code
|
|||
5 4 | #foo(1, 2, 3)
|
||||
6 5 |
|
||||
|
||||
ERA001.py:5:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:5:1
|
||||
|
|
||||
3 | #a = 3
|
||||
4 | a = 4
|
||||
5 | #foo(1, 2, 3)
|
||||
| ^^^^^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^^^^^
|
||||
6 |
|
||||
7 | def foo(x, y, z):
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
2 2 | # from foo import junk
|
||||
|
|
@ -72,15 +76,16 @@ ERA001.py:5:1: ERA001 Found commented-out code
|
|||
7 6 | def foo(x, y, z):
|
||||
8 7 | content = 1 # print('hello')
|
||||
|
||||
ERA001.py:13:5: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:13:5
|
||||
|
|
||||
11 | # This is a real comment.
|
||||
12 | # # This is a (nested) comment.
|
||||
13 | #return True
|
||||
| ^^^^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^^^^
|
||||
14 | return False
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
10 10 |
|
||||
|
|
@ -91,14 +96,15 @@ ERA001.py:13:5: ERA001 Found commented-out code
|
|||
15 14 |
|
||||
16 15 | #import os # noqa: ERA001
|
||||
|
||||
ERA001.py:21:5: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:21:5
|
||||
|
|
||||
19 | class A():
|
||||
20 | pass
|
||||
21 | # b = c
|
||||
| ^^^^^^^ ERA001
|
||||
| ^^^^^^^
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
18 18 |
|
||||
|
|
@ -109,16 +115,17 @@ ERA001.py:21:5: ERA001 Found commented-out code
|
|||
23 22 |
|
||||
24 23 | dictionary = {
|
||||
|
||||
ERA001.py:26:5: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:26:5
|
||||
|
|
||||
24 | dictionary = {
|
||||
25 | # "key1": 123, # noqa: ERA001
|
||||
26 | # "key2": 456,
|
||||
| ^^^^^^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^^^^^^
|
||||
27 | # "key3": 789, # test
|
||||
28 | }
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
23 23 |
|
||||
|
|
@ -129,15 +136,16 @@ ERA001.py:26:5: ERA001 Found commented-out code
|
|||
28 27 | }
|
||||
29 28 |
|
||||
|
||||
ERA001.py:27:5: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:27:5
|
||||
|
|
||||
25 | # "key1": 123, # noqa: ERA001
|
||||
26 | # "key2": 456,
|
||||
27 | # "key3": 789, # test
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
28 | }
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
24 24 | dictionary = {
|
||||
|
|
@ -148,16 +156,17 @@ ERA001.py:27:5: ERA001 Found commented-out code
|
|||
29 28 |
|
||||
30 29 | #import os # noqa
|
||||
|
||||
ERA001.py:32:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:32:1
|
||||
|
|
||||
30 | #import os # noqa
|
||||
31 |
|
||||
32 | # case 1:
|
||||
| ^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^
|
||||
33 | # try:
|
||||
34 | # try: # with comment
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
29 29 |
|
||||
|
|
@ -168,15 +177,16 @@ ERA001.py:32:1: ERA001 Found commented-out code
|
|||
34 33 | # try: # with comment
|
||||
35 34 | # try: print()
|
||||
|
||||
ERA001.py:33:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:33:1
|
||||
|
|
||||
32 | # case 1:
|
||||
33 | # try:
|
||||
| ^^^^^^ ERA001
|
||||
| ^^^^^^
|
||||
34 | # try: # with comment
|
||||
35 | # try: print()
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
30 30 | #import os # noqa
|
||||
|
|
@ -187,16 +197,17 @@ ERA001.py:33:1: ERA001 Found commented-out code
|
|||
35 34 | # try: print()
|
||||
36 35 | # except:
|
||||
|
||||
ERA001.py:34:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:34:1
|
||||
|
|
||||
32 | # case 1:
|
||||
33 | # try:
|
||||
34 | # try: # with comment
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
35 | # try: print()
|
||||
36 | # except:
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
31 31 |
|
||||
|
|
@ -207,16 +218,17 @@ ERA001.py:34:1: ERA001 Found commented-out code
|
|||
36 35 | # except:
|
||||
37 36 | # except Foo:
|
||||
|
||||
ERA001.py:35:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:35:1
|
||||
|
|
||||
33 | # try:
|
||||
34 | # try: # with comment
|
||||
35 | # try: print()
|
||||
| ^^^^^^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^^^^^^
|
||||
36 | # except:
|
||||
37 | # except Foo:
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
32 32 | # case 1:
|
||||
|
|
@ -227,16 +239,17 @@ ERA001.py:35:1: ERA001 Found commented-out code
|
|||
37 36 | # except Foo:
|
||||
38 37 | # except Exception as e: print(e)
|
||||
|
||||
ERA001.py:36:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:36:1
|
||||
|
|
||||
34 | # try: # with comment
|
||||
35 | # try: print()
|
||||
36 | # except:
|
||||
| ^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^
|
||||
37 | # except Foo:
|
||||
38 | # except Exception as e: print(e)
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
33 33 | # try:
|
||||
|
|
@ -247,15 +260,16 @@ ERA001.py:36:1: ERA001 Found commented-out code
|
|||
38 37 | # except Exception as e: print(e)
|
||||
39 38 |
|
||||
|
||||
ERA001.py:37:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:37:1
|
||||
|
|
||||
35 | # try: print()
|
||||
36 | # except:
|
||||
37 | # except Foo:
|
||||
| ^^^^^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^^^^^
|
||||
38 | # except Exception as e: print(e)
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
34 34 | # try: # with comment
|
||||
|
|
@ -266,14 +280,15 @@ ERA001.py:37:1: ERA001 Found commented-out code
|
|||
39 38 |
|
||||
40 39 |
|
||||
|
||||
ERA001.py:38:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:38:1
|
||||
|
|
||||
36 | # except:
|
||||
37 | # except Foo:
|
||||
38 | # except Exception as e: print(e)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
35 35 | # try: print()
|
||||
|
|
@ -284,15 +299,16 @@ ERA001.py:38:1: ERA001 Found commented-out code
|
|||
40 39 |
|
||||
41 40 | # Script tag without an opening tag (Error)
|
||||
|
||||
ERA001.py:44:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:44:1
|
||||
|
|
||||
43 | # requires-python = ">=3.11"
|
||||
44 | # dependencies = [
|
||||
| ^^^^^^^^^^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
45 | # "requests<3",
|
||||
46 | # "rich",
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
41 41 | # Script tag without an opening tag (Error)
|
||||
|
|
@ -303,15 +319,16 @@ ERA001.py:44:1: ERA001 Found commented-out code
|
|||
46 45 | # "rich",
|
||||
47 46 | # ]
|
||||
|
||||
ERA001.py:47:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:47:1
|
||||
|
|
||||
45 | # "requests<3",
|
||||
46 | # "rich",
|
||||
47 | # ]
|
||||
| ^^^ ERA001
|
||||
| ^^^
|
||||
48 | # ///
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
44 44 | # dependencies = [
|
||||
|
|
@ -322,16 +339,17 @@ ERA001.py:47:1: ERA001 Found commented-out code
|
|||
49 48 |
|
||||
50 49 | # Script tag (OK)
|
||||
|
||||
ERA001.py:75:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:75:1
|
||||
|
|
||||
73 | # /// script
|
||||
74 | # requires-python = ">=3.11"
|
||||
75 | # dependencies = [
|
||||
| ^^^^^^^^^^^^^^^^^^ ERA001
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
76 | # "requests<3",
|
||||
77 | # "rich",
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
72 72 |
|
||||
|
|
@ -342,16 +360,17 @@ ERA001.py:75:1: ERA001 Found commented-out code
|
|||
77 76 | # "rich",
|
||||
78 77 | # ]
|
||||
|
||||
ERA001.py:78:1: ERA001 Found commented-out code
|
||||
ERA001 Found commented-out code
|
||||
--> ERA001.py:78:1
|
||||
|
|
||||
76 | # "requests<3",
|
||||
77 | # "rich",
|
||||
78 | # ]
|
||||
| ^^^ ERA001
|
||||
| ^^^
|
||||
79 |
|
||||
80 | # Script tag block followed by normal block (Ok)
|
||||
|
|
||||
= help: Remove commented-out code
|
||||
help: Remove commented-out code
|
||||
|
||||
ℹ Display-only fix
|
||||
75 75 | # dependencies = [
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/fastapi/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
FAST002_0.py:24:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:24:5
|
||||
|
|
||||
22 | @app.get("/items/")
|
||||
23 | def get_items(
|
||||
24 | current_user: User = Depends(get_current_user),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
25 | some_security_param: str = Security(get_oauth2_user),
|
||||
26 | ):
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -31,16 +31,17 @@ FAST002_0.py:24:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
26 27 | ):
|
||||
27 28 | pass
|
||||
|
||||
FAST002_0.py:25:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:25:5
|
||||
|
|
||||
23 | def get_items(
|
||||
24 | current_user: User = Depends(get_current_user),
|
||||
25 | some_security_param: str = Security(get_oauth2_user),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
26 | ):
|
||||
27 | pass
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -60,16 +61,17 @@ FAST002_0.py:25:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
27 28 | pass
|
||||
28 29 |
|
||||
|
||||
FAST002_0.py:32:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:32:5
|
||||
|
|
||||
30 | @app.post("/stuff/")
|
||||
31 | def do_stuff(
|
||||
32 | some_path_param: str = Path(),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
33 | some_cookie_param: str = Cookie(),
|
||||
34 | some_file_param: UploadFile = File(),
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -89,16 +91,17 @@ FAST002_0.py:32:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
34 35 | some_file_param: UploadFile = File(),
|
||||
35 36 | some_form_param: str = Form(),
|
||||
|
||||
FAST002_0.py:33:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:33:5
|
||||
|
|
||||
31 | def do_stuff(
|
||||
32 | some_path_param: str = Path(),
|
||||
33 | some_cookie_param: str = Cookie(),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
34 | some_file_param: UploadFile = File(),
|
||||
35 | some_form_param: str = Form(),
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -118,16 +121,17 @@ FAST002_0.py:33:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
35 36 | some_form_param: str = Form(),
|
||||
36 37 | some_query_param: str | None = Query(default=None),
|
||||
|
||||
FAST002_0.py:34:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:34:5
|
||||
|
|
||||
32 | some_path_param: str = Path(),
|
||||
33 | some_cookie_param: str = Cookie(),
|
||||
34 | some_file_param: UploadFile = File(),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
35 | some_form_param: str = Form(),
|
||||
36 | some_query_param: str | None = Query(default=None),
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -147,16 +151,17 @@ FAST002_0.py:34:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
36 37 | some_query_param: str | None = Query(default=None),
|
||||
37 38 | some_body_param: str = Body("foo"),
|
||||
|
||||
FAST002_0.py:35:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:35:5
|
||||
|
|
||||
33 | some_cookie_param: str = Cookie(),
|
||||
34 | some_file_param: UploadFile = File(),
|
||||
35 | some_form_param: str = Form(),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
36 | some_query_param: str | None = Query(default=None),
|
||||
37 | some_body_param: str = Body("foo"),
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -176,16 +181,17 @@ FAST002_0.py:35:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
37 38 | some_body_param: str = Body("foo"),
|
||||
38 39 | some_header_param: int = Header(default=5),
|
||||
|
||||
FAST002_0.py:36:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:36:5
|
||||
|
|
||||
34 | some_file_param: UploadFile = File(),
|
||||
35 | some_form_param: str = Form(),
|
||||
36 | some_query_param: str | None = Query(default=None),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
37 | some_body_param: str = Body("foo"),
|
||||
38 | some_header_param: int = Header(default=5),
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -205,16 +211,17 @@ FAST002_0.py:36:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
38 39 | some_header_param: int = Header(default=5),
|
||||
39 40 | ):
|
||||
|
||||
FAST002_0.py:37:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:37:5
|
||||
|
|
||||
35 | some_form_param: str = Form(),
|
||||
36 | some_query_param: str | None = Query(default=None),
|
||||
37 | some_body_param: str = Body("foo"),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
38 | some_header_param: int = Header(default=5),
|
||||
39 | ):
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -234,16 +241,17 @@ FAST002_0.py:37:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
39 40 | ):
|
||||
40 41 | # do stuff
|
||||
|
||||
FAST002_0.py:38:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:38:5
|
||||
|
|
||||
36 | some_query_param: str | None = Query(default=None),
|
||||
37 | some_body_param: str = Body("foo"),
|
||||
38 | some_header_param: int = Header(default=5),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
39 | ):
|
||||
40 | # do stuff
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -263,16 +271,17 @@ FAST002_0.py:38:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
40 41 | # do stuff
|
||||
41 42 | pass
|
||||
|
||||
FAST002_0.py:47:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:47:5
|
||||
|
|
||||
45 | skip: int,
|
||||
46 | limit: int,
|
||||
47 | current_user: User = Depends(get_current_user),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
48 | ):
|
||||
49 | pass
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -292,16 +301,17 @@ FAST002_0.py:47:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
49 50 | pass
|
||||
50 51 |
|
||||
|
||||
FAST002_0.py:53:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:53:5
|
||||
|
|
||||
51 | @app.get("/users/")
|
||||
52 | def get_users(
|
||||
53 | current_user: User = Depends(get_current_user),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
54 | skip: int = 0,
|
||||
55 | limit: int = 10,
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -321,14 +331,15 @@ FAST002_0.py:53:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
55 56 | limit: int = 10,
|
||||
56 57 | ):
|
||||
|
||||
FAST002_0.py:61:25: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:61:25
|
||||
|
|
||||
60 | @app.get("/items/{item_id}")
|
||||
61 | async def read_items(*, item_id: int = Path(title="The ID of the item to get"), q: str):
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
62 | pass
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -348,13 +359,14 @@ FAST002_0.py:61:25: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
63 64 |
|
||||
64 65 | # Non fixable errors
|
||||
|
||||
FAST002_0.py:70:5: FAST002 FastAPI dependency without `Annotated`
|
||||
FAST002 FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:70:5
|
||||
|
|
||||
68 | skip: int = 0,
|
||||
69 | limit: int = 10,
|
||||
70 | current_user: User = Depends(get_current_user),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
71 | ):
|
||||
72 | pass
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/fastapi/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
FAST002_0.py:24:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:24:5
|
||||
|
|
||||
22 | @app.get("/items/")
|
||||
23 | def get_items(
|
||||
24 | current_user: User = Depends(get_current_user),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
25 | some_security_param: str = Security(get_oauth2_user),
|
||||
26 | ):
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -31,16 +31,17 @@ FAST002_0.py:24:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
26 27 | ):
|
||||
27 28 | pass
|
||||
|
||||
FAST002_0.py:25:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:25:5
|
||||
|
|
||||
23 | def get_items(
|
||||
24 | current_user: User = Depends(get_current_user),
|
||||
25 | some_security_param: str = Security(get_oauth2_user),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
26 | ):
|
||||
27 | pass
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -60,16 +61,17 @@ FAST002_0.py:25:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
27 28 | pass
|
||||
28 29 |
|
||||
|
||||
FAST002_0.py:32:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:32:5
|
||||
|
|
||||
30 | @app.post("/stuff/")
|
||||
31 | def do_stuff(
|
||||
32 | some_path_param: str = Path(),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
33 | some_cookie_param: str = Cookie(),
|
||||
34 | some_file_param: UploadFile = File(),
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -89,16 +91,17 @@ FAST002_0.py:32:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
34 35 | some_file_param: UploadFile = File(),
|
||||
35 36 | some_form_param: str = Form(),
|
||||
|
||||
FAST002_0.py:33:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:33:5
|
||||
|
|
||||
31 | def do_stuff(
|
||||
32 | some_path_param: str = Path(),
|
||||
33 | some_cookie_param: str = Cookie(),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
34 | some_file_param: UploadFile = File(),
|
||||
35 | some_form_param: str = Form(),
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -118,16 +121,17 @@ FAST002_0.py:33:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
35 36 | some_form_param: str = Form(),
|
||||
36 37 | some_query_param: str | None = Query(default=None),
|
||||
|
||||
FAST002_0.py:34:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:34:5
|
||||
|
|
||||
32 | some_path_param: str = Path(),
|
||||
33 | some_cookie_param: str = Cookie(),
|
||||
34 | some_file_param: UploadFile = File(),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
35 | some_form_param: str = Form(),
|
||||
36 | some_query_param: str | None = Query(default=None),
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -147,16 +151,17 @@ FAST002_0.py:34:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
36 37 | some_query_param: str | None = Query(default=None),
|
||||
37 38 | some_body_param: str = Body("foo"),
|
||||
|
||||
FAST002_0.py:35:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:35:5
|
||||
|
|
||||
33 | some_cookie_param: str = Cookie(),
|
||||
34 | some_file_param: UploadFile = File(),
|
||||
35 | some_form_param: str = Form(),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
36 | some_query_param: str | None = Query(default=None),
|
||||
37 | some_body_param: str = Body("foo"),
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -176,16 +181,17 @@ FAST002_0.py:35:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
37 38 | some_body_param: str = Body("foo"),
|
||||
38 39 | some_header_param: int = Header(default=5),
|
||||
|
||||
FAST002_0.py:36:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:36:5
|
||||
|
|
||||
34 | some_file_param: UploadFile = File(),
|
||||
35 | some_form_param: str = Form(),
|
||||
36 | some_query_param: str | None = Query(default=None),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
37 | some_body_param: str = Body("foo"),
|
||||
38 | some_header_param: int = Header(default=5),
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -205,16 +211,17 @@ FAST002_0.py:36:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
38 39 | some_header_param: int = Header(default=5),
|
||||
39 40 | ):
|
||||
|
||||
FAST002_0.py:37:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:37:5
|
||||
|
|
||||
35 | some_form_param: str = Form(),
|
||||
36 | some_query_param: str | None = Query(default=None),
|
||||
37 | some_body_param: str = Body("foo"),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
38 | some_header_param: int = Header(default=5),
|
||||
39 | ):
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -234,16 +241,17 @@ FAST002_0.py:37:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
39 40 | ):
|
||||
40 41 | # do stuff
|
||||
|
||||
FAST002_0.py:38:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:38:5
|
||||
|
|
||||
36 | some_query_param: str | None = Query(default=None),
|
||||
37 | some_body_param: str = Body("foo"),
|
||||
38 | some_header_param: int = Header(default=5),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
39 | ):
|
||||
40 | # do stuff
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -263,16 +271,17 @@ FAST002_0.py:38:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
40 41 | # do stuff
|
||||
41 42 | pass
|
||||
|
||||
FAST002_0.py:47:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:47:5
|
||||
|
|
||||
45 | skip: int,
|
||||
46 | limit: int,
|
||||
47 | current_user: User = Depends(get_current_user),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
48 | ):
|
||||
49 | pass
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -292,16 +301,17 @@ FAST002_0.py:47:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
49 50 | pass
|
||||
50 51 |
|
||||
|
||||
FAST002_0.py:53:5: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:53:5
|
||||
|
|
||||
51 | @app.get("/users/")
|
||||
52 | def get_users(
|
||||
53 | current_user: User = Depends(get_current_user),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
54 | skip: int = 0,
|
||||
55 | limit: int = 10,
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -321,14 +331,15 @@ FAST002_0.py:53:5: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
55 56 | limit: int = 10,
|
||||
56 57 | ):
|
||||
|
||||
FAST002_0.py:61:25: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:61:25
|
||||
|
|
||||
60 | @app.get("/items/{item_id}")
|
||||
61 | async def read_items(*, item_id: int = Path(title="The ID of the item to get"), q: str):
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
62 | pass
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 | Security,
|
||||
|
|
@ -348,13 +359,14 @@ FAST002_0.py:61:25: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
63 64 |
|
||||
64 65 | # Non fixable errors
|
||||
|
||||
FAST002_0.py:70:5: FAST002 FastAPI dependency without `Annotated`
|
||||
FAST002 FastAPI dependency without `Annotated`
|
||||
--> FAST002_0.py:70:5
|
||||
|
|
||||
68 | skip: int = 0,
|
||||
69 | limit: int = 10,
|
||||
70 | current_user: User = Depends(get_current_user),
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
71 | ):
|
||||
72 | pass
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/fastapi/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
FAST002_1.py:10:13: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_1.py:10:13
|
||||
|
|
||||
9 | @app.get("/test")
|
||||
10 | def handler(echo: str = Query("")):
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
11 | return echo
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 | values. See #15043 for more details."""
|
||||
|
|
@ -27,14 +27,15 @@ FAST002_1.py:10:13: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
12 13 |
|
||||
13 14 |
|
||||
|
||||
FAST002_1.py:15:14: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_1.py:15:14
|
||||
|
|
||||
14 | @app.get("/test")
|
||||
15 | def handler2(echo: str = Query(default="")):
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
16 | return echo
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 | values. See #15043 for more details."""
|
||||
|
|
@ -54,14 +55,15 @@ FAST002_1.py:15:14: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
17 18 |
|
||||
18 19 |
|
||||
|
||||
FAST002_1.py:20:14: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_1.py:20:14
|
||||
|
|
||||
19 | @app.get("/test")
|
||||
20 | def handler3(echo: str = Query("123", min_length=3, max_length=50)):
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
21 | return echo
|
||||
|
|
||||
= help: Replace with `typing.Annotated`
|
||||
help: Replace with `typing.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 | values. See #15043 for more details."""
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/fastapi/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
FAST002_1.py:10:13: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_1.py:10:13
|
||||
|
|
||||
9 | @app.get("/test")
|
||||
10 | def handler(echo: str = Query("")):
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
11 | return echo
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 | values. See #15043 for more details."""
|
||||
|
|
@ -27,14 +27,15 @@ FAST002_1.py:10:13: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
12 13 |
|
||||
13 14 |
|
||||
|
||||
FAST002_1.py:15:14: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_1.py:15:14
|
||||
|
|
||||
14 | @app.get("/test")
|
||||
15 | def handler2(echo: str = Query(default="")):
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
16 | return echo
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 | values. See #15043 for more details."""
|
||||
|
|
@ -54,14 +55,15 @@ FAST002_1.py:15:14: FAST002 [*] FastAPI dependency without `Annotated`
|
|||
17 18 |
|
||||
18 19 |
|
||||
|
||||
FAST002_1.py:20:14: FAST002 [*] FastAPI dependency without `Annotated`
|
||||
FAST002 [*] FastAPI dependency without `Annotated`
|
||||
--> FAST002_1.py:20:14
|
||||
|
|
||||
19 | @app.get("/test")
|
||||
20 | def handler3(echo: str = Query("123", min_length=3, max_length=50)):
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST002
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
21 | return echo
|
||||
|
|
||||
= help: Replace with `typing_extensions.Annotated`
|
||||
help: Replace with `typing_extensions.Annotated`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 | values. See #15043 for more details."""
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/fastapi/mod.rs
|
||||
---
|
||||
FAST001.py:17:22: FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
--> FAST001.py:17:22
|
||||
|
|
||||
17 | @app.post("/items/", response_model=Item)
|
||||
| ^^^^^^^^^^^^^^^^^^^ FAST001
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
18 | async def create_item(item: Item) -> Item:
|
||||
19 | return item
|
||||
|
|
||||
= help: Remove argument
|
||||
help: Remove argument
|
||||
|
||||
ℹ Unsafe fix
|
||||
14 14 | # Errors
|
||||
|
|
@ -20,14 +21,15 @@ FAST001.py:17:22: FAST001 [*] FastAPI route with redundant `response_model` argu
|
|||
19 19 | return item
|
||||
20 20 |
|
||||
|
||||
FAST001.py:22:22: FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
--> FAST001.py:22:22
|
||||
|
|
||||
22 | @app.post("/items/", response_model=list[Item])
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ FAST001
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
23 | async def create_item(item: Item) -> list[Item]:
|
||||
24 | return item
|
||||
|
|
||||
= help: Remove argument
|
||||
help: Remove argument
|
||||
|
||||
ℹ Unsafe fix
|
||||
19 19 | return item
|
||||
|
|
@ -39,14 +41,15 @@ FAST001.py:22:22: FAST001 [*] FastAPI route with redundant `response_model` argu
|
|||
24 24 | return item
|
||||
25 25 |
|
||||
|
||||
FAST001.py:27:22: FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
--> FAST001.py:27:22
|
||||
|
|
||||
27 | @app.post("/items/", response_model=List[Item])
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ FAST001
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
28 | async def create_item(item: Item) -> List[Item]:
|
||||
29 | return item
|
||||
|
|
||||
= help: Remove argument
|
||||
help: Remove argument
|
||||
|
||||
ℹ Unsafe fix
|
||||
24 24 | return item
|
||||
|
|
@ -58,14 +61,15 @@ FAST001.py:27:22: FAST001 [*] FastAPI route with redundant `response_model` argu
|
|||
29 29 | return item
|
||||
30 30 |
|
||||
|
||||
FAST001.py:32:22: FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
--> FAST001.py:32:22
|
||||
|
|
||||
32 | @app.post("/items/", response_model=Dict[str, Item])
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FAST001
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
33 | async def create_item(item: Item) -> Dict[str, Item]:
|
||||
34 | return item
|
||||
|
|
||||
= help: Remove argument
|
||||
help: Remove argument
|
||||
|
||||
ℹ Unsafe fix
|
||||
29 29 | return item
|
||||
|
|
@ -77,14 +81,15 @@ FAST001.py:32:22: FAST001 [*] FastAPI route with redundant `response_model` argu
|
|||
34 34 | return item
|
||||
35 35 |
|
||||
|
||||
FAST001.py:37:22: FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
--> FAST001.py:37:22
|
||||
|
|
||||
37 | @app.post("/items/", response_model=str)
|
||||
| ^^^^^^^^^^^^^^^^^^ FAST001
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
38 | async def create_item(item: Item) -> str:
|
||||
39 | return item
|
||||
|
|
||||
= help: Remove argument
|
||||
help: Remove argument
|
||||
|
||||
ℹ Unsafe fix
|
||||
34 34 | return item
|
||||
|
|
@ -96,14 +101,15 @@ FAST001.py:37:22: FAST001 [*] FastAPI route with redundant `response_model` argu
|
|||
39 39 | return item
|
||||
40 40 |
|
||||
|
||||
FAST001.py:42:21: FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
--> FAST001.py:42:21
|
||||
|
|
||||
42 | @app.get("/items/", response_model=Item)
|
||||
| ^^^^^^^^^^^^^^^^^^^ FAST001
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
43 | async def create_item(item: Item) -> Item:
|
||||
44 | return item
|
||||
|
|
||||
= help: Remove argument
|
||||
help: Remove argument
|
||||
|
||||
ℹ Unsafe fix
|
||||
39 39 | return item
|
||||
|
|
@ -115,14 +121,15 @@ FAST001.py:42:21: FAST001 [*] FastAPI route with redundant `response_model` argu
|
|||
44 44 | return item
|
||||
45 45 |
|
||||
|
||||
FAST001.py:47:21: FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
--> FAST001.py:47:21
|
||||
|
|
||||
47 | @app.get("/items/", response_model=Item)
|
||||
| ^^^^^^^^^^^^^^^^^^^ FAST001
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
48 | @app.post("/items/", response_model=Item)
|
||||
49 | async def create_item(item: Item) -> Item:
|
||||
|
|
||||
= help: Remove argument
|
||||
help: Remove argument
|
||||
|
||||
ℹ Unsafe fix
|
||||
44 44 | return item
|
||||
|
|
@ -134,15 +141,16 @@ FAST001.py:47:21: FAST001 [*] FastAPI route with redundant `response_model` argu
|
|||
49 49 | async def create_item(item: Item) -> Item:
|
||||
50 50 | return item
|
||||
|
||||
FAST001.py:48:22: FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
--> FAST001.py:48:22
|
||||
|
|
||||
47 | @app.get("/items/", response_model=Item)
|
||||
48 | @app.post("/items/", response_model=Item)
|
||||
| ^^^^^^^^^^^^^^^^^^^ FAST001
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
49 | async def create_item(item: Item) -> Item:
|
||||
50 | return item
|
||||
|
|
||||
= help: Remove argument
|
||||
help: Remove argument
|
||||
|
||||
ℹ Unsafe fix
|
||||
45 45 |
|
||||
|
|
@ -154,14 +162,15 @@ FAST001.py:48:22: FAST001 [*] FastAPI route with redundant `response_model` argu
|
|||
50 50 | return item
|
||||
51 51 |
|
||||
|
||||
FAST001.py:53:24: FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
--> FAST001.py:53:24
|
||||
|
|
||||
53 | @router.get("/items/", response_model=Item)
|
||||
| ^^^^^^^^^^^^^^^^^^^ FAST001
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
54 | async def create_item(item: Item) -> Item:
|
||||
55 | return item
|
||||
|
|
||||
= help: Remove argument
|
||||
help: Remove argument
|
||||
|
||||
ℹ Unsafe fix
|
||||
50 50 | return item
|
||||
|
|
@ -173,16 +182,17 @@ FAST001.py:53:24: FAST001 [*] FastAPI route with redundant `response_model` argu
|
|||
55 55 | return item
|
||||
56 56 |
|
||||
|
||||
FAST001.py:118:23: FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
FAST001 [*] FastAPI route with redundant `response_model` argument
|
||||
--> FAST001.py:118:23
|
||||
|
|
||||
116 | def setup_app(app_arg: FastAPI, non_app: str) -> None:
|
||||
117 | # Error
|
||||
118 | @app_arg.get("/", response_model=str)
|
||||
| ^^^^^^^^^^^^^^^^^^ FAST001
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
119 | async def get_root() -> str:
|
||||
120 | return "Hello World!"
|
||||
|
|
||||
= help: Remove argument
|
||||
help: Remove argument
|
||||
|
||||
ℹ Unsafe fix
|
||||
115 115 |
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/fastapi/mod.rs
|
||||
---
|
||||
FAST003.py:9:19: FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:9:19
|
||||
|
|
||||
8 | # Errors
|
||||
9 | @app.get("/things/{thing_id}")
|
||||
| ^^^^^^^^^^ FAST003
|
||||
| ^^^^^^^^^^
|
||||
10 | async def read_thing(query: str):
|
||||
11 | return {"query": query}
|
||||
|
|
||||
= help: Add `thing_id` to function signature
|
||||
help: Add `thing_id` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
7 7 |
|
||||
|
|
@ -21,14 +22,15 @@ FAST003.py:9:19: FAST003 [*] Parameter `thing_id` appears in route path, but not
|
|||
12 12 |
|
||||
13 13 |
|
||||
|
||||
FAST003.py:14:23: FAST003 [*] Parameter `isbn` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `isbn` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:14:23
|
||||
|
|
||||
14 | @app.get("/books/isbn-{isbn}")
|
||||
| ^^^^^^ FAST003
|
||||
| ^^^^^^
|
||||
15 | async def read_thing():
|
||||
16 | ...
|
||||
|
|
||||
= help: Add `isbn` to function signature
|
||||
help: Add `isbn` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
12 12 |
|
||||
|
|
@ -40,14 +42,15 @@ FAST003.py:14:23: FAST003 [*] Parameter `isbn` appears in route path, but not in
|
|||
17 17 |
|
||||
18 18 |
|
||||
|
||||
FAST003.py:19:19: FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:19:19
|
||||
|
|
||||
19 | @app.get("/things/{thing_id:path}")
|
||||
| ^^^^^^^^^^^^^^^ FAST003
|
||||
| ^^^^^^^^^^^^^^^
|
||||
20 | async def read_thing(query: str):
|
||||
21 | return {"query": query}
|
||||
|
|
||||
= help: Add `thing_id` to function signature
|
||||
help: Add `thing_id` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
17 17 |
|
||||
|
|
@ -59,14 +62,15 @@ FAST003.py:19:19: FAST003 [*] Parameter `thing_id` appears in route path, but no
|
|||
22 22 |
|
||||
23 23 |
|
||||
|
||||
FAST003.py:24:19: FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:24:19
|
||||
|
|
||||
24 | @app.get("/things/{thing_id : path}")
|
||||
| ^^^^^^^^^^^^^^^^^ FAST003
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
25 | async def read_thing(query: str):
|
||||
26 | return {"query": query}
|
||||
|
|
||||
= help: Add `thing_id` to function signature
|
||||
help: Add `thing_id` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
22 22 |
|
||||
|
|
@ -78,14 +82,15 @@ FAST003.py:24:19: FAST003 [*] Parameter `thing_id` appears in route path, but no
|
|||
27 27 |
|
||||
28 28 |
|
||||
|
||||
FAST003.py:29:27: FAST003 [*] Parameter `title` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `title` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:29:27
|
||||
|
|
||||
29 | @app.get("/books/{author}/{title}")
|
||||
| ^^^^^^^ FAST003
|
||||
| ^^^^^^^
|
||||
30 | async def read_thing(author: str):
|
||||
31 | return {"author": author}
|
||||
|
|
||||
= help: Add `title` to function signature
|
||||
help: Add `title` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
27 27 |
|
||||
|
|
@ -97,14 +102,15 @@ FAST003.py:29:27: FAST003 [*] Parameter `title` appears in route path, but not i
|
|||
32 32 |
|
||||
33 33 |
|
||||
|
||||
FAST003.py:34:18: FAST003 [*] Parameter `author_name` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `author_name` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:34:18
|
||||
|
|
||||
34 | @app.get("/books/{author_name}/{title}")
|
||||
| ^^^^^^^^^^^^^ FAST003
|
||||
| ^^^^^^^^^^^^^
|
||||
35 | async def read_thing():
|
||||
36 | ...
|
||||
|
|
||||
= help: Add `author_name` to function signature
|
||||
help: Add `author_name` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
32 32 |
|
||||
|
|
@ -116,14 +122,15 @@ FAST003.py:34:18: FAST003 [*] Parameter `author_name` appears in route path, but
|
|||
37 37 |
|
||||
38 38 |
|
||||
|
||||
FAST003.py:34:32: FAST003 [*] Parameter `title` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `title` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:34:32
|
||||
|
|
||||
34 | @app.get("/books/{author_name}/{title}")
|
||||
| ^^^^^^^ FAST003
|
||||
| ^^^^^^^
|
||||
35 | async def read_thing():
|
||||
36 | ...
|
||||
|
|
||||
= help: Add `title` to function signature
|
||||
help: Add `title` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
32 32 |
|
||||
|
|
@ -135,30 +142,33 @@ FAST003.py:34:32: FAST003 [*] Parameter `title` appears in route path, but not i
|
|||
37 37 |
|
||||
38 38 |
|
||||
|
||||
FAST003.py:39:18: FAST003 Parameter `author` appears in route path, but only as a positional-only argument in `read_thing` signature
|
||||
FAST003 Parameter `author` appears in route path, but only as a positional-only argument in `read_thing` signature
|
||||
--> FAST003.py:39:18
|
||||
|
|
||||
39 | @app.get("/books/{author}/{title}")
|
||||
| ^^^^^^^^ FAST003
|
||||
| ^^^^^^^^
|
||||
40 | async def read_thing(author: str, title: str, /):
|
||||
41 | return {"author": author, "title": title}
|
||||
|
|
||||
|
||||
FAST003.py:39:27: FAST003 Parameter `title` appears in route path, but only as a positional-only argument in `read_thing` signature
|
||||
FAST003 Parameter `title` appears in route path, but only as a positional-only argument in `read_thing` signature
|
||||
--> FAST003.py:39:27
|
||||
|
|
||||
39 | @app.get("/books/{author}/{title}")
|
||||
| ^^^^^^^ FAST003
|
||||
| ^^^^^^^
|
||||
40 | async def read_thing(author: str, title: str, /):
|
||||
41 | return {"author": author, "title": title}
|
||||
|
|
||||
|
||||
FAST003.py:44:27: FAST003 [*] Parameter `title` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `title` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:44:27
|
||||
|
|
||||
44 | @app.get("/books/{author}/{title}/{page}")
|
||||
| ^^^^^^^ FAST003
|
||||
| ^^^^^^^
|
||||
45 | async def read_thing(
|
||||
46 | author: str,
|
||||
|
|
||||
= help: Add `title` to function signature
|
||||
help: Add `title` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
44 44 | @app.get("/books/{author}/{title}/{page}")
|
||||
|
|
@ -170,14 +180,15 @@ FAST003.py:44:27: FAST003 [*] Parameter `title` appears in route path, but not i
|
|||
49 49 |
|
||||
50 50 |
|
||||
|
||||
FAST003.py:44:35: FAST003 [*] Parameter `page` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `page` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:44:35
|
||||
|
|
||||
44 | @app.get("/books/{author}/{title}/{page}")
|
||||
| ^^^^^^ FAST003
|
||||
| ^^^^^^
|
||||
45 | async def read_thing(
|
||||
46 | author: str,
|
||||
|
|
||||
= help: Add `page` to function signature
|
||||
help: Add `page` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
44 44 | @app.get("/books/{author}/{title}/{page}")
|
||||
|
|
@ -189,14 +200,15 @@ FAST003.py:44:35: FAST003 [*] Parameter `page` appears in route path, but not in
|
|||
49 49 |
|
||||
50 50 |
|
||||
|
||||
FAST003.py:51:18: FAST003 [*] Parameter `author` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `author` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:51:18
|
||||
|
|
||||
51 | @app.get("/books/{author}/{title}")
|
||||
| ^^^^^^^^ FAST003
|
||||
| ^^^^^^^^
|
||||
52 | async def read_thing():
|
||||
53 | ...
|
||||
|
|
||||
= help: Add `author` to function signature
|
||||
help: Add `author` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
49 49 |
|
||||
|
|
@ -208,14 +220,15 @@ FAST003.py:51:18: FAST003 [*] Parameter `author` appears in route path, but not
|
|||
54 54 |
|
||||
55 55 |
|
||||
|
||||
FAST003.py:51:27: FAST003 [*] Parameter `title` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `title` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:51:27
|
||||
|
|
||||
51 | @app.get("/books/{author}/{title}")
|
||||
| ^^^^^^^ FAST003
|
||||
| ^^^^^^^
|
||||
52 | async def read_thing():
|
||||
53 | ...
|
||||
|
|
||||
= help: Add `title` to function signature
|
||||
help: Add `title` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
49 49 |
|
||||
|
|
@ -227,14 +240,15 @@ FAST003.py:51:27: FAST003 [*] Parameter `title` appears in route path, but not i
|
|||
54 54 |
|
||||
55 55 |
|
||||
|
||||
FAST003.py:56:27: FAST003 [*] Parameter `title` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `title` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:56:27
|
||||
|
|
||||
56 | @app.get("/books/{author}/{title}")
|
||||
| ^^^^^^^ FAST003
|
||||
| ^^^^^^^
|
||||
57 | async def read_thing(*, author: str):
|
||||
58 | ...
|
||||
|
|
||||
= help: Add `title` to function signature
|
||||
help: Add `title` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
54 54 |
|
||||
|
|
@ -246,14 +260,15 @@ FAST003.py:56:27: FAST003 [*] Parameter `title` appears in route path, but not i
|
|||
59 59 |
|
||||
60 60 |
|
||||
|
||||
FAST003.py:61:27: FAST003 [*] Parameter `title` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `title` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:61:27
|
||||
|
|
||||
61 | @app.get("/books/{author}/{title}")
|
||||
| ^^^^^^^ FAST003
|
||||
| ^^^^^^^
|
||||
62 | async def read_thing(hello, /, *, author: str):
|
||||
63 | ...
|
||||
|
|
||||
= help: Add `title` to function signature
|
||||
help: Add `title` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
59 59 |
|
||||
|
|
@ -265,14 +280,15 @@ FAST003.py:61:27: FAST003 [*] Parameter `title` appears in route path, but not i
|
|||
64 64 |
|
||||
65 65 |
|
||||
|
||||
FAST003.py:66:19: FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:66:19
|
||||
|
|
||||
66 | @app.get("/things/{thing_id}")
|
||||
| ^^^^^^^^^^ FAST003
|
||||
| ^^^^^^^^^^
|
||||
67 | async def read_thing(
|
||||
68 | query: str,
|
||||
|
|
||||
= help: Add `thing_id` to function signature
|
||||
help: Add `thing_id` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
65 65 |
|
||||
|
|
@ -284,14 +300,15 @@ FAST003.py:66:19: FAST003 [*] Parameter `thing_id` appears in route path, but no
|
|||
70 70 | return {"query": query}
|
||||
71 71 |
|
||||
|
||||
FAST003.py:73:19: FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:73:19
|
||||
|
|
||||
73 | @app.get("/things/{thing_id}")
|
||||
| ^^^^^^^^^^ FAST003
|
||||
| ^^^^^^^^^^
|
||||
74 | async def read_thing(
|
||||
75 | query: str = "default",
|
||||
|
|
||||
= help: Add `thing_id` to function signature
|
||||
help: Add `thing_id` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
72 72 |
|
||||
|
|
@ -303,14 +320,15 @@ FAST003.py:73:19: FAST003 [*] Parameter `thing_id` appears in route path, but no
|
|||
77 77 | return {"query": query}
|
||||
78 78 |
|
||||
|
||||
FAST003.py:80:19: FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `thing_id` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:80:19
|
||||
|
|
||||
80 | @app.get("/things/{thing_id}")
|
||||
| ^^^^^^^^^^ FAST003
|
||||
| ^^^^^^^^^^
|
||||
81 | async def read_thing(
|
||||
82 | *, query: str = "default",
|
||||
|
|
||||
= help: Add `thing_id` to function signature
|
||||
help: Add `thing_id` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
79 79 |
|
||||
|
|
@ -322,14 +340,15 @@ FAST003.py:80:19: FAST003 [*] Parameter `thing_id` appears in route path, but no
|
|||
84 84 | return {"query": query}
|
||||
85 85 |
|
||||
|
||||
FAST003.py:87:18: FAST003 [*] Parameter `name` appears in route path, but not in `read_thing` signature
|
||||
FAST003 [*] Parameter `name` appears in route path, but not in `read_thing` signature
|
||||
--> FAST003.py:87:18
|
||||
|
|
||||
87 | @app.get("/books/{name}/{title}")
|
||||
| ^^^^^^ FAST003
|
||||
| ^^^^^^
|
||||
88 | async def read_thing(*, author: Annotated[str, Path(alias="author_name")], title: str):
|
||||
89 | return {"author": author, "title": title}
|
||||
|
|
||||
= help: Add `name` to function signature
|
||||
help: Add `name` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
85 85 |
|
||||
|
|
@ -341,15 +360,16 @@ FAST003.py:87:18: FAST003 [*] Parameter `name` appears in route path, but not in
|
|||
90 90 |
|
||||
91 91 |
|
||||
|
||||
FAST003.py:158:19: FAST003 [*] Parameter `thing_id` appears in route path, but not in `single` signature
|
||||
FAST003 [*] Parameter `thing_id` appears in route path, but not in `single` signature
|
||||
--> FAST003.py:158:19
|
||||
|
|
||||
157 | ### Errors
|
||||
158 | @app.get("/things/{thing_id}")
|
||||
| ^^^^^^^^^^ FAST003
|
||||
| ^^^^^^^^^^
|
||||
159 | async def single(other: Annotated[str, Depends(something_else)]): ...
|
||||
160 | @app.get("/things/{thing_id}")
|
||||
|
|
||||
= help: Add `thing_id` to function signature
|
||||
help: Add `thing_id` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
156 156 |
|
||||
|
|
@ -361,15 +381,16 @@ FAST003.py:158:19: FAST003 [*] Parameter `thing_id` appears in route path, but n
|
|||
161 161 | async def default(other: str = Depends(something_else)): ...
|
||||
162 162 |
|
||||
|
||||
FAST003.py:160:19: FAST003 [*] Parameter `thing_id` appears in route path, but not in `default` signature
|
||||
FAST003 [*] Parameter `thing_id` appears in route path, but not in `default` signature
|
||||
--> FAST003.py:160:19
|
||||
|
|
||||
158 | @app.get("/things/{thing_id}")
|
||||
159 | async def single(other: Annotated[str, Depends(something_else)]): ...
|
||||
160 | @app.get("/things/{thing_id}")
|
||||
| ^^^^^^^^^^ FAST003
|
||||
| ^^^^^^^^^^
|
||||
161 | async def default(other: str = Depends(something_else)): ...
|
||||
|
|
||||
= help: Add `thing_id` to function signature
|
||||
help: Add `thing_id` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
158 158 | @app.get("/things/{thing_id}")
|
||||
|
|
@ -381,15 +402,16 @@ FAST003.py:160:19: FAST003 [*] Parameter `thing_id` appears in route path, but n
|
|||
163 163 |
|
||||
164 164 | ### No errors
|
||||
|
||||
FAST003.py:197:12: FAST003 [*] Parameter `id` appears in route path, but not in `get_id_pydantic_full` signature
|
||||
FAST003 [*] Parameter `id` appears in route path, but not in `get_id_pydantic_full` signature
|
||||
--> FAST003.py:197:12
|
||||
|
|
||||
196 | # Errors
|
||||
197 | @app.get("/{id}")
|
||||
| ^^^^ FAST003
|
||||
| ^^^^
|
||||
198 | async def get_id_pydantic_full(
|
||||
199 | params: Annotated[PydanticParams, Depends(PydanticParams)],
|
||||
|
|
||||
= help: Add `id` to function signature
|
||||
help: Add `id` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
196 196 | # Errors
|
||||
|
|
@ -401,16 +423,17 @@ FAST003.py:197:12: FAST003 [*] Parameter `id` appears in route path, but not in
|
|||
201 201 | @app.get("/{id}")
|
||||
202 202 | async def get_id_pydantic_short(params: Annotated[PydanticParams, Depends()]): ...
|
||||
|
||||
FAST003.py:201:12: FAST003 [*] Parameter `id` appears in route path, but not in `get_id_pydantic_short` signature
|
||||
FAST003 [*] Parameter `id` appears in route path, but not in `get_id_pydantic_short` signature
|
||||
--> FAST003.py:201:12
|
||||
|
|
||||
199 | params: Annotated[PydanticParams, Depends(PydanticParams)],
|
||||
200 | ): ...
|
||||
201 | @app.get("/{id}")
|
||||
| ^^^^ FAST003
|
||||
| ^^^^
|
||||
202 | async def get_id_pydantic_short(params: Annotated[PydanticParams, Depends()]): ...
|
||||
203 | @app.get("/{id}")
|
||||
|
|
||||
= help: Add `id` to function signature
|
||||
help: Add `id` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
199 199 | params: Annotated[PydanticParams, Depends(PydanticParams)],
|
||||
|
|
@ -422,15 +445,16 @@ FAST003.py:201:12: FAST003 [*] Parameter `id` appears in route path, but not in
|
|||
204 204 | async def get_id_init_not_annotated(params = Depends(InitParams)): ...
|
||||
205 205 |
|
||||
|
||||
FAST003.py:203:12: FAST003 [*] Parameter `id` appears in route path, but not in `get_id_init_not_annotated` signature
|
||||
FAST003 [*] Parameter `id` appears in route path, but not in `get_id_init_not_annotated` signature
|
||||
--> FAST003.py:203:12
|
||||
|
|
||||
201 | @app.get("/{id}")
|
||||
202 | async def get_id_pydantic_short(params: Annotated[PydanticParams, Depends()]): ...
|
||||
203 | @app.get("/{id}")
|
||||
| ^^^^ FAST003
|
||||
| ^^^^
|
||||
204 | async def get_id_init_not_annotated(params = Depends(InitParams)): ...
|
||||
|
|
||||
= help: Add `id` to function signature
|
||||
help: Add `id` to function signature
|
||||
|
||||
ℹ Unsafe fix
|
||||
201 201 | @app.get("/{id}")
|
||||
|
|
|
|||
|
|
@ -1,30 +1,33 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_2020/mod.rs
|
||||
---
|
||||
YTT101.py:6:7: YTT101 `sys.version[:3]` referenced (python3.10), use `sys.version_info`
|
||||
YTT101 `sys.version[:3]` referenced (python3.10), use `sys.version_info`
|
||||
--> YTT101.py:6:7
|
||||
|
|
||||
4 | print(sys.version)
|
||||
5 |
|
||||
6 | print(sys.version[:3])
|
||||
| ^^^^^^^^^^^ YTT101
|
||||
| ^^^^^^^^^^^
|
||||
7 | print(version[:3])
|
||||
8 | print(v[:3])
|
||||
|
|
||||
|
||||
YTT101.py:7:7: YTT101 `sys.version[:3]` referenced (python3.10), use `sys.version_info`
|
||||
YTT101 `sys.version[:3]` referenced (python3.10), use `sys.version_info`
|
||||
--> YTT101.py:7:7
|
||||
|
|
||||
6 | print(sys.version[:3])
|
||||
7 | print(version[:3])
|
||||
| ^^^^^^^ YTT101
|
||||
| ^^^^^^^
|
||||
8 | print(v[:3])
|
||||
|
|
||||
|
||||
YTT101.py:8:7: YTT101 `sys.version[:3]` referenced (python3.10), use `sys.version_info`
|
||||
YTT101 `sys.version[:3]` referenced (python3.10), use `sys.version_info`
|
||||
--> YTT101.py:8:7
|
||||
|
|
||||
6 | print(sys.version[:3])
|
||||
7 | print(version[:3])
|
||||
8 | print(v[:3])
|
||||
| ^ YTT101
|
||||
| ^
|
||||
9 |
|
||||
10 | # the tool is timid and only flags certain numeric slices
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_2020/mod.rs
|
||||
---
|
||||
YTT102.py:4:12: YTT102 `sys.version[2]` referenced (python3.10), use `sys.version_info`
|
||||
YTT102 `sys.version[2]` referenced (python3.10), use `sys.version_info`
|
||||
--> YTT102.py:4:12
|
||||
|
|
||||
2 | from sys import version
|
||||
3 |
|
||||
4 | py_minor = sys.version[2]
|
||||
| ^^^^^^^^^^^ YTT102
|
||||
| ^^^^^^^^^^^
|
||||
5 | py_minor = version[2]
|
||||
|
|
||||
|
||||
YTT102.py:5:12: YTT102 `sys.version[2]` referenced (python3.10), use `sys.version_info`
|
||||
YTT102 `sys.version[2]` referenced (python3.10), use `sys.version_info`
|
||||
--> YTT102.py:5:12
|
||||
|
|
||||
4 | py_minor = sys.version[2]
|
||||
5 | py_minor = version[2]
|
||||
| ^^^^^^^ YTT102
|
||||
| ^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,48 +1,53 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_2020/mod.rs
|
||||
---
|
||||
YTT103.py:4:1: YTT103 `sys.version` compared to string (python3.10), use `sys.version_info`
|
||||
YTT103 `sys.version` compared to string (python3.10), use `sys.version_info`
|
||||
--> YTT103.py:4:1
|
||||
|
|
||||
2 | from sys import version
|
||||
3 |
|
||||
4 | version < "3.5"
|
||||
| ^^^^^^^ YTT103
|
||||
| ^^^^^^^
|
||||
5 | sys.version < "3.5"
|
||||
6 | sys.version <= "3.5"
|
||||
|
|
||||
|
||||
YTT103.py:5:1: YTT103 `sys.version` compared to string (python3.10), use `sys.version_info`
|
||||
YTT103 `sys.version` compared to string (python3.10), use `sys.version_info`
|
||||
--> YTT103.py:5:1
|
||||
|
|
||||
4 | version < "3.5"
|
||||
5 | sys.version < "3.5"
|
||||
| ^^^^^^^^^^^ YTT103
|
||||
| ^^^^^^^^^^^
|
||||
6 | sys.version <= "3.5"
|
||||
7 | sys.version > "3.5"
|
||||
|
|
||||
|
||||
YTT103.py:6:1: YTT103 `sys.version` compared to string (python3.10), use `sys.version_info`
|
||||
YTT103 `sys.version` compared to string (python3.10), use `sys.version_info`
|
||||
--> YTT103.py:6:1
|
||||
|
|
||||
4 | version < "3.5"
|
||||
5 | sys.version < "3.5"
|
||||
6 | sys.version <= "3.5"
|
||||
| ^^^^^^^^^^^ YTT103
|
||||
| ^^^^^^^^^^^
|
||||
7 | sys.version > "3.5"
|
||||
8 | sys.version >= "3.5"
|
||||
|
|
||||
|
||||
YTT103.py:7:1: YTT103 `sys.version` compared to string (python3.10), use `sys.version_info`
|
||||
YTT103 `sys.version` compared to string (python3.10), use `sys.version_info`
|
||||
--> YTT103.py:7:1
|
||||
|
|
||||
5 | sys.version < "3.5"
|
||||
6 | sys.version <= "3.5"
|
||||
7 | sys.version > "3.5"
|
||||
| ^^^^^^^^^^^ YTT103
|
||||
| ^^^^^^^^^^^
|
||||
8 | sys.version >= "3.5"
|
||||
|
|
||||
|
||||
YTT103.py:8:1: YTT103 `sys.version` compared to string (python3.10), use `sys.version_info`
|
||||
YTT103 `sys.version` compared to string (python3.10), use `sys.version_info`
|
||||
--> YTT103.py:8:1
|
||||
|
|
||||
6 | sys.version <= "3.5"
|
||||
7 | sys.version > "3.5"
|
||||
8 | sys.version >= "3.5"
|
||||
| ^^^^^^^^^^^ YTT103
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,38 +1,42 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_2020/mod.rs
|
||||
---
|
||||
YTT201.py:7:7: YTT201 `sys.version_info[0] == 3` referenced (python4), use `>=`
|
||||
YTT201 `sys.version_info[0] == 3` referenced (python4), use `>=`
|
||||
--> YTT201.py:7:7
|
||||
|
|
||||
5 | PY3 = sys.version_info[0] >= 3
|
||||
6 |
|
||||
7 | PY3 = sys.version_info[0] == 3
|
||||
| ^^^^^^^^^^^^^^^^^^^ YTT201
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
8 | PY3 = version_info[0] == 3
|
||||
9 | PY2 = sys.version_info[0] != 3
|
||||
|
|
||||
|
||||
YTT201.py:8:7: YTT201 `sys.version_info[0] == 3` referenced (python4), use `>=`
|
||||
YTT201 `sys.version_info[0] == 3` referenced (python4), use `>=`
|
||||
--> YTT201.py:8:7
|
||||
|
|
||||
7 | PY3 = sys.version_info[0] == 3
|
||||
8 | PY3 = version_info[0] == 3
|
||||
| ^^^^^^^^^^^^^^^ YTT201
|
||||
| ^^^^^^^^^^^^^^^
|
||||
9 | PY2 = sys.version_info[0] != 3
|
||||
10 | PY2 = version_info[0] != 3
|
||||
|
|
||||
|
||||
YTT201.py:9:7: YTT201 `sys.version_info[0] != 3` referenced (python4), use `<`
|
||||
YTT201 `sys.version_info[0] != 3` referenced (python4), use `<`
|
||||
--> YTT201.py:9:7
|
||||
|
|
||||
7 | PY3 = sys.version_info[0] == 3
|
||||
8 | PY3 = version_info[0] == 3
|
||||
9 | PY2 = sys.version_info[0] != 3
|
||||
| ^^^^^^^^^^^^^^^^^^^ YTT201
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
10 | PY2 = version_info[0] != 3
|
||||
|
|
||||
|
||||
YTT201.py:10:7: YTT201 `sys.version_info[0] != 3` referenced (python4), use `<`
|
||||
YTT201 `sys.version_info[0] != 3` referenced (python4), use `<`
|
||||
--> YTT201.py:10:7
|
||||
|
|
||||
8 | PY3 = version_info[0] == 3
|
||||
9 | PY2 = sys.version_info[0] != 3
|
||||
10 | PY2 = version_info[0] != 3
|
||||
| ^^^^^^^^^^^^^^^ YTT201
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,21 +1,23 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_2020/mod.rs
|
||||
---
|
||||
YTT202.py:4:4: YTT202 `six.PY3` referenced (python4), use `not six.PY2`
|
||||
YTT202 `six.PY3` referenced (python4), use `not six.PY2`
|
||||
--> YTT202.py:4:4
|
||||
|
|
||||
2 | from six import PY3
|
||||
3 |
|
||||
4 | if six.PY3:
|
||||
| ^^^^^^^ YTT202
|
||||
| ^^^^^^^
|
||||
5 | print("3")
|
||||
6 | if PY3:
|
||||
|
|
||||
|
||||
YTT202.py:6:4: YTT202 `six.PY3` referenced (python4), use `not six.PY2`
|
||||
YTT202 `six.PY3` referenced (python4), use `not six.PY2`
|
||||
--> YTT202.py:6:4
|
||||
|
|
||||
4 | if six.PY3:
|
||||
5 | print("3")
|
||||
6 | if PY3:
|
||||
| ^^^ YTT202
|
||||
| ^^^
|
||||
7 | print("3")
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_2020/mod.rs
|
||||
---
|
||||
YTT203.py:4:1: YTT203 `sys.version_info[1]` compared to integer (python4), compare `sys.version_info` to tuple
|
||||
YTT203 `sys.version_info[1]` compared to integer (python4), compare `sys.version_info` to tuple
|
||||
--> YTT203.py:4:1
|
||||
|
|
||||
2 | from sys import version_info
|
||||
3 |
|
||||
4 | sys.version_info[1] >= 5
|
||||
| ^^^^^^^^^^^^^^^^^^^ YTT203
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
5 | version_info[1] < 6
|
||||
|
|
||||
|
||||
YTT203.py:5:1: YTT203 `sys.version_info[1]` compared to integer (python4), compare `sys.version_info` to tuple
|
||||
YTT203 `sys.version_info[1]` compared to integer (python4), compare `sys.version_info` to tuple
|
||||
--> YTT203.py:5:1
|
||||
|
|
||||
4 | sys.version_info[1] >= 5
|
||||
5 | version_info[1] < 6
|
||||
| ^^^^^^^^^^^^^^^ YTT203
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_2020/mod.rs
|
||||
---
|
||||
YTT204.py:4:1: YTT204 `sys.version_info.minor` compared to integer (python4), compare `sys.version_info` to tuple
|
||||
YTT204 `sys.version_info.minor` compared to integer (python4), compare `sys.version_info` to tuple
|
||||
--> YTT204.py:4:1
|
||||
|
|
||||
2 | from sys import version_info
|
||||
3 |
|
||||
4 | sys.version_info.minor <= 7
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ YTT204
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
5 | version_info.minor > 8
|
||||
|
|
||||
|
||||
YTT204.py:5:1: YTT204 `sys.version_info.minor` compared to integer (python4), compare `sys.version_info` to tuple
|
||||
YTT204 `sys.version_info.minor` compared to integer (python4), compare `sys.version_info` to tuple
|
||||
--> YTT204.py:5:1
|
||||
|
|
||||
4 | sys.version_info.minor <= 7
|
||||
5 | version_info.minor > 8
|
||||
| ^^^^^^^^^^^^^^^^^^ YTT204
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_2020/mod.rs
|
||||
---
|
||||
YTT301.py:4:12: YTT301 `sys.version[0]` referenced (python10), use `sys.version_info`
|
||||
YTT301 `sys.version[0]` referenced (python10), use `sys.version_info`
|
||||
--> YTT301.py:4:12
|
||||
|
|
||||
2 | from sys import version
|
||||
3 |
|
||||
4 | py_major = sys.version[0]
|
||||
| ^^^^^^^^^^^ YTT301
|
||||
| ^^^^^^^^^^^
|
||||
5 | py_major = version[0]
|
||||
|
|
||||
|
||||
YTT301.py:5:12: YTT301 `sys.version[0]` referenced (python10), use `sys.version_info`
|
||||
YTT301 `sys.version[0]` referenced (python10), use `sys.version_info`
|
||||
--> YTT301.py:5:12
|
||||
|
|
||||
4 | py_major = sys.version[0]
|
||||
5 | py_major = version[0]
|
||||
| ^^^^^^^ YTT301
|
||||
| ^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,48 +1,53 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_2020/mod.rs
|
||||
---
|
||||
YTT302.py:4:1: YTT302 `sys.version` compared to string (python10), use `sys.version_info`
|
||||
YTT302 `sys.version` compared to string (python10), use `sys.version_info`
|
||||
--> YTT302.py:4:1
|
||||
|
|
||||
2 | from sys import version
|
||||
3 |
|
||||
4 | version < "3"
|
||||
| ^^^^^^^ YTT302
|
||||
| ^^^^^^^
|
||||
5 | sys.version < "3"
|
||||
6 | sys.version <= "3"
|
||||
|
|
||||
|
||||
YTT302.py:5:1: YTT302 `sys.version` compared to string (python10), use `sys.version_info`
|
||||
YTT302 `sys.version` compared to string (python10), use `sys.version_info`
|
||||
--> YTT302.py:5:1
|
||||
|
|
||||
4 | version < "3"
|
||||
5 | sys.version < "3"
|
||||
| ^^^^^^^^^^^ YTT302
|
||||
| ^^^^^^^^^^^
|
||||
6 | sys.version <= "3"
|
||||
7 | sys.version > "3"
|
||||
|
|
||||
|
||||
YTT302.py:6:1: YTT302 `sys.version` compared to string (python10), use `sys.version_info`
|
||||
YTT302 `sys.version` compared to string (python10), use `sys.version_info`
|
||||
--> YTT302.py:6:1
|
||||
|
|
||||
4 | version < "3"
|
||||
5 | sys.version < "3"
|
||||
6 | sys.version <= "3"
|
||||
| ^^^^^^^^^^^ YTT302
|
||||
| ^^^^^^^^^^^
|
||||
7 | sys.version > "3"
|
||||
8 | sys.version >= "3"
|
||||
|
|
||||
|
||||
YTT302.py:7:1: YTT302 `sys.version` compared to string (python10), use `sys.version_info`
|
||||
YTT302 `sys.version` compared to string (python10), use `sys.version_info`
|
||||
--> YTT302.py:7:1
|
||||
|
|
||||
5 | sys.version < "3"
|
||||
6 | sys.version <= "3"
|
||||
7 | sys.version > "3"
|
||||
| ^^^^^^^^^^^ YTT302
|
||||
| ^^^^^^^^^^^
|
||||
8 | sys.version >= "3"
|
||||
|
|
||||
|
||||
YTT302.py:8:1: YTT302 `sys.version` compared to string (python10), use `sys.version_info`
|
||||
YTT302 `sys.version` compared to string (python10), use `sys.version_info`
|
||||
--> YTT302.py:8:1
|
||||
|
|
||||
6 | sys.version <= "3"
|
||||
7 | sys.version > "3"
|
||||
8 | sys.version >= "3"
|
||||
| ^^^^^^^^^^^ YTT302
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_2020/mod.rs
|
||||
---
|
||||
YTT303.py:4:7: YTT303 `sys.version[:1]` referenced (python10), use `sys.version_info`
|
||||
YTT303 `sys.version[:1]` referenced (python10), use `sys.version_info`
|
||||
--> YTT303.py:4:7
|
||||
|
|
||||
2 | from sys import version
|
||||
3 |
|
||||
4 | print(sys.version[:1])
|
||||
| ^^^^^^^^^^^ YTT303
|
||||
| ^^^^^^^^^^^
|
||||
5 | print(version[:1])
|
||||
|
|
||||
|
||||
YTT303.py:5:7: YTT303 `sys.version[:1]` referenced (python10), use `sys.version_info`
|
||||
YTT303 `sys.version[:1]` referenced (python10), use `sys.version_info`
|
||||
--> YTT303.py:5:7
|
||||
|
|
||||
4 | print(sys.version[:1])
|
||||
5 | print(version[:1])
|
||||
| ^^^^^^^ YTT303
|
||||
| ^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_annotations/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
allow_overload.py:29:9: ANN201 Missing return type annotation for public function `bar`
|
||||
ANN201 Missing return type annotation for public function `bar`
|
||||
--> allow_overload.py:29:9
|
||||
|
|
||||
28 | class X:
|
||||
29 | def bar(i):
|
||||
| ^^^ ANN201
|
||||
| ^^^
|
||||
30 | return i
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
|
|
|||
|
|
@ -1,35 +1,38 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_annotations/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
allow_star_arg_any.py:10:12: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
--> allow_star_arg_any.py:10:12
|
||||
|
|
||||
9 | # ANN401
|
||||
10 | def foo(a: Any, *args: str, **kwargs: str) -> int:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
11 | pass
|
||||
|
|
||||
|
||||
allow_star_arg_any.py:15:47: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `foo`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `foo`
|
||||
--> allow_star_arg_any.py:15:47
|
||||
|
|
||||
14 | # ANN401
|
||||
15 | def foo(a: int, *args: str, **kwargs: str) -> Any:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
16 | pass
|
||||
|
|
||||
|
||||
allow_star_arg_any.py:40:29: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
--> allow_star_arg_any.py:40:29
|
||||
|
|
||||
39 | # ANN401
|
||||
40 | def foo_method(self, a: Any, *params: str, **options: str) -> int:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
41 | pass
|
||||
|
|
||||
|
||||
allow_star_arg_any.py:44:67: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `foo_method`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `foo_method`
|
||||
--> allow_star_arg_any.py:44:67
|
||||
|
|
||||
43 | # ANN401
|
||||
44 | def foo_method(self, a: int, *params: str, **options: str) -> Any:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
45 | pass
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_annotations/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
auto_return_type.py:1:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:1:5
|
||||
|
|
||||
1 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
2 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |-def func():
|
||||
|
|
@ -17,13 +17,14 @@ auto_return_type.py:1:5: ANN201 [*] Missing return type annotation for public fu
|
|||
3 3 |
|
||||
4 4 |
|
||||
|
||||
auto_return_type.py:5:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:5:5
|
||||
|
|
||||
5 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
6 | return 1.5
|
||||
|
|
||||
= help: Add return type annotation: `float`
|
||||
help: Add return type annotation: `float`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 | return 1
|
||||
|
|
@ -35,14 +36,15 @@ auto_return_type.py:5:5: ANN201 [*] Missing return type annotation for public fu
|
|||
7 7 |
|
||||
8 8 |
|
||||
|
||||
auto_return_type.py:9:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:9:5
|
||||
|
|
||||
9 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
10 | if x > 0:
|
||||
11 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `float`
|
||||
help: Add return type annotation: `float`
|
||||
|
||||
ℹ Unsafe fix
|
||||
6 6 | return 1.5
|
||||
|
|
@ -54,13 +56,14 @@ auto_return_type.py:9:5: ANN201 [*] Missing return type annotation for public fu
|
|||
11 11 | return 1
|
||||
12 12 | else:
|
||||
|
||||
auto_return_type.py:16:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:16:5
|
||||
|
|
||||
16 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
17 | return True
|
||||
|
|
||||
= help: Add return type annotation: `bool`
|
||||
help: Add return type annotation: `bool`
|
||||
|
||||
ℹ Unsafe fix
|
||||
13 13 | return 1.5
|
||||
|
|
@ -72,14 +75,15 @@ auto_return_type.py:16:5: ANN201 [*] Missing return type annotation for public f
|
|||
18 18 |
|
||||
19 19 |
|
||||
|
||||
auto_return_type.py:20:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:20:5
|
||||
|
|
||||
20 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
21 | if x > 0:
|
||||
22 | return None
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
17 17 | return True
|
||||
|
|
@ -91,13 +95,14 @@ auto_return_type.py:20:5: ANN201 [*] Missing return type annotation for public f
|
|||
22 22 | return None
|
||||
23 23 | else:
|
||||
|
||||
auto_return_type.py:27:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:27:5
|
||||
|
|
||||
27 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
28 | return 1 or 2.5 if x > 0 else 1.5 or "str"
|
||||
|
|
||||
= help: Add return type annotation: `str | float`
|
||||
help: Add return type annotation: `str | float`
|
||||
|
||||
ℹ Unsafe fix
|
||||
24 24 | return
|
||||
|
|
@ -109,13 +114,14 @@ auto_return_type.py:27:5: ANN201 [*] Missing return type annotation for public f
|
|||
29 29 |
|
||||
30 30 |
|
||||
|
||||
auto_return_type.py:31:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:31:5
|
||||
|
|
||||
31 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
32 | return 1 + 2.5 if x > 0 else 1.5 or "str"
|
||||
|
|
||||
= help: Add return type annotation: `str | float`
|
||||
help: Add return type annotation: `str | float`
|
||||
|
||||
ℹ Unsafe fix
|
||||
28 28 | return 1 or 2.5 if x > 0 else 1.5 or "str"
|
||||
|
|
@ -127,31 +133,34 @@ auto_return_type.py:31:5: ANN201 [*] Missing return type annotation for public f
|
|||
33 33 |
|
||||
34 34 |
|
||||
|
||||
auto_return_type.py:35:5: ANN201 Missing return type annotation for public function `func`
|
||||
ANN201 Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:35:5
|
||||
|
|
||||
35 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
36 | if not x:
|
||||
37 | return None
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:41:5: ANN201 Missing return type annotation for public function `func`
|
||||
ANN201 Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:41:5
|
||||
|
|
||||
41 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
42 | return {"foo": 1}
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:45:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:45:5
|
||||
|
|
||||
45 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
46 | if not x:
|
||||
47 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
42 42 | return {"foo": 1}
|
||||
|
|
@ -163,14 +172,15 @@ auto_return_type.py:45:5: ANN201 [*] Missing return type annotation for public f
|
|||
47 47 | return 1
|
||||
48 48 | else:
|
||||
|
||||
auto_return_type.py:52:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:52:5
|
||||
|
|
||||
52 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
53 | if not x:
|
||||
54 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int | None`
|
||||
help: Add return type annotation: `int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
49 49 | return True
|
||||
|
|
@ -182,14 +192,15 @@ auto_return_type.py:52:5: ANN201 [*] Missing return type annotation for public f
|
|||
54 54 | return 1
|
||||
55 55 | else:
|
||||
|
||||
auto_return_type.py:59:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:59:5
|
||||
|
|
||||
59 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
60 | if not x:
|
||||
61 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `str | int | None`
|
||||
help: Add return type annotation: `str | int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
56 56 | return None
|
||||
|
|
@ -201,14 +212,15 @@ auto_return_type.py:59:5: ANN201 [*] Missing return type annotation for public f
|
|||
61 61 | return 1
|
||||
62 62 | elif x > 5:
|
||||
|
||||
auto_return_type.py:68:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:68:5
|
||||
|
|
||||
68 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
69 | if x:
|
||||
70 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int | None`
|
||||
help: Add return type annotation: `int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
65 65 | return None
|
||||
|
|
@ -220,13 +232,14 @@ auto_return_type.py:68:5: ANN201 [*] Missing return type annotation for public f
|
|||
70 70 | return 1
|
||||
71 71 |
|
||||
|
||||
auto_return_type.py:73:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:73:5
|
||||
|
|
||||
73 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
74 | x = 1
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
70 70 | return 1
|
||||
|
|
@ -238,14 +251,15 @@ auto_return_type.py:73:5: ANN201 [*] Missing return type annotation for public f
|
|||
75 75 |
|
||||
76 76 |
|
||||
|
||||
auto_return_type.py:77:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:77:5
|
||||
|
|
||||
77 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
78 | if x > 0:
|
||||
79 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int | None`
|
||||
help: Add return type annotation: `int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
74 74 | x = 1
|
||||
|
|
@ -257,14 +271,15 @@ auto_return_type.py:77:5: ANN201 [*] Missing return type annotation for public f
|
|||
79 79 | return 1
|
||||
80 80 |
|
||||
|
||||
auto_return_type.py:82:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:82:5
|
||||
|
|
||||
82 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
83 | match x:
|
||||
84 | case [1, 2, 3]:
|
||||
|
|
||||
= help: Add return type annotation: `str | int | None`
|
||||
help: Add return type annotation: `str | int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
79 79 | return 1
|
||||
|
|
@ -276,14 +291,15 @@ auto_return_type.py:82:5: ANN201 [*] Missing return type annotation for public f
|
|||
84 84 | case [1, 2, 3]:
|
||||
85 85 | return 1
|
||||
|
||||
auto_return_type.py:90:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:90:5
|
||||
|
|
||||
90 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
91 | for i in range(5):
|
||||
92 | if i > 0:
|
||||
|
|
||||
= help: Add return type annotation: `int | None`
|
||||
help: Add return type annotation: `int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
87 87 | return "foo"
|
||||
|
|
@ -295,14 +311,15 @@ auto_return_type.py:90:5: ANN201 [*] Missing return type annotation for public f
|
|||
92 92 | if i > 0:
|
||||
93 93 | return 1
|
||||
|
||||
auto_return_type.py:96:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:96:5
|
||||
|
|
||||
96 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
97 | for i in range(5):
|
||||
98 | if i > 0:
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
93 93 | return 1
|
||||
|
|
@ -314,14 +331,15 @@ auto_return_type.py:96:5: ANN201 [*] Missing return type annotation for public f
|
|||
98 98 | if i > 0:
|
||||
99 99 | return 1
|
||||
|
||||
auto_return_type.py:104:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:104:5
|
||||
|
|
||||
104 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
105 | for i in range(5):
|
||||
106 | if i > 0:
|
||||
|
|
||||
= help: Add return type annotation: `int | None`
|
||||
help: Add return type annotation: `int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
101 101 | return 4
|
||||
|
|
@ -333,14 +351,15 @@ auto_return_type.py:104:5: ANN201 [*] Missing return type annotation for public
|
|||
106 106 | if i > 0:
|
||||
107 107 | break
|
||||
|
||||
auto_return_type.py:112:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:112:5
|
||||
|
|
||||
112 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
113 | try:
|
||||
114 | pass
|
||||
|
|
||||
= help: Add return type annotation: `int | None`
|
||||
help: Add return type annotation: `int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
109 109 | return 4
|
||||
|
|
@ -352,14 +371,15 @@ auto_return_type.py:112:5: ANN201 [*] Missing return type annotation for public
|
|||
114 114 | pass
|
||||
115 115 | except:
|
||||
|
||||
auto_return_type.py:119:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:119:5
|
||||
|
|
||||
119 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
120 | try:
|
||||
121 | pass
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
116 116 | return 1
|
||||
|
|
@ -371,14 +391,15 @@ auto_return_type.py:119:5: ANN201 [*] Missing return type annotation for public
|
|||
121 121 | pass
|
||||
122 122 | except:
|
||||
|
||||
auto_return_type.py:128:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:128:5
|
||||
|
|
||||
128 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
129 | try:
|
||||
130 | pass
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
125 125 | return 2
|
||||
|
|
@ -390,14 +411,15 @@ auto_return_type.py:128:5: ANN201 [*] Missing return type annotation for public
|
|||
130 130 | pass
|
||||
131 131 | except:
|
||||
|
||||
auto_return_type.py:137:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:137:5
|
||||
|
|
||||
137 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
138 | try:
|
||||
139 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int | None`
|
||||
help: Add return type annotation: `int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
134 134 | return 2
|
||||
|
|
@ -409,14 +431,15 @@ auto_return_type.py:137:5: ANN201 [*] Missing return type annotation for public
|
|||
139 139 | return 1
|
||||
140 140 | except:
|
||||
|
||||
auto_return_type.py:146:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:146:5
|
||||
|
|
||||
146 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
147 | while x > 0:
|
||||
148 | break
|
||||
|
|
||||
= help: Add return type annotation: `int | None`
|
||||
help: Add return type annotation: `int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
143 143 | pass
|
||||
|
|
@ -428,63 +451,69 @@ auto_return_type.py:146:5: ANN201 [*] Missing return type annotation for public
|
|||
148 148 | break
|
||||
149 149 | return 1
|
||||
|
||||
auto_return_type.py:158:9: ANN201 Missing return type annotation for public function `method`
|
||||
ANN201 Missing return type annotation for public function `method`
|
||||
--> auto_return_type.py:158:9
|
||||
|
|
||||
156 | class Foo(abc.ABC):
|
||||
157 | @abstractmethod
|
||||
158 | def method(self):
|
||||
| ^^^^^^ ANN201
|
||||
| ^^^^^^
|
||||
159 | pass
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:162:9: ANN201 Missing return type annotation for public function `method`
|
||||
ANN201 Missing return type annotation for public function `method`
|
||||
--> auto_return_type.py:162:9
|
||||
|
|
||||
161 | @abc.abstractmethod
|
||||
162 | def method(self):
|
||||
| ^^^^^^ ANN201
|
||||
| ^^^^^^
|
||||
163 | """Docstring."""
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:166:9: ANN201 Missing return type annotation for public function `method`
|
||||
ANN201 Missing return type annotation for public function `method`
|
||||
--> auto_return_type.py:166:9
|
||||
|
|
||||
165 | @abc.abstractmethod
|
||||
166 | def method(self):
|
||||
| ^^^^^^ ANN201
|
||||
| ^^^^^^
|
||||
167 | ...
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:171:9: ANN205 Missing return type annotation for staticmethod `method`
|
||||
ANN205 Missing return type annotation for staticmethod `method`
|
||||
--> auto_return_type.py:171:9
|
||||
|
|
||||
169 | @staticmethod
|
||||
170 | @abstractmethod
|
||||
171 | def method():
|
||||
| ^^^^^^ ANN205
|
||||
| ^^^^^^
|
||||
172 | pass
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:176:9: ANN206 Missing return type annotation for classmethod `method`
|
||||
ANN206 Missing return type annotation for classmethod `method`
|
||||
--> auto_return_type.py:176:9
|
||||
|
|
||||
174 | @classmethod
|
||||
175 | @abstractmethod
|
||||
176 | def method(cls):
|
||||
| ^^^^^^ ANN206
|
||||
| ^^^^^^
|
||||
177 | pass
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:180:9: ANN201 [*] Missing return type annotation for public function `method`
|
||||
ANN201 [*] Missing return type annotation for public function `method`
|
||||
--> auto_return_type.py:180:9
|
||||
|
|
||||
179 | @abstractmethod
|
||||
180 | def method(self):
|
||||
| ^^^^^^ ANN201
|
||||
| ^^^^^^
|
||||
181 | if self.x > 0:
|
||||
182 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `float`
|
||||
help: Add return type annotation: `float`
|
||||
|
||||
ℹ Unsafe fix
|
||||
177 177 | pass
|
||||
|
|
@ -496,14 +525,15 @@ auto_return_type.py:180:9: ANN201 [*] Missing return type annotation for public
|
|||
182 182 | return 1
|
||||
183 183 | else:
|
||||
|
||||
auto_return_type.py:187:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:187:5
|
||||
|
|
||||
187 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
188 | try:
|
||||
189 | pass
|
||||
|
|
||||
= help: Add return type annotation: `int | None`
|
||||
help: Add return type annotation: `int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
184 184 | return 1.5
|
||||
|
|
@ -515,14 +545,15 @@ auto_return_type.py:187:5: ANN201 [*] Missing return type annotation for public
|
|||
189 189 | pass
|
||||
190 190 | except:
|
||||
|
||||
auto_return_type.py:194:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:194:5
|
||||
|
|
||||
194 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
195 | try:
|
||||
196 | pass
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
191 191 | return 2
|
||||
|
|
@ -534,14 +565,15 @@ auto_return_type.py:194:5: ANN201 [*] Missing return type annotation for public
|
|||
196 196 | pass
|
||||
197 197 | except:
|
||||
|
||||
auto_return_type.py:203:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:203:5
|
||||
|
|
||||
203 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
204 | if not x:
|
||||
205 | raise ValueError
|
||||
|
|
||||
= help: Add return type annotation: `Never`
|
||||
help: Add return type annotation: `Never`
|
||||
|
||||
ℹ Unsafe fix
|
||||
151 151 |
|
||||
|
|
@ -561,14 +593,15 @@ auto_return_type.py:203:5: ANN201 [*] Missing return type annotation for public
|
|||
205 206 | raise ValueError
|
||||
206 207 | else:
|
||||
|
||||
auto_return_type.py:210:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:210:5
|
||||
|
|
||||
210 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
211 | if not x:
|
||||
212 | raise ValueError
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
207 207 | raise TypeError
|
||||
|
|
@ -580,14 +613,15 @@ auto_return_type.py:210:5: ANN201 [*] Missing return type annotation for public
|
|||
212 212 | raise ValueError
|
||||
213 213 | else:
|
||||
|
||||
auto_return_type.py:234:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:234:5
|
||||
|
|
||||
234 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
235 | if not x:
|
||||
236 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
231 231 | return i
|
||||
|
|
@ -599,14 +633,15 @@ auto_return_type.py:234:5: ANN201 [*] Missing return type annotation for public
|
|||
236 236 | return 1
|
||||
237 237 | raise ValueError
|
||||
|
||||
auto_return_type.py:240:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:240:5
|
||||
|
|
||||
240 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
241 | if not x:
|
||||
242 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
237 237 | raise ValueError
|
||||
|
|
@ -618,14 +653,15 @@ auto_return_type.py:240:5: ANN201 [*] Missing return type annotation for public
|
|||
242 242 | return 1
|
||||
243 243 | else:
|
||||
|
||||
auto_return_type.py:248:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:248:5
|
||||
|
|
||||
248 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
249 | try:
|
||||
250 | raise ValueError
|
||||
|
|
||||
= help: Add return type annotation: `int | None`
|
||||
help: Add return type annotation: `int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
245 245 | raise ValueError
|
||||
|
|
@ -637,14 +673,15 @@ auto_return_type.py:248:5: ANN201 [*] Missing return type annotation for public
|
|||
250 250 | raise ValueError
|
||||
251 251 | except:
|
||||
|
||||
auto_return_type.py:255:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:255:5
|
||||
|
|
||||
255 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
256 | try:
|
||||
257 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int | None`
|
||||
help: Add return type annotation: `int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
252 252 | return 2
|
||||
|
|
@ -656,14 +693,15 @@ auto_return_type.py:255:5: ANN201 [*] Missing return type annotation for public
|
|||
257 257 | return 1
|
||||
258 258 | except:
|
||||
|
||||
auto_return_type.py:262:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:262:5
|
||||
|
|
||||
262 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
263 | for _ in range(3):
|
||||
264 | if x > 0:
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
259 259 | pass
|
||||
|
|
@ -675,14 +713,15 @@ auto_return_type.py:262:5: ANN201 [*] Missing return type annotation for public
|
|||
264 264 | if x > 0:
|
||||
265 265 | return 1
|
||||
|
||||
auto_return_type.py:269:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:269:5
|
||||
|
|
||||
269 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
270 | if x > 5:
|
||||
271 | raise ValueError
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
266 266 | raise ValueError
|
||||
|
|
@ -694,14 +733,15 @@ auto_return_type.py:269:5: ANN201 [*] Missing return type annotation for public
|
|||
271 271 | raise ValueError
|
||||
272 272 | else:
|
||||
|
||||
auto_return_type.py:276:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:276:5
|
||||
|
|
||||
276 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
277 | if x > 5:
|
||||
278 | raise ValueError
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
273 273 | pass
|
||||
|
|
@ -713,14 +753,15 @@ auto_return_type.py:276:5: ANN201 [*] Missing return type annotation for public
|
|||
278 278 | raise ValueError
|
||||
279 279 | elif x > 10:
|
||||
|
||||
auto_return_type.py:283:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:283:5
|
||||
|
|
||||
283 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
284 | if x > 5:
|
||||
285 | raise ValueError
|
||||
|
|
||||
= help: Add return type annotation: `int | None`
|
||||
help: Add return type annotation: `int | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
280 280 | pass
|
||||
|
|
@ -732,14 +773,15 @@ auto_return_type.py:283:5: ANN201 [*] Missing return type annotation for public
|
|||
285 285 | raise ValueError
|
||||
286 286 | elif x > 10:
|
||||
|
||||
auto_return_type.py:290:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:290:5
|
||||
|
|
||||
290 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
291 | try:
|
||||
292 | return 5
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
287 287 | return 5
|
||||
|
|
@ -751,14 +793,15 @@ auto_return_type.py:290:5: ANN201 [*] Missing return type annotation for public
|
|||
292 292 | return 5
|
||||
293 293 | except:
|
||||
|
||||
auto_return_type.py:299:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:299:5
|
||||
|
|
||||
299 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
300 | match x:
|
||||
301 | case [1, 2, 3]:
|
||||
|
|
||||
= help: Add return type annotation: `str | int`
|
||||
help: Add return type annotation: `str | int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
296 296 | raise ValueError
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_annotations/mod.rs
|
||||
---
|
||||
auto_return_type.py:1:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:1:5
|
||||
|
|
||||
1 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
2 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |-def func():
|
||||
|
|
@ -16,13 +17,14 @@ auto_return_type.py:1:5: ANN201 [*] Missing return type annotation for public fu
|
|||
3 3 |
|
||||
4 4 |
|
||||
|
||||
auto_return_type.py:5:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:5:5
|
||||
|
|
||||
5 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
6 | return 1.5
|
||||
|
|
||||
= help: Add return type annotation: `float`
|
||||
help: Add return type annotation: `float`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 | return 1
|
||||
|
|
@ -34,14 +36,15 @@ auto_return_type.py:5:5: ANN201 [*] Missing return type annotation for public fu
|
|||
7 7 |
|
||||
8 8 |
|
||||
|
||||
auto_return_type.py:9:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:9:5
|
||||
|
|
||||
9 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
10 | if x > 0:
|
||||
11 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `float`
|
||||
help: Add return type annotation: `float`
|
||||
|
||||
ℹ Unsafe fix
|
||||
6 6 | return 1.5
|
||||
|
|
@ -53,13 +56,14 @@ auto_return_type.py:9:5: ANN201 [*] Missing return type annotation for public fu
|
|||
11 11 | return 1
|
||||
12 12 | else:
|
||||
|
||||
auto_return_type.py:16:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:16:5
|
||||
|
|
||||
16 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
17 | return True
|
||||
|
|
||||
= help: Add return type annotation: `bool`
|
||||
help: Add return type annotation: `bool`
|
||||
|
||||
ℹ Unsafe fix
|
||||
13 13 | return 1.5
|
||||
|
|
@ -71,14 +75,15 @@ auto_return_type.py:16:5: ANN201 [*] Missing return type annotation for public f
|
|||
18 18 |
|
||||
19 19 |
|
||||
|
||||
auto_return_type.py:20:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:20:5
|
||||
|
|
||||
20 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
21 | if x > 0:
|
||||
22 | return None
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
17 17 | return True
|
||||
|
|
@ -90,13 +95,14 @@ auto_return_type.py:20:5: ANN201 [*] Missing return type annotation for public f
|
|||
22 22 | return None
|
||||
23 23 | else:
|
||||
|
||||
auto_return_type.py:27:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:27:5
|
||||
|
|
||||
27 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
28 | return 1 or 2.5 if x > 0 else 1.5 or "str"
|
||||
|
|
||||
= help: Add return type annotation: `Union[str, float]`
|
||||
help: Add return type annotation: `Union[str, float]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |+from typing import Union
|
||||
|
|
@ -113,13 +119,14 @@ auto_return_type.py:27:5: ANN201 [*] Missing return type annotation for public f
|
|||
29 30 |
|
||||
30 31 |
|
||||
|
||||
auto_return_type.py:31:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:31:5
|
||||
|
|
||||
31 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
32 | return 1 + 2.5 if x > 0 else 1.5 or "str"
|
||||
|
|
||||
= help: Add return type annotation: `Union[str, float]`
|
||||
help: Add return type annotation: `Union[str, float]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |+from typing import Union
|
||||
|
|
@ -136,31 +143,34 @@ auto_return_type.py:31:5: ANN201 [*] Missing return type annotation for public f
|
|||
33 34 |
|
||||
34 35 |
|
||||
|
||||
auto_return_type.py:35:5: ANN201 Missing return type annotation for public function `func`
|
||||
ANN201 Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:35:5
|
||||
|
|
||||
35 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
36 | if not x:
|
||||
37 | return None
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:41:5: ANN201 Missing return type annotation for public function `func`
|
||||
ANN201 Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:41:5
|
||||
|
|
||||
41 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
42 | return {"foo": 1}
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:45:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:45:5
|
||||
|
|
||||
45 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
46 | if not x:
|
||||
47 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
42 42 | return {"foo": 1}
|
||||
|
|
@ -172,14 +182,15 @@ auto_return_type.py:45:5: ANN201 [*] Missing return type annotation for public f
|
|||
47 47 | return 1
|
||||
48 48 | else:
|
||||
|
||||
auto_return_type.py:52:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:52:5
|
||||
|
|
||||
52 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
53 | if not x:
|
||||
54 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `Optional[int]`
|
||||
help: Add return type annotation: `Optional[int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |+from typing import Optional
|
||||
|
|
@ -196,14 +207,15 @@ auto_return_type.py:52:5: ANN201 [*] Missing return type annotation for public f
|
|||
54 55 | return 1
|
||||
55 56 | else:
|
||||
|
||||
auto_return_type.py:59:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:59:5
|
||||
|
|
||||
59 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
60 | if not x:
|
||||
61 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `Union[str, int, None]`
|
||||
help: Add return type annotation: `Union[str, int, None]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |+from typing import Union
|
||||
|
|
@ -220,14 +232,15 @@ auto_return_type.py:59:5: ANN201 [*] Missing return type annotation for public f
|
|||
61 62 | return 1
|
||||
62 63 | elif x > 5:
|
||||
|
||||
auto_return_type.py:68:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:68:5
|
||||
|
|
||||
68 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
69 | if x:
|
||||
70 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `Optional[int]`
|
||||
help: Add return type annotation: `Optional[int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |+from typing import Optional
|
||||
|
|
@ -244,13 +257,14 @@ auto_return_type.py:68:5: ANN201 [*] Missing return type annotation for public f
|
|||
70 71 | return 1
|
||||
71 72 |
|
||||
|
||||
auto_return_type.py:73:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:73:5
|
||||
|
|
||||
73 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
74 | x = 1
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
70 70 | return 1
|
||||
|
|
@ -262,14 +276,15 @@ auto_return_type.py:73:5: ANN201 [*] Missing return type annotation for public f
|
|||
75 75 |
|
||||
76 76 |
|
||||
|
||||
auto_return_type.py:77:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:77:5
|
||||
|
|
||||
77 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
78 | if x > 0:
|
||||
79 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `Optional[int]`
|
||||
help: Add return type annotation: `Optional[int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |+from typing import Optional
|
||||
|
|
@ -286,14 +301,15 @@ auto_return_type.py:77:5: ANN201 [*] Missing return type annotation for public f
|
|||
79 80 | return 1
|
||||
80 81 |
|
||||
|
||||
auto_return_type.py:82:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:82:5
|
||||
|
|
||||
82 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
83 | match x:
|
||||
84 | case [1, 2, 3]:
|
||||
|
|
||||
= help: Add return type annotation: `Union[str, int, None]`
|
||||
help: Add return type annotation: `Union[str, int, None]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |+from typing import Union
|
||||
|
|
@ -310,14 +326,15 @@ auto_return_type.py:82:5: ANN201 [*] Missing return type annotation for public f
|
|||
84 85 | case [1, 2, 3]:
|
||||
85 86 | return 1
|
||||
|
||||
auto_return_type.py:90:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:90:5
|
||||
|
|
||||
90 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
91 | for i in range(5):
|
||||
92 | if i > 0:
|
||||
|
|
||||
= help: Add return type annotation: `Optional[int]`
|
||||
help: Add return type annotation: `Optional[int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |+from typing import Optional
|
||||
|
|
@ -334,14 +351,15 @@ auto_return_type.py:90:5: ANN201 [*] Missing return type annotation for public f
|
|||
92 93 | if i > 0:
|
||||
93 94 | return 1
|
||||
|
||||
auto_return_type.py:96:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:96:5
|
||||
|
|
||||
96 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
97 | for i in range(5):
|
||||
98 | if i > 0:
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
93 93 | return 1
|
||||
|
|
@ -353,14 +371,15 @@ auto_return_type.py:96:5: ANN201 [*] Missing return type annotation for public f
|
|||
98 98 | if i > 0:
|
||||
99 99 | return 1
|
||||
|
||||
auto_return_type.py:104:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:104:5
|
||||
|
|
||||
104 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
105 | for i in range(5):
|
||||
106 | if i > 0:
|
||||
|
|
||||
= help: Add return type annotation: `Optional[int]`
|
||||
help: Add return type annotation: `Optional[int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |+from typing import Optional
|
||||
|
|
@ -377,14 +396,15 @@ auto_return_type.py:104:5: ANN201 [*] Missing return type annotation for public
|
|||
106 107 | if i > 0:
|
||||
107 108 | break
|
||||
|
||||
auto_return_type.py:112:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:112:5
|
||||
|
|
||||
112 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
113 | try:
|
||||
114 | pass
|
||||
|
|
||||
= help: Add return type annotation: `Optional[int]`
|
||||
help: Add return type annotation: `Optional[int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |+from typing import Optional
|
||||
|
|
@ -401,14 +421,15 @@ auto_return_type.py:112:5: ANN201 [*] Missing return type annotation for public
|
|||
114 115 | pass
|
||||
115 116 | except:
|
||||
|
||||
auto_return_type.py:119:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:119:5
|
||||
|
|
||||
119 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
120 | try:
|
||||
121 | pass
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
116 116 | return 1
|
||||
|
|
@ -420,14 +441,15 @@ auto_return_type.py:119:5: ANN201 [*] Missing return type annotation for public
|
|||
121 121 | pass
|
||||
122 122 | except:
|
||||
|
||||
auto_return_type.py:128:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:128:5
|
||||
|
|
||||
128 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
129 | try:
|
||||
130 | pass
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
125 125 | return 2
|
||||
|
|
@ -439,14 +461,15 @@ auto_return_type.py:128:5: ANN201 [*] Missing return type annotation for public
|
|||
130 130 | pass
|
||||
131 131 | except:
|
||||
|
||||
auto_return_type.py:137:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:137:5
|
||||
|
|
||||
137 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
138 | try:
|
||||
139 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `Optional[int]`
|
||||
help: Add return type annotation: `Optional[int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |+from typing import Optional
|
||||
|
|
@ -463,14 +486,15 @@ auto_return_type.py:137:5: ANN201 [*] Missing return type annotation for public
|
|||
139 140 | return 1
|
||||
140 141 | except:
|
||||
|
||||
auto_return_type.py:146:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:146:5
|
||||
|
|
||||
146 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
147 | while x > 0:
|
||||
148 | break
|
||||
|
|
||||
= help: Add return type annotation: `Optional[int]`
|
||||
help: Add return type annotation: `Optional[int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 |+from typing import Optional
|
||||
|
|
@ -487,63 +511,69 @@ auto_return_type.py:146:5: ANN201 [*] Missing return type annotation for public
|
|||
148 149 | break
|
||||
149 150 | return 1
|
||||
|
||||
auto_return_type.py:158:9: ANN201 Missing return type annotation for public function `method`
|
||||
ANN201 Missing return type annotation for public function `method`
|
||||
--> auto_return_type.py:158:9
|
||||
|
|
||||
156 | class Foo(abc.ABC):
|
||||
157 | @abstractmethod
|
||||
158 | def method(self):
|
||||
| ^^^^^^ ANN201
|
||||
| ^^^^^^
|
||||
159 | pass
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:162:9: ANN201 Missing return type annotation for public function `method`
|
||||
ANN201 Missing return type annotation for public function `method`
|
||||
--> auto_return_type.py:162:9
|
||||
|
|
||||
161 | @abc.abstractmethod
|
||||
162 | def method(self):
|
||||
| ^^^^^^ ANN201
|
||||
| ^^^^^^
|
||||
163 | """Docstring."""
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:166:9: ANN201 Missing return type annotation for public function `method`
|
||||
ANN201 Missing return type annotation for public function `method`
|
||||
--> auto_return_type.py:166:9
|
||||
|
|
||||
165 | @abc.abstractmethod
|
||||
166 | def method(self):
|
||||
| ^^^^^^ ANN201
|
||||
| ^^^^^^
|
||||
167 | ...
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:171:9: ANN205 Missing return type annotation for staticmethod `method`
|
||||
ANN205 Missing return type annotation for staticmethod `method`
|
||||
--> auto_return_type.py:171:9
|
||||
|
|
||||
169 | @staticmethod
|
||||
170 | @abstractmethod
|
||||
171 | def method():
|
||||
| ^^^^^^ ANN205
|
||||
| ^^^^^^
|
||||
172 | pass
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:176:9: ANN206 Missing return type annotation for classmethod `method`
|
||||
ANN206 Missing return type annotation for classmethod `method`
|
||||
--> auto_return_type.py:176:9
|
||||
|
|
||||
174 | @classmethod
|
||||
175 | @abstractmethod
|
||||
176 | def method(cls):
|
||||
| ^^^^^^ ANN206
|
||||
| ^^^^^^
|
||||
177 | pass
|
||||
|
|
||||
= help: Add return type annotation
|
||||
help: Add return type annotation
|
||||
|
||||
auto_return_type.py:180:9: ANN201 [*] Missing return type annotation for public function `method`
|
||||
ANN201 [*] Missing return type annotation for public function `method`
|
||||
--> auto_return_type.py:180:9
|
||||
|
|
||||
179 | @abstractmethod
|
||||
180 | def method(self):
|
||||
| ^^^^^^ ANN201
|
||||
| ^^^^^^
|
||||
181 | if self.x > 0:
|
||||
182 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `float`
|
||||
help: Add return type annotation: `float`
|
||||
|
||||
ℹ Unsafe fix
|
||||
177 177 | pass
|
||||
|
|
@ -555,14 +585,15 @@ auto_return_type.py:180:9: ANN201 [*] Missing return type annotation for public
|
|||
182 182 | return 1
|
||||
183 183 | else:
|
||||
|
||||
auto_return_type.py:187:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:187:5
|
||||
|
|
||||
187 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
188 | try:
|
||||
189 | pass
|
||||
|
|
||||
= help: Add return type annotation: `Optional[int]`
|
||||
help: Add return type annotation: `Optional[int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
151 151 |
|
||||
|
|
@ -582,14 +613,15 @@ auto_return_type.py:187:5: ANN201 [*] Missing return type annotation for public
|
|||
189 190 | pass
|
||||
190 191 | except:
|
||||
|
||||
auto_return_type.py:194:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:194:5
|
||||
|
|
||||
194 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
195 | try:
|
||||
196 | pass
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
191 191 | return 2
|
||||
|
|
@ -601,14 +633,15 @@ auto_return_type.py:194:5: ANN201 [*] Missing return type annotation for public
|
|||
196 196 | pass
|
||||
197 197 | except:
|
||||
|
||||
auto_return_type.py:203:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:203:5
|
||||
|
|
||||
203 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
204 | if not x:
|
||||
205 | raise ValueError
|
||||
|
|
||||
= help: Add return type annotation: `NoReturn`
|
||||
help: Add return type annotation: `NoReturn`
|
||||
|
||||
ℹ Unsafe fix
|
||||
151 151 |
|
||||
|
|
@ -628,14 +661,15 @@ auto_return_type.py:203:5: ANN201 [*] Missing return type annotation for public
|
|||
205 206 | raise ValueError
|
||||
206 207 | else:
|
||||
|
||||
auto_return_type.py:210:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:210:5
|
||||
|
|
||||
210 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
211 | if not x:
|
||||
212 | raise ValueError
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
207 207 | raise TypeError
|
||||
|
|
@ -647,14 +681,15 @@ auto_return_type.py:210:5: ANN201 [*] Missing return type annotation for public
|
|||
212 212 | raise ValueError
|
||||
213 213 | else:
|
||||
|
||||
auto_return_type.py:234:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:234:5
|
||||
|
|
||||
234 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
235 | if not x:
|
||||
236 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
231 231 | return i
|
||||
|
|
@ -666,14 +701,15 @@ auto_return_type.py:234:5: ANN201 [*] Missing return type annotation for public
|
|||
236 236 | return 1
|
||||
237 237 | raise ValueError
|
||||
|
||||
auto_return_type.py:240:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:240:5
|
||||
|
|
||||
240 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
241 | if not x:
|
||||
242 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
237 237 | raise ValueError
|
||||
|
|
@ -685,14 +721,15 @@ auto_return_type.py:240:5: ANN201 [*] Missing return type annotation for public
|
|||
242 242 | return 1
|
||||
243 243 | else:
|
||||
|
||||
auto_return_type.py:248:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:248:5
|
||||
|
|
||||
248 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
249 | try:
|
||||
250 | raise ValueError
|
||||
|
|
||||
= help: Add return type annotation: `Optional[int]`
|
||||
help: Add return type annotation: `Optional[int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
214 214 | return 1
|
||||
|
|
@ -713,14 +750,15 @@ auto_return_type.py:248:5: ANN201 [*] Missing return type annotation for public
|
|||
250 250 | raise ValueError
|
||||
251 251 | except:
|
||||
|
||||
auto_return_type.py:255:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:255:5
|
||||
|
|
||||
255 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
256 | try:
|
||||
257 | return 1
|
||||
|
|
||||
= help: Add return type annotation: `Optional[int]`
|
||||
help: Add return type annotation: `Optional[int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
214 214 | return 1
|
||||
|
|
@ -741,14 +779,15 @@ auto_return_type.py:255:5: ANN201 [*] Missing return type annotation for public
|
|||
257 257 | return 1
|
||||
258 258 | except:
|
||||
|
||||
auto_return_type.py:262:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:262:5
|
||||
|
|
||||
262 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
263 | for _ in range(3):
|
||||
264 | if x > 0:
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
259 259 | pass
|
||||
|
|
@ -760,14 +799,15 @@ auto_return_type.py:262:5: ANN201 [*] Missing return type annotation for public
|
|||
264 264 | if x > 0:
|
||||
265 265 | return 1
|
||||
|
||||
auto_return_type.py:269:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:269:5
|
||||
|
|
||||
269 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
270 | if x > 5:
|
||||
271 | raise ValueError
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
266 266 | raise ValueError
|
||||
|
|
@ -779,14 +819,15 @@ auto_return_type.py:269:5: ANN201 [*] Missing return type annotation for public
|
|||
271 271 | raise ValueError
|
||||
272 272 | else:
|
||||
|
||||
auto_return_type.py:276:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:276:5
|
||||
|
|
||||
276 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
277 | if x > 5:
|
||||
278 | raise ValueError
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
273 273 | pass
|
||||
|
|
@ -798,14 +839,15 @@ auto_return_type.py:276:5: ANN201 [*] Missing return type annotation for public
|
|||
278 278 | raise ValueError
|
||||
279 279 | elif x > 10:
|
||||
|
||||
auto_return_type.py:283:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:283:5
|
||||
|
|
||||
283 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
284 | if x > 5:
|
||||
285 | raise ValueError
|
||||
|
|
||||
= help: Add return type annotation: `Optional[int]`
|
||||
help: Add return type annotation: `Optional[int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
214 214 | return 1
|
||||
|
|
@ -826,14 +868,15 @@ auto_return_type.py:283:5: ANN201 [*] Missing return type annotation for public
|
|||
285 285 | raise ValueError
|
||||
286 286 | elif x > 10:
|
||||
|
||||
auto_return_type.py:290:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:290:5
|
||||
|
|
||||
290 | def func():
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
291 | try:
|
||||
292 | return 5
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
287 287 | return 5
|
||||
|
|
@ -845,14 +888,15 @@ auto_return_type.py:290:5: ANN201 [*] Missing return type annotation for public
|
|||
292 292 | return 5
|
||||
293 293 | except:
|
||||
|
||||
auto_return_type.py:299:5: ANN201 [*] Missing return type annotation for public function `func`
|
||||
ANN201 [*] Missing return type annotation for public function `func`
|
||||
--> auto_return_type.py:299:5
|
||||
|
|
||||
299 | def func(x: int):
|
||||
| ^^^^ ANN201
|
||||
| ^^^^
|
||||
300 | match x:
|
||||
301 | case [1, 2, 3]:
|
||||
|
|
||||
= help: Add return type annotation: `Union[str, int]`
|
||||
help: Add return type annotation: `Union[str, int]`
|
||||
|
||||
ℹ Unsafe fix
|
||||
214 214 | return 1
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_annotations/mod.rs
|
||||
---
|
||||
annotation_presence.py:5:5: ANN201 [*] Missing return type annotation for public function `foo`
|
||||
ANN201 [*] Missing return type annotation for public function `foo`
|
||||
--> annotation_presence.py:5:5
|
||||
|
|
||||
4 | # Error
|
||||
5 | def foo(a, b):
|
||||
| ^^^ ANN201
|
||||
| ^^^
|
||||
6 | pass
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 | from typing_extensions import override
|
||||
|
|
@ -20,30 +21,33 @@ annotation_presence.py:5:5: ANN201 [*] Missing return type annotation for public
|
|||
7 7 |
|
||||
8 8 |
|
||||
|
||||
annotation_presence.py:5:9: ANN001 Missing type annotation for function argument `a`
|
||||
ANN001 Missing type annotation for function argument `a`
|
||||
--> annotation_presence.py:5:9
|
||||
|
|
||||
4 | # Error
|
||||
5 | def foo(a, b):
|
||||
| ^ ANN001
|
||||
| ^
|
||||
6 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:5:12: ANN001 Missing type annotation for function argument `b`
|
||||
ANN001 Missing type annotation for function argument `b`
|
||||
--> annotation_presence.py:5:12
|
||||
|
|
||||
4 | # Error
|
||||
5 | def foo(a, b):
|
||||
| ^ ANN001
|
||||
| ^
|
||||
6 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:10:5: ANN201 [*] Missing return type annotation for public function `foo`
|
||||
ANN201 [*] Missing return type annotation for public function `foo`
|
||||
--> annotation_presence.py:10:5
|
||||
|
|
||||
9 | # Error
|
||||
10 | def foo(a: int, b):
|
||||
| ^^^ ANN201
|
||||
| ^^^
|
||||
11 | pass
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
7 7 |
|
||||
|
|
@ -55,30 +59,33 @@ annotation_presence.py:10:5: ANN201 [*] Missing return type annotation for publi
|
|||
12 12 |
|
||||
13 13 |
|
||||
|
||||
annotation_presence.py:10:17: ANN001 Missing type annotation for function argument `b`
|
||||
ANN001 Missing type annotation for function argument `b`
|
||||
--> annotation_presence.py:10:17
|
||||
|
|
||||
9 | # Error
|
||||
10 | def foo(a: int, b):
|
||||
| ^ ANN001
|
||||
| ^
|
||||
11 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:15:17: ANN001 Missing type annotation for function argument `b`
|
||||
ANN001 Missing type annotation for function argument `b`
|
||||
--> annotation_presence.py:15:17
|
||||
|
|
||||
14 | # Error
|
||||
15 | def foo(a: int, b) -> int:
|
||||
| ^ ANN001
|
||||
| ^
|
||||
16 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:20:5: ANN201 [*] Missing return type annotation for public function `foo`
|
||||
ANN201 [*] Missing return type annotation for public function `foo`
|
||||
--> annotation_presence.py:20:5
|
||||
|
|
||||
19 | # Error
|
||||
20 | def foo(a: int, b: int):
|
||||
| ^^^ ANN201
|
||||
| ^^^
|
||||
21 | pass
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
17 17 |
|
||||
|
|
@ -90,14 +97,15 @@ annotation_presence.py:20:5: ANN201 [*] Missing return type annotation for publi
|
|||
22 22 |
|
||||
23 23 |
|
||||
|
||||
annotation_presence.py:25:5: ANN201 [*] Missing return type annotation for public function `foo`
|
||||
ANN201 [*] Missing return type annotation for public function `foo`
|
||||
--> annotation_presence.py:25:5
|
||||
|
|
||||
24 | # Error
|
||||
25 | def foo():
|
||||
| ^^^ ANN201
|
||||
| ^^^
|
||||
26 | pass
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
22 22 |
|
||||
|
|
@ -109,167 +117,186 @@ annotation_presence.py:25:5: ANN201 [*] Missing return type annotation for publi
|
|||
27 27 |
|
||||
28 28 |
|
||||
|
||||
annotation_presence.py:45:12: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
--> annotation_presence.py:45:12
|
||||
|
|
||||
44 | # ANN401
|
||||
45 | def foo(a: Any, *args: str, **kwargs: str) -> int:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
46 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:50:47: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `foo`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `foo`
|
||||
--> annotation_presence.py:50:47
|
||||
|
|
||||
49 | # ANN401
|
||||
50 | def foo(a: int, *args: str, **kwargs: str) -> Any:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
51 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:55:24: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `*args`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `*args`
|
||||
--> annotation_presence.py:55:24
|
||||
|
|
||||
54 | # ANN401
|
||||
55 | def foo(a: int, *args: Any, **kwargs: Any) -> int:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
56 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:55:39: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `**kwargs`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `**kwargs`
|
||||
--> annotation_presence.py:55:39
|
||||
|
|
||||
54 | # ANN401
|
||||
55 | def foo(a: int, *args: Any, **kwargs: Any) -> int:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
56 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:60:24: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `*args`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `*args`
|
||||
--> annotation_presence.py:60:24
|
||||
|
|
||||
59 | # ANN401
|
||||
60 | def foo(a: int, *args: Any, **kwargs: str) -> int:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
61 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:65:39: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `**kwargs`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `**kwargs`
|
||||
--> annotation_presence.py:65:39
|
||||
|
|
||||
64 | # ANN401
|
||||
65 | def foo(a: int, *args: str, **kwargs: Any) -> int:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
66 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:79:29: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
--> annotation_presence.py:79:29
|
||||
|
|
||||
78 | # ANN401
|
||||
79 | def foo(self: "Foo", a: Any, *params: str, **options: str) -> int:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
80 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:83:67: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `foo`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `foo`
|
||||
--> annotation_presence.py:83:67
|
||||
|
|
||||
82 | # ANN401
|
||||
83 | def foo(self: "Foo", a: int, *params: str, **options: str) -> Any:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
84 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:87:43: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `*params`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `*params`
|
||||
--> annotation_presence.py:87:43
|
||||
|
|
||||
86 | # ANN401
|
||||
87 | def foo(self: "Foo", a: int, *params: Any, **options: Any) -> int:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
88 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:87:59: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `**options`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `**options`
|
||||
--> annotation_presence.py:87:59
|
||||
|
|
||||
86 | # ANN401
|
||||
87 | def foo(self: "Foo", a: int, *params: Any, **options: Any) -> int:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
88 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:91:43: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `*params`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `*params`
|
||||
--> annotation_presence.py:91:43
|
||||
|
|
||||
90 | # ANN401
|
||||
91 | def foo(self: "Foo", a: int, *params: Any, **options: str) -> int:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
92 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:95:59: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `**options`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `**options`
|
||||
--> annotation_presence.py:95:59
|
||||
|
|
||||
94 | # ANN401
|
||||
95 | def foo(self: "Foo", a: int, *params: str, **options: Any) -> int:
|
||||
| ^^^ ANN401
|
||||
| ^^^
|
||||
96 | pass
|
||||
|
|
||||
|
||||
annotation_presence.py:149:10: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
--> annotation_presence.py:149:10
|
||||
|
|
||||
148 | # ANN401
|
||||
149 | def f(a: Any | int) -> None: ...
|
||||
| ^^^^^^^^^ ANN401
|
||||
| ^^^^^^^^^
|
||||
150 | def f(a: int | Any) -> None: ...
|
||||
151 | def f(a: Union[str, bytes, Any]) -> None: ...
|
||||
|
|
||||
|
||||
annotation_presence.py:150:10: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
--> annotation_presence.py:150:10
|
||||
|
|
||||
148 | # ANN401
|
||||
149 | def f(a: Any | int) -> None: ...
|
||||
150 | def f(a: int | Any) -> None: ...
|
||||
| ^^^^^^^^^ ANN401
|
||||
| ^^^^^^^^^
|
||||
151 | def f(a: Union[str, bytes, Any]) -> None: ...
|
||||
152 | def f(a: Optional[Any]) -> None: ...
|
||||
|
|
||||
|
||||
annotation_presence.py:151:10: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
--> annotation_presence.py:151:10
|
||||
|
|
||||
149 | def f(a: Any | int) -> None: ...
|
||||
150 | def f(a: int | Any) -> None: ...
|
||||
151 | def f(a: Union[str, bytes, Any]) -> None: ...
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ ANN401
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
152 | def f(a: Optional[Any]) -> None: ...
|
||||
153 | def f(a: Annotated[Any, ...]) -> None: ...
|
||||
|
|
||||
|
||||
annotation_presence.py:152:10: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
--> annotation_presence.py:152:10
|
||||
|
|
||||
150 | def f(a: int | Any) -> None: ...
|
||||
151 | def f(a: Union[str, bytes, Any]) -> None: ...
|
||||
152 | def f(a: Optional[Any]) -> None: ...
|
||||
| ^^^^^^^^^^^^^ ANN401
|
||||
| ^^^^^^^^^^^^^
|
||||
153 | def f(a: Annotated[Any, ...]) -> None: ...
|
||||
154 | def f(a: "Union[str, bytes, Any]") -> None: ...
|
||||
|
|
||||
|
||||
annotation_presence.py:153:10: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
--> annotation_presence.py:153:10
|
||||
|
|
||||
151 | def f(a: Union[str, bytes, Any]) -> None: ...
|
||||
152 | def f(a: Optional[Any]) -> None: ...
|
||||
153 | def f(a: Annotated[Any, ...]) -> None: ...
|
||||
| ^^^^^^^^^^^^^^^^^^^ ANN401
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
154 | def f(a: "Union[str, bytes, Any]") -> None: ...
|
||||
|
|
||||
|
||||
annotation_presence.py:154:10: ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
ANN401 Dynamically typed expressions (typing.Any) are disallowed in `a`
|
||||
--> annotation_presence.py:154:10
|
||||
|
|
||||
152 | def f(a: Optional[Any]) -> None: ...
|
||||
153 | def f(a: Annotated[Any, ...]) -> None: ...
|
||||
154 | def f(a: "Union[str, bytes, Any]") -> None: ...
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ ANN401
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
annotation_presence.py:159:9: ANN204 [*] Missing return type annotation for special method `__init__`
|
||||
ANN204 [*] Missing return type annotation for special method `__init__`
|
||||
--> annotation_presence.py:159:9
|
||||
|
|
||||
157 | class Foo:
|
||||
158 | @decorator()
|
||||
159 | def __init__(self: "Foo", foo: int):
|
||||
| ^^^^^^^^ ANN204
|
||||
| ^^^^^^^^
|
||||
160 | ...
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
156 156 |
|
||||
|
|
@ -281,15 +308,16 @@ annotation_presence.py:159:9: ANN204 [*] Missing return type annotation for spec
|
|||
161 161 |
|
||||
162 162 |
|
||||
|
||||
annotation_presence.py:165:9: ANN204 [*] Missing return type annotation for special method `__init__`
|
||||
ANN204 [*] Missing return type annotation for special method `__init__`
|
||||
--> annotation_presence.py:165:9
|
||||
|
|
||||
163 | # Regression test for: https://github.com/astral-sh/ruff/issues/7711
|
||||
164 | class Class:
|
||||
165 | def __init__(self):
|
||||
| ^^^^^^^^ ANN204
|
||||
| ^^^^^^^^
|
||||
166 | print(f"{self.attr=}")
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
162 162 |
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_annotations/mod.rs
|
||||
---
|
||||
ignore_fully_untyped.py:24:5: ANN201 [*] Missing return type annotation for public function `error_partially_typed_1`
|
||||
ANN201 [*] Missing return type annotation for public function `error_partially_typed_1`
|
||||
--> ignore_fully_untyped.py:24:5
|
||||
|
|
||||
24 | def error_partially_typed_1(a: int, b):
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ ANN201
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
25 | pass
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
21 21 | pass
|
||||
|
|
@ -19,27 +20,30 @@ ignore_fully_untyped.py:24:5: ANN201 [*] Missing return type annotation for publ
|
|||
26 26 |
|
||||
27 27 |
|
||||
|
||||
ignore_fully_untyped.py:24:37: ANN001 Missing type annotation for function argument `b`
|
||||
ANN001 Missing type annotation for function argument `b`
|
||||
--> ignore_fully_untyped.py:24:37
|
||||
|
|
||||
24 | def error_partially_typed_1(a: int, b):
|
||||
| ^ ANN001
|
||||
| ^
|
||||
25 | pass
|
||||
|
|
||||
|
||||
ignore_fully_untyped.py:28:37: ANN001 Missing type annotation for function argument `b`
|
||||
ANN001 Missing type annotation for function argument `b`
|
||||
--> ignore_fully_untyped.py:28:37
|
||||
|
|
||||
28 | def error_partially_typed_2(a: int, b) -> int:
|
||||
| ^ ANN001
|
||||
| ^
|
||||
29 | pass
|
||||
|
|
||||
|
||||
ignore_fully_untyped.py:32:5: ANN201 [*] Missing return type annotation for public function `error_partially_typed_3`
|
||||
ANN201 [*] Missing return type annotation for public function `error_partially_typed_3`
|
||||
--> ignore_fully_untyped.py:32:5
|
||||
|
|
||||
32 | def error_partially_typed_3(a: int, b: int):
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ ANN201
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
33 | pass
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
29 29 | pass
|
||||
|
|
@ -51,15 +55,16 @@ ignore_fully_untyped.py:32:5: ANN201 [*] Missing return type annotation for publ
|
|||
34 34 |
|
||||
35 35 |
|
||||
|
||||
ignore_fully_untyped.py:43:9: ANN201 [*] Missing return type annotation for public function `error_typed_self`
|
||||
ANN201 [*] Missing return type annotation for public function `error_typed_self`
|
||||
--> ignore_fully_untyped.py:43:9
|
||||
|
|
||||
41 | pass
|
||||
42 |
|
||||
43 | def error_typed_self(self: X):
|
||||
| ^^^^^^^^^^^^^^^^ ANN201
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
44 | pass
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
40 40 | def ok_untyped_method(self):
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_annotations/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
mypy_init_return.py:5:9: ANN204 [*] Missing return type annotation for special method `__init__`
|
||||
ANN204 [*] Missing return type annotation for special method `__init__`
|
||||
--> mypy_init_return.py:5:9
|
||||
|
|
||||
3 | # Error
|
||||
4 | class Foo:
|
||||
5 | def __init__(self):
|
||||
| ^^^^^^^^ ANN204
|
||||
| ^^^^^^^^
|
||||
6 | ...
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 |
|
||||
|
|
@ -22,15 +22,16 @@ mypy_init_return.py:5:9: ANN204 [*] Missing return type annotation for special m
|
|||
7 7 |
|
||||
8 8 |
|
||||
|
||||
mypy_init_return.py:11:9: ANN204 [*] Missing return type annotation for special method `__init__`
|
||||
ANN204 [*] Missing return type annotation for special method `__init__`
|
||||
--> mypy_init_return.py:11:9
|
||||
|
|
||||
9 | # Error
|
||||
10 | class Foo:
|
||||
11 | def __init__(self, foo):
|
||||
| ^^^^^^^^ ANN204
|
||||
| ^^^^^^^^
|
||||
12 | ...
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
8 8 |
|
||||
|
|
@ -42,14 +43,15 @@ mypy_init_return.py:11:9: ANN204 [*] Missing return type annotation for special
|
|||
13 13 |
|
||||
14 14 |
|
||||
|
||||
mypy_init_return.py:40:5: ANN202 [*] Missing return type annotation for private function `__init__`
|
||||
ANN202 [*] Missing return type annotation for private function `__init__`
|
||||
--> mypy_init_return.py:40:5
|
||||
|
|
||||
39 | # Error
|
||||
40 | def __init__(self, foo: int):
|
||||
| ^^^^^^^^ ANN202
|
||||
| ^^^^^^^^
|
||||
41 | ...
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
37 37 |
|
||||
|
|
@ -61,15 +63,16 @@ mypy_init_return.py:40:5: ANN202 [*] Missing return type annotation for private
|
|||
42 42 |
|
||||
43 43 |
|
||||
|
||||
mypy_init_return.py:47:9: ANN204 [*] Missing return type annotation for special method `__init__`
|
||||
ANN204 [*] Missing return type annotation for special method `__init__`
|
||||
--> mypy_init_return.py:47:9
|
||||
|
|
||||
45 | # of a vararg falsely indicated that the function has a typed argument.
|
||||
46 | class Foo:
|
||||
47 | def __init__(self, *arg):
|
||||
| ^^^^^^^^ ANN204
|
||||
| ^^^^^^^^
|
||||
48 | ...
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
44 44 | # Error – used to be ok for a moment since the mere presence
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_annotations/mod.rs
|
||||
---
|
||||
simple_magic_methods.py:2:9: ANN204 [*] Missing return type annotation for special method `__str__`
|
||||
ANN204 [*] Missing return type annotation for special method `__str__`
|
||||
--> simple_magic_methods.py:2:9
|
||||
|
|
||||
1 | class Foo:
|
||||
2 | def __str__(self):
|
||||
| ^^^^^^^ ANN204
|
||||
| ^^^^^^^
|
||||
3 | ...
|
||||
|
|
||||
= help: Add return type annotation: `str`
|
||||
help: Add return type annotation: `str`
|
||||
|
||||
ℹ Unsafe fix
|
||||
1 1 | class Foo:
|
||||
|
|
@ -18,15 +19,16 @@ simple_magic_methods.py:2:9: ANN204 [*] Missing return type annotation for speci
|
|||
4 4 |
|
||||
5 5 | def __repr__(self):
|
||||
|
||||
simple_magic_methods.py:5:9: ANN204 [*] Missing return type annotation for special method `__repr__`
|
||||
ANN204 [*] Missing return type annotation for special method `__repr__`
|
||||
--> simple_magic_methods.py:5:9
|
||||
|
|
||||
3 | ...
|
||||
4 |
|
||||
5 | def __repr__(self):
|
||||
| ^^^^^^^^ ANN204
|
||||
| ^^^^^^^^
|
||||
6 | ...
|
||||
|
|
||||
= help: Add return type annotation: `str`
|
||||
help: Add return type annotation: `str`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 | def __str__(self):
|
||||
|
|
@ -38,15 +40,16 @@ simple_magic_methods.py:5:9: ANN204 [*] Missing return type annotation for speci
|
|||
7 7 |
|
||||
8 8 | def __len__(self):
|
||||
|
||||
simple_magic_methods.py:8:9: ANN204 [*] Missing return type annotation for special method `__len__`
|
||||
ANN204 [*] Missing return type annotation for special method `__len__`
|
||||
--> simple_magic_methods.py:8:9
|
||||
|
|
||||
6 | ...
|
||||
7 |
|
||||
8 | def __len__(self):
|
||||
| ^^^^^^^ ANN204
|
||||
| ^^^^^^^
|
||||
9 | ...
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
5 5 | def __repr__(self):
|
||||
|
|
@ -58,15 +61,16 @@ simple_magic_methods.py:8:9: ANN204 [*] Missing return type annotation for speci
|
|||
10 10 |
|
||||
11 11 | def __length_hint__(self):
|
||||
|
||||
simple_magic_methods.py:11:9: ANN204 [*] Missing return type annotation for special method `__length_hint__`
|
||||
ANN204 [*] Missing return type annotation for special method `__length_hint__`
|
||||
--> simple_magic_methods.py:11:9
|
||||
|
|
||||
9 | ...
|
||||
10 |
|
||||
11 | def __length_hint__(self):
|
||||
| ^^^^^^^^^^^^^^^ ANN204
|
||||
| ^^^^^^^^^^^^^^^
|
||||
12 | ...
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
8 8 | def __len__(self):
|
||||
|
|
@ -78,15 +82,16 @@ simple_magic_methods.py:11:9: ANN204 [*] Missing return type annotation for spec
|
|||
13 13 |
|
||||
14 14 | def __init__(self):
|
||||
|
||||
simple_magic_methods.py:14:9: ANN204 [*] Missing return type annotation for special method `__init__`
|
||||
ANN204 [*] Missing return type annotation for special method `__init__`
|
||||
--> simple_magic_methods.py:14:9
|
||||
|
|
||||
12 | ...
|
||||
13 |
|
||||
14 | def __init__(self):
|
||||
| ^^^^^^^^ ANN204
|
||||
| ^^^^^^^^
|
||||
15 | ...
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
11 11 | def __length_hint__(self):
|
||||
|
|
@ -98,15 +103,16 @@ simple_magic_methods.py:14:9: ANN204 [*] Missing return type annotation for spec
|
|||
16 16 |
|
||||
17 17 | def __del__(self):
|
||||
|
||||
simple_magic_methods.py:17:9: ANN204 [*] Missing return type annotation for special method `__del__`
|
||||
ANN204 [*] Missing return type annotation for special method `__del__`
|
||||
--> simple_magic_methods.py:17:9
|
||||
|
|
||||
15 | ...
|
||||
16 |
|
||||
17 | def __del__(self):
|
||||
| ^^^^^^^ ANN204
|
||||
| ^^^^^^^
|
||||
18 | ...
|
||||
|
|
||||
= help: Add return type annotation: `None`
|
||||
help: Add return type annotation: `None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
14 14 | def __init__(self):
|
||||
|
|
@ -118,15 +124,16 @@ simple_magic_methods.py:17:9: ANN204 [*] Missing return type annotation for spec
|
|||
19 19 |
|
||||
20 20 | def __bool__(self):
|
||||
|
||||
simple_magic_methods.py:20:9: ANN204 [*] Missing return type annotation for special method `__bool__`
|
||||
ANN204 [*] Missing return type annotation for special method `__bool__`
|
||||
--> simple_magic_methods.py:20:9
|
||||
|
|
||||
18 | ...
|
||||
19 |
|
||||
20 | def __bool__(self):
|
||||
| ^^^^^^^^ ANN204
|
||||
| ^^^^^^^^
|
||||
21 | ...
|
||||
|
|
||||
= help: Add return type annotation: `bool`
|
||||
help: Add return type annotation: `bool`
|
||||
|
||||
ℹ Unsafe fix
|
||||
17 17 | def __del__(self):
|
||||
|
|
@ -138,15 +145,16 @@ simple_magic_methods.py:20:9: ANN204 [*] Missing return type annotation for spec
|
|||
22 22 |
|
||||
23 23 | def __bytes__(self):
|
||||
|
||||
simple_magic_methods.py:23:9: ANN204 [*] Missing return type annotation for special method `__bytes__`
|
||||
ANN204 [*] Missing return type annotation for special method `__bytes__`
|
||||
--> simple_magic_methods.py:23:9
|
||||
|
|
||||
21 | ...
|
||||
22 |
|
||||
23 | def __bytes__(self):
|
||||
| ^^^^^^^^^ ANN204
|
||||
| ^^^^^^^^^
|
||||
24 | ...
|
||||
|
|
||||
= help: Add return type annotation: `bytes`
|
||||
help: Add return type annotation: `bytes`
|
||||
|
||||
ℹ Unsafe fix
|
||||
20 20 | def __bool__(self):
|
||||
|
|
@ -158,15 +166,16 @@ simple_magic_methods.py:23:9: ANN204 [*] Missing return type annotation for spec
|
|||
25 25 |
|
||||
26 26 | def __format__(self, format_spec):
|
||||
|
||||
simple_magic_methods.py:26:9: ANN204 [*] Missing return type annotation for special method `__format__`
|
||||
ANN204 [*] Missing return type annotation for special method `__format__`
|
||||
--> simple_magic_methods.py:26:9
|
||||
|
|
||||
24 | ...
|
||||
25 |
|
||||
26 | def __format__(self, format_spec):
|
||||
| ^^^^^^^^^^ ANN204
|
||||
| ^^^^^^^^^^
|
||||
27 | ...
|
||||
|
|
||||
= help: Add return type annotation: `str`
|
||||
help: Add return type annotation: `str`
|
||||
|
||||
ℹ Unsafe fix
|
||||
23 23 | def __bytes__(self):
|
||||
|
|
@ -178,15 +187,16 @@ simple_magic_methods.py:26:9: ANN204 [*] Missing return type annotation for spec
|
|||
28 28 |
|
||||
29 29 | def __contains__(self, item):
|
||||
|
||||
simple_magic_methods.py:29:9: ANN204 [*] Missing return type annotation for special method `__contains__`
|
||||
ANN204 [*] Missing return type annotation for special method `__contains__`
|
||||
--> simple_magic_methods.py:29:9
|
||||
|
|
||||
27 | ...
|
||||
28 |
|
||||
29 | def __contains__(self, item):
|
||||
| ^^^^^^^^^^^^ ANN204
|
||||
| ^^^^^^^^^^^^
|
||||
30 | ...
|
||||
|
|
||||
= help: Add return type annotation: `bool`
|
||||
help: Add return type annotation: `bool`
|
||||
|
||||
ℹ Unsafe fix
|
||||
26 26 | def __format__(self, format_spec):
|
||||
|
|
@ -198,15 +208,16 @@ simple_magic_methods.py:29:9: ANN204 [*] Missing return type annotation for spec
|
|||
31 31 |
|
||||
32 32 | def __complex__(self):
|
||||
|
||||
simple_magic_methods.py:32:9: ANN204 [*] Missing return type annotation for special method `__complex__`
|
||||
ANN204 [*] Missing return type annotation for special method `__complex__`
|
||||
--> simple_magic_methods.py:32:9
|
||||
|
|
||||
30 | ...
|
||||
31 |
|
||||
32 | def __complex__(self):
|
||||
| ^^^^^^^^^^^ ANN204
|
||||
| ^^^^^^^^^^^
|
||||
33 | ...
|
||||
|
|
||||
= help: Add return type annotation: `complex`
|
||||
help: Add return type annotation: `complex`
|
||||
|
||||
ℹ Unsafe fix
|
||||
29 29 | def __contains__(self, item):
|
||||
|
|
@ -218,15 +229,16 @@ simple_magic_methods.py:32:9: ANN204 [*] Missing return type annotation for spec
|
|||
34 34 |
|
||||
35 35 | def __int__(self):
|
||||
|
||||
simple_magic_methods.py:35:9: ANN204 [*] Missing return type annotation for special method `__int__`
|
||||
ANN204 [*] Missing return type annotation for special method `__int__`
|
||||
--> simple_magic_methods.py:35:9
|
||||
|
|
||||
33 | ...
|
||||
34 |
|
||||
35 | def __int__(self):
|
||||
| ^^^^^^^ ANN204
|
||||
| ^^^^^^^
|
||||
36 | ...
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
32 32 | def __complex__(self):
|
||||
|
|
@ -238,15 +250,16 @@ simple_magic_methods.py:35:9: ANN204 [*] Missing return type annotation for spec
|
|||
37 37 |
|
||||
38 38 | def __float__(self):
|
||||
|
||||
simple_magic_methods.py:38:9: ANN204 [*] Missing return type annotation for special method `__float__`
|
||||
ANN204 [*] Missing return type annotation for special method `__float__`
|
||||
--> simple_magic_methods.py:38:9
|
||||
|
|
||||
36 | ...
|
||||
37 |
|
||||
38 | def __float__(self):
|
||||
| ^^^^^^^^^ ANN204
|
||||
| ^^^^^^^^^
|
||||
39 | ...
|
||||
|
|
||||
= help: Add return type annotation: `float`
|
||||
help: Add return type annotation: `float`
|
||||
|
||||
ℹ Unsafe fix
|
||||
35 35 | def __int__(self):
|
||||
|
|
@ -258,15 +271,16 @@ simple_magic_methods.py:38:9: ANN204 [*] Missing return type annotation for spec
|
|||
40 40 |
|
||||
41 41 | def __index__(self):
|
||||
|
||||
simple_magic_methods.py:41:9: ANN204 [*] Missing return type annotation for special method `__index__`
|
||||
ANN204 [*] Missing return type annotation for special method `__index__`
|
||||
--> simple_magic_methods.py:41:9
|
||||
|
|
||||
39 | ...
|
||||
40 |
|
||||
41 | def __index__(self):
|
||||
| ^^^^^^^^^ ANN204
|
||||
| ^^^^^^^^^
|
||||
42 | ...
|
||||
|
|
||||
= help: Add return type annotation: `int`
|
||||
help: Add return type annotation: `int`
|
||||
|
||||
ℹ Unsafe fix
|
||||
38 38 | def __float__(self):
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_annotations/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
suppress_none_returning.py:45:5: ANN201 [*] Missing return type annotation for public function `foo`
|
||||
ANN201 [*] Missing return type annotation for public function `foo`
|
||||
--> suppress_none_returning.py:45:5
|
||||
|
|
||||
44 | # Error
|
||||
45 | def foo():
|
||||
| ^^^ ANN201
|
||||
| ^^^
|
||||
46 | return True
|
||||
|
|
||||
= help: Add return type annotation: `bool`
|
||||
help: Add return type annotation: `bool`
|
||||
|
||||
ℹ Unsafe fix
|
||||
42 42 |
|
||||
|
|
@ -21,15 +21,16 @@ suppress_none_returning.py:45:5: ANN201 [*] Missing return type annotation for p
|
|||
47 47 |
|
||||
48 48 |
|
||||
|
||||
suppress_none_returning.py:50:5: ANN201 [*] Missing return type annotation for public function `foo`
|
||||
ANN201 [*] Missing return type annotation for public function `foo`
|
||||
--> suppress_none_returning.py:50:5
|
||||
|
|
||||
49 | # Error
|
||||
50 | def foo():
|
||||
| ^^^ ANN201
|
||||
| ^^^
|
||||
51 | a = 2 + 2
|
||||
52 | if a == 4:
|
||||
|
|
||||
= help: Add return type annotation: `bool | None`
|
||||
help: Add return type annotation: `bool | None`
|
||||
|
||||
ℹ Unsafe fix
|
||||
47 47 |
|
||||
|
|
@ -41,10 +42,11 @@ suppress_none_returning.py:50:5: ANN201 [*] Missing return type annotation for p
|
|||
52 52 | if a == 4:
|
||||
53 53 | return True
|
||||
|
||||
suppress_none_returning.py:59:9: ANN001 Missing type annotation for function argument `a`
|
||||
ANN001 Missing type annotation for function argument `a`
|
||||
--> suppress_none_returning.py:59:9
|
||||
|
|
||||
58 | # Error (on the argument, but not the return type)
|
||||
59 | def foo(a):
|
||||
| ^ ANN001
|
||||
| ^
|
||||
60 | a = 2 + 2
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,90 +1,101 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
---
|
||||
ASYNC100.py:8:5: ASYNC100 A `with trio.fail_after(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
ASYNC100 A `with trio.fail_after(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
--> ASYNC100.py:8:5
|
||||
|
|
||||
7 | async def func():
|
||||
8 | / with trio.fail_after():
|
||||
9 | | ...
|
||||
| |___________^ ASYNC100
|
||||
| |___________^
|
||||
|
|
||||
|
||||
ASYNC100.py:18:5: ASYNC100 A `with trio.move_on_after(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
ASYNC100 A `with trio.move_on_after(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
--> ASYNC100.py:18:5
|
||||
|
|
||||
17 | async def func():
|
||||
18 | / with trio.move_on_after():
|
||||
19 | | ...
|
||||
| |___________^ ASYNC100
|
||||
| |___________^
|
||||
|
|
||||
|
||||
ASYNC100.py:45:5: ASYNC100 A `with anyio.move_on_after(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
ASYNC100 A `with anyio.move_on_after(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
--> ASYNC100.py:45:5
|
||||
|
|
||||
44 | async def func():
|
||||
45 | / with anyio.move_on_after(delay=0.2):
|
||||
46 | | ...
|
||||
| |___________^ ASYNC100
|
||||
| |___________^
|
||||
|
|
||||
|
||||
ASYNC100.py:50:5: ASYNC100 A `with anyio.fail_after(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
ASYNC100 A `with anyio.fail_after(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
--> ASYNC100.py:50:5
|
||||
|
|
||||
49 | async def func():
|
||||
50 | / with anyio.fail_after():
|
||||
51 | | ...
|
||||
| |___________^ ASYNC100
|
||||
| |___________^
|
||||
|
|
||||
|
||||
ASYNC100.py:55:5: ASYNC100 A `with anyio.CancelScope(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
ASYNC100 A `with anyio.CancelScope(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
--> ASYNC100.py:55:5
|
||||
|
|
||||
54 | async def func():
|
||||
55 | / with anyio.CancelScope():
|
||||
56 | | ...
|
||||
| |___________^ ASYNC100
|
||||
| |___________^
|
||||
|
|
||||
|
||||
ASYNC100.py:60:5: ASYNC100 A `with anyio.CancelScope(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
ASYNC100 A `with anyio.CancelScope(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
--> ASYNC100.py:60:5
|
||||
|
|
||||
59 | async def func():
|
||||
60 | / with anyio.CancelScope(), nullcontext():
|
||||
61 | | ...
|
||||
| |___________^ ASYNC100
|
||||
| |___________^
|
||||
|
|
||||
|
||||
ASYNC100.py:65:5: ASYNC100 A `with anyio.CancelScope(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
ASYNC100 A `with anyio.CancelScope(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
--> ASYNC100.py:65:5
|
||||
|
|
||||
64 | async def func():
|
||||
65 | / with nullcontext(), anyio.CancelScope():
|
||||
66 | | ...
|
||||
| |___________^ ASYNC100
|
||||
| |___________^
|
||||
|
|
||||
|
||||
ASYNC100.py:70:5: ASYNC100 A `with asyncio.timeout(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
ASYNC100 A `with asyncio.timeout(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
--> ASYNC100.py:70:5
|
||||
|
|
||||
69 | async def func():
|
||||
70 | / async with asyncio.timeout(delay=0.2):
|
||||
71 | | ...
|
||||
| |___________^ ASYNC100
|
||||
| |___________^
|
||||
|
|
||||
|
||||
ASYNC100.py:75:5: ASYNC100 A `with asyncio.timeout_at(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
ASYNC100 A `with asyncio.timeout_at(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
--> ASYNC100.py:75:5
|
||||
|
|
||||
74 | async def func():
|
||||
75 | / async with asyncio.timeout_at(when=0.2):
|
||||
76 | | ...
|
||||
| |___________^ ASYNC100
|
||||
| |___________^
|
||||
|
|
||||
|
||||
ASYNC100.py:85:5: ASYNC100 A `with asyncio.timeout(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
ASYNC100 A `with asyncio.timeout(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
--> ASYNC100.py:85:5
|
||||
|
|
||||
84 | async def func():
|
||||
85 | / async with asyncio.timeout(delay=0.2), asyncio.TaskGroup(), asyncio.timeout(delay=0.2):
|
||||
86 | | ...
|
||||
| |___________^ ASYNC100
|
||||
| |___________^
|
||||
|
|
||||
|
||||
ASYNC100.py:95:5: ASYNC100 A `with asyncio.timeout(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
ASYNC100 A `with asyncio.timeout(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
|
||||
--> ASYNC100.py:95:5
|
||||
|
|
||||
94 | async def func():
|
||||
95 | / async with asyncio.timeout(delay=0.2), asyncio.timeout(delay=0.2):
|
||||
96 | | ...
|
||||
| |___________^ ASYNC100
|
||||
| |___________^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
---
|
||||
ASYNC105.py:30:5: ASYNC105 [*] Call to `trio.aclose_forcefully` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.aclose_forcefully` is not immediately awaited
|
||||
--> ASYNC105.py:30:5
|
||||
|
|
||||
29 | # ASYNC105
|
||||
30 | trio.aclose_forcefully(foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
31 | trio.open_file(foo)
|
||||
32 | trio.open_ssl_over_tcp_listeners(foo, foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
27 27 | await trio.lowlevel.wait_writable(foo)
|
||||
|
|
@ -21,16 +22,17 @@ ASYNC105.py:30:5: ASYNC105 [*] Call to `trio.aclose_forcefully` is not immediate
|
|||
32 32 | trio.open_ssl_over_tcp_listeners(foo, foo)
|
||||
33 33 | trio.open_ssl_over_tcp_stream(foo, foo)
|
||||
|
||||
ASYNC105.py:31:5: ASYNC105 [*] Call to `trio.open_file` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.open_file` is not immediately awaited
|
||||
--> ASYNC105.py:31:5
|
||||
|
|
||||
29 | # ASYNC105
|
||||
30 | trio.aclose_forcefully(foo)
|
||||
31 | trio.open_file(foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
32 | trio.open_ssl_over_tcp_listeners(foo, foo)
|
||||
33 | trio.open_ssl_over_tcp_stream(foo, foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
28 28 |
|
||||
|
|
@ -42,16 +44,17 @@ ASYNC105.py:31:5: ASYNC105 [*] Call to `trio.open_file` is not immediately await
|
|||
33 33 | trio.open_ssl_over_tcp_stream(foo, foo)
|
||||
34 34 | trio.open_tcp_listeners(foo)
|
||||
|
||||
ASYNC105.py:32:5: ASYNC105 [*] Call to `trio.open_ssl_over_tcp_listeners` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.open_ssl_over_tcp_listeners` is not immediately awaited
|
||||
--> ASYNC105.py:32:5
|
||||
|
|
||||
30 | trio.aclose_forcefully(foo)
|
||||
31 | trio.open_file(foo)
|
||||
32 | trio.open_ssl_over_tcp_listeners(foo, foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
33 | trio.open_ssl_over_tcp_stream(foo, foo)
|
||||
34 | trio.open_tcp_listeners(foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
29 29 | # ASYNC105
|
||||
|
|
@ -63,16 +66,17 @@ ASYNC105.py:32:5: ASYNC105 [*] Call to `trio.open_ssl_over_tcp_listeners` is not
|
|||
34 34 | trio.open_tcp_listeners(foo)
|
||||
35 35 | trio.open_tcp_stream(foo, foo)
|
||||
|
||||
ASYNC105.py:33:5: ASYNC105 [*] Call to `trio.open_ssl_over_tcp_stream` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.open_ssl_over_tcp_stream` is not immediately awaited
|
||||
--> ASYNC105.py:33:5
|
||||
|
|
||||
31 | trio.open_file(foo)
|
||||
32 | trio.open_ssl_over_tcp_listeners(foo, foo)
|
||||
33 | trio.open_ssl_over_tcp_stream(foo, foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
34 | trio.open_tcp_listeners(foo)
|
||||
35 | trio.open_tcp_stream(foo, foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
30 30 | trio.aclose_forcefully(foo)
|
||||
|
|
@ -84,16 +88,17 @@ ASYNC105.py:33:5: ASYNC105 [*] Call to `trio.open_ssl_over_tcp_stream` is not im
|
|||
35 35 | trio.open_tcp_stream(foo, foo)
|
||||
36 36 | trio.open_unix_socket(foo)
|
||||
|
||||
ASYNC105.py:34:5: ASYNC105 [*] Call to `trio.open_tcp_listeners` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.open_tcp_listeners` is not immediately awaited
|
||||
--> ASYNC105.py:34:5
|
||||
|
|
||||
32 | trio.open_ssl_over_tcp_listeners(foo, foo)
|
||||
33 | trio.open_ssl_over_tcp_stream(foo, foo)
|
||||
34 | trio.open_tcp_listeners(foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
35 | trio.open_tcp_stream(foo, foo)
|
||||
36 | trio.open_unix_socket(foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
31 31 | trio.open_file(foo)
|
||||
|
|
@ -105,16 +110,17 @@ ASYNC105.py:34:5: ASYNC105 [*] Call to `trio.open_tcp_listeners` is not immediat
|
|||
36 36 | trio.open_unix_socket(foo)
|
||||
37 37 | trio.run_process(foo)
|
||||
|
||||
ASYNC105.py:35:5: ASYNC105 [*] Call to `trio.open_tcp_stream` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.open_tcp_stream` is not immediately awaited
|
||||
--> ASYNC105.py:35:5
|
||||
|
|
||||
33 | trio.open_ssl_over_tcp_stream(foo, foo)
|
||||
34 | trio.open_tcp_listeners(foo)
|
||||
35 | trio.open_tcp_stream(foo, foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
36 | trio.open_unix_socket(foo)
|
||||
37 | trio.run_process(foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
32 32 | trio.open_ssl_over_tcp_listeners(foo, foo)
|
||||
|
|
@ -126,16 +132,17 @@ ASYNC105.py:35:5: ASYNC105 [*] Call to `trio.open_tcp_stream` is not immediately
|
|||
37 37 | trio.run_process(foo)
|
||||
38 38 | trio.serve_listeners(foo, foo)
|
||||
|
||||
ASYNC105.py:36:5: ASYNC105 [*] Call to `trio.open_unix_socket` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.open_unix_socket` is not immediately awaited
|
||||
--> ASYNC105.py:36:5
|
||||
|
|
||||
34 | trio.open_tcp_listeners(foo)
|
||||
35 | trio.open_tcp_stream(foo, foo)
|
||||
36 | trio.open_unix_socket(foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
37 | trio.run_process(foo)
|
||||
38 | trio.serve_listeners(foo, foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
33 33 | trio.open_ssl_over_tcp_stream(foo, foo)
|
||||
|
|
@ -147,16 +154,17 @@ ASYNC105.py:36:5: ASYNC105 [*] Call to `trio.open_unix_socket` is not immediatel
|
|||
38 38 | trio.serve_listeners(foo, foo)
|
||||
39 39 | trio.serve_ssl_over_tcp(foo, foo, foo)
|
||||
|
||||
ASYNC105.py:37:5: ASYNC105 [*] Call to `trio.run_process` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.run_process` is not immediately awaited
|
||||
--> ASYNC105.py:37:5
|
||||
|
|
||||
35 | trio.open_tcp_stream(foo, foo)
|
||||
36 | trio.open_unix_socket(foo)
|
||||
37 | trio.run_process(foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
38 | trio.serve_listeners(foo, foo)
|
||||
39 | trio.serve_ssl_over_tcp(foo, foo, foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
34 34 | trio.open_tcp_listeners(foo)
|
||||
|
|
@ -168,16 +176,17 @@ ASYNC105.py:37:5: ASYNC105 [*] Call to `trio.run_process` is not immediately awa
|
|||
39 39 | trio.serve_ssl_over_tcp(foo, foo, foo)
|
||||
40 40 | trio.serve_tcp(foo, foo)
|
||||
|
||||
ASYNC105.py:38:5: ASYNC105 [*] Call to `trio.serve_listeners` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.serve_listeners` is not immediately awaited
|
||||
--> ASYNC105.py:38:5
|
||||
|
|
||||
36 | trio.open_unix_socket(foo)
|
||||
37 | trio.run_process(foo)
|
||||
38 | trio.serve_listeners(foo, foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
39 | trio.serve_ssl_over_tcp(foo, foo, foo)
|
||||
40 | trio.serve_tcp(foo, foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
35 35 | trio.open_tcp_stream(foo, foo)
|
||||
|
|
@ -189,16 +198,17 @@ ASYNC105.py:38:5: ASYNC105 [*] Call to `trio.serve_listeners` is not immediately
|
|||
40 40 | trio.serve_tcp(foo, foo)
|
||||
41 41 | trio.sleep(foo)
|
||||
|
||||
ASYNC105.py:39:5: ASYNC105 [*] Call to `trio.serve_ssl_over_tcp` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.serve_ssl_over_tcp` is not immediately awaited
|
||||
--> ASYNC105.py:39:5
|
||||
|
|
||||
37 | trio.run_process(foo)
|
||||
38 | trio.serve_listeners(foo, foo)
|
||||
39 | trio.serve_ssl_over_tcp(foo, foo, foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
40 | trio.serve_tcp(foo, foo)
|
||||
41 | trio.sleep(foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
36 36 | trio.open_unix_socket(foo)
|
||||
|
|
@ -210,16 +220,17 @@ ASYNC105.py:39:5: ASYNC105 [*] Call to `trio.serve_ssl_over_tcp` is not immediat
|
|||
41 41 | trio.sleep(foo)
|
||||
42 42 | trio.sleep_forever()
|
||||
|
||||
ASYNC105.py:40:5: ASYNC105 [*] Call to `trio.serve_tcp` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.serve_tcp` is not immediately awaited
|
||||
--> ASYNC105.py:40:5
|
||||
|
|
||||
38 | trio.serve_listeners(foo, foo)
|
||||
39 | trio.serve_ssl_over_tcp(foo, foo, foo)
|
||||
40 | trio.serve_tcp(foo, foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
41 | trio.sleep(foo)
|
||||
42 | trio.sleep_forever()
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
37 37 | trio.run_process(foo)
|
||||
|
|
@ -231,16 +242,17 @@ ASYNC105.py:40:5: ASYNC105 [*] Call to `trio.serve_tcp` is not immediately await
|
|||
42 42 | trio.sleep_forever()
|
||||
43 43 | trio.sleep_until(foo)
|
||||
|
||||
ASYNC105.py:41:5: ASYNC105 [*] Call to `trio.sleep` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.sleep` is not immediately awaited
|
||||
--> ASYNC105.py:41:5
|
||||
|
|
||||
39 | trio.serve_ssl_over_tcp(foo, foo, foo)
|
||||
40 | trio.serve_tcp(foo, foo)
|
||||
41 | trio.sleep(foo)
|
||||
| ^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^
|
||||
42 | trio.sleep_forever()
|
||||
43 | trio.sleep_until(foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
38 38 | trio.serve_listeners(foo, foo)
|
||||
|
|
@ -252,16 +264,17 @@ ASYNC105.py:41:5: ASYNC105 [*] Call to `trio.sleep` is not immediately awaited
|
|||
43 43 | trio.sleep_until(foo)
|
||||
44 44 | trio.lowlevel.cancel_shielded_checkpoint()
|
||||
|
||||
ASYNC105.py:42:5: ASYNC105 [*] Call to `trio.sleep_forever` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.sleep_forever` is not immediately awaited
|
||||
--> ASYNC105.py:42:5
|
||||
|
|
||||
40 | trio.serve_tcp(foo, foo)
|
||||
41 | trio.sleep(foo)
|
||||
42 | trio.sleep_forever()
|
||||
| ^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
43 | trio.sleep_until(foo)
|
||||
44 | trio.lowlevel.cancel_shielded_checkpoint()
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
39 39 | trio.serve_ssl_over_tcp(foo, foo, foo)
|
||||
|
|
@ -273,16 +286,17 @@ ASYNC105.py:42:5: ASYNC105 [*] Call to `trio.sleep_forever` is not immediately a
|
|||
44 44 | trio.lowlevel.cancel_shielded_checkpoint()
|
||||
45 45 | trio.lowlevel.checkpoint()
|
||||
|
||||
ASYNC105.py:44:5: ASYNC105 [*] Call to `trio.lowlevel.cancel_shielded_checkpoint` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.lowlevel.cancel_shielded_checkpoint` is not immediately awaited
|
||||
--> ASYNC105.py:44:5
|
||||
|
|
||||
42 | trio.sleep_forever()
|
||||
43 | trio.sleep_until(foo)
|
||||
44 | trio.lowlevel.cancel_shielded_checkpoint()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
45 | trio.lowlevel.checkpoint()
|
||||
46 | trio.lowlevel.checkpoint_if_cancelled()
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
41 41 | trio.sleep(foo)
|
||||
|
|
@ -294,16 +308,17 @@ ASYNC105.py:44:5: ASYNC105 [*] Call to `trio.lowlevel.cancel_shielded_checkpoint
|
|||
46 46 | trio.lowlevel.checkpoint_if_cancelled()
|
||||
47 47 | trio.lowlevel.open_process()
|
||||
|
||||
ASYNC105.py:45:5: ASYNC105 [*] Call to `trio.lowlevel.checkpoint` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.lowlevel.checkpoint` is not immediately awaited
|
||||
--> ASYNC105.py:45:5
|
||||
|
|
||||
43 | trio.sleep_until(foo)
|
||||
44 | trio.lowlevel.cancel_shielded_checkpoint()
|
||||
45 | trio.lowlevel.checkpoint()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
46 | trio.lowlevel.checkpoint_if_cancelled()
|
||||
47 | trio.lowlevel.open_process()
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
42 42 | trio.sleep_forever()
|
||||
|
|
@ -315,16 +330,17 @@ ASYNC105.py:45:5: ASYNC105 [*] Call to `trio.lowlevel.checkpoint` is not immedia
|
|||
47 47 | trio.lowlevel.open_process()
|
||||
48 48 | trio.lowlevel.permanently_detach_coroutine_object(foo)
|
||||
|
||||
ASYNC105.py:46:5: ASYNC105 [*] Call to `trio.lowlevel.checkpoint_if_cancelled` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.lowlevel.checkpoint_if_cancelled` is not immediately awaited
|
||||
--> ASYNC105.py:46:5
|
||||
|
|
||||
44 | trio.lowlevel.cancel_shielded_checkpoint()
|
||||
45 | trio.lowlevel.checkpoint()
|
||||
46 | trio.lowlevel.checkpoint_if_cancelled()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
47 | trio.lowlevel.open_process()
|
||||
48 | trio.lowlevel.permanently_detach_coroutine_object(foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
43 43 | trio.sleep_until(foo)
|
||||
|
|
@ -336,16 +352,17 @@ ASYNC105.py:46:5: ASYNC105 [*] Call to `trio.lowlevel.checkpoint_if_cancelled` i
|
|||
48 48 | trio.lowlevel.permanently_detach_coroutine_object(foo)
|
||||
49 49 | trio.lowlevel.reattach_detached_coroutine_object(foo, foo)
|
||||
|
||||
ASYNC105.py:47:5: ASYNC105 [*] Call to `trio.lowlevel.open_process` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.lowlevel.open_process` is not immediately awaited
|
||||
--> ASYNC105.py:47:5
|
||||
|
|
||||
45 | trio.lowlevel.checkpoint()
|
||||
46 | trio.lowlevel.checkpoint_if_cancelled()
|
||||
47 | trio.lowlevel.open_process()
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
48 | trio.lowlevel.permanently_detach_coroutine_object(foo)
|
||||
49 | trio.lowlevel.reattach_detached_coroutine_object(foo, foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
44 44 | trio.lowlevel.cancel_shielded_checkpoint()
|
||||
|
|
@ -357,16 +374,17 @@ ASYNC105.py:47:5: ASYNC105 [*] Call to `trio.lowlevel.open_process` is not immed
|
|||
49 49 | trio.lowlevel.reattach_detached_coroutine_object(foo, foo)
|
||||
50 50 | trio.lowlevel.temporarily_detach_coroutine_object(foo)
|
||||
|
||||
ASYNC105.py:48:5: ASYNC105 [*] Call to `trio.lowlevel.permanently_detach_coroutine_object` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.lowlevel.permanently_detach_coroutine_object` is not immediately awaited
|
||||
--> ASYNC105.py:48:5
|
||||
|
|
||||
46 | trio.lowlevel.checkpoint_if_cancelled()
|
||||
47 | trio.lowlevel.open_process()
|
||||
48 | trio.lowlevel.permanently_detach_coroutine_object(foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
49 | trio.lowlevel.reattach_detached_coroutine_object(foo, foo)
|
||||
50 | trio.lowlevel.temporarily_detach_coroutine_object(foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
45 45 | trio.lowlevel.checkpoint()
|
||||
|
|
@ -378,16 +396,17 @@ ASYNC105.py:48:5: ASYNC105 [*] Call to `trio.lowlevel.permanently_detach_corouti
|
|||
50 50 | trio.lowlevel.temporarily_detach_coroutine_object(foo)
|
||||
51 51 | trio.lowlevel.wait_readable(foo)
|
||||
|
||||
ASYNC105.py:49:5: ASYNC105 [*] Call to `trio.lowlevel.reattach_detached_coroutine_object` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.lowlevel.reattach_detached_coroutine_object` is not immediately awaited
|
||||
--> ASYNC105.py:49:5
|
||||
|
|
||||
47 | trio.lowlevel.open_process()
|
||||
48 | trio.lowlevel.permanently_detach_coroutine_object(foo)
|
||||
49 | trio.lowlevel.reattach_detached_coroutine_object(foo, foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
50 | trio.lowlevel.temporarily_detach_coroutine_object(foo)
|
||||
51 | trio.lowlevel.wait_readable(foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
46 46 | trio.lowlevel.checkpoint_if_cancelled()
|
||||
|
|
@ -399,16 +418,17 @@ ASYNC105.py:49:5: ASYNC105 [*] Call to `trio.lowlevel.reattach_detached_coroutin
|
|||
51 51 | trio.lowlevel.wait_readable(foo)
|
||||
52 52 | trio.lowlevel.wait_task_rescheduled(foo)
|
||||
|
||||
ASYNC105.py:50:5: ASYNC105 [*] Call to `trio.lowlevel.temporarily_detach_coroutine_object` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.lowlevel.temporarily_detach_coroutine_object` is not immediately awaited
|
||||
--> ASYNC105.py:50:5
|
||||
|
|
||||
48 | trio.lowlevel.permanently_detach_coroutine_object(foo)
|
||||
49 | trio.lowlevel.reattach_detached_coroutine_object(foo, foo)
|
||||
50 | trio.lowlevel.temporarily_detach_coroutine_object(foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
51 | trio.lowlevel.wait_readable(foo)
|
||||
52 | trio.lowlevel.wait_task_rescheduled(foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
47 47 | trio.lowlevel.open_process()
|
||||
|
|
@ -420,16 +440,17 @@ ASYNC105.py:50:5: ASYNC105 [*] Call to `trio.lowlevel.temporarily_detach_corouti
|
|||
52 52 | trio.lowlevel.wait_task_rescheduled(foo)
|
||||
53 53 | trio.lowlevel.wait_writable(foo)
|
||||
|
||||
ASYNC105.py:51:5: ASYNC105 [*] Call to `trio.lowlevel.wait_readable` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.lowlevel.wait_readable` is not immediately awaited
|
||||
--> ASYNC105.py:51:5
|
||||
|
|
||||
49 | trio.lowlevel.reattach_detached_coroutine_object(foo, foo)
|
||||
50 | trio.lowlevel.temporarily_detach_coroutine_object(foo)
|
||||
51 | trio.lowlevel.wait_readable(foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
52 | trio.lowlevel.wait_task_rescheduled(foo)
|
||||
53 | trio.lowlevel.wait_writable(foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
48 48 | trio.lowlevel.permanently_detach_coroutine_object(foo)
|
||||
|
|
@ -441,15 +462,16 @@ ASYNC105.py:51:5: ASYNC105 [*] Call to `trio.lowlevel.wait_readable` is not imme
|
|||
53 53 | trio.lowlevel.wait_writable(foo)
|
||||
54 54 |
|
||||
|
||||
ASYNC105.py:52:5: ASYNC105 [*] Call to `trio.lowlevel.wait_task_rescheduled` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.lowlevel.wait_task_rescheduled` is not immediately awaited
|
||||
--> ASYNC105.py:52:5
|
||||
|
|
||||
50 | trio.lowlevel.temporarily_detach_coroutine_object(foo)
|
||||
51 | trio.lowlevel.wait_readable(foo)
|
||||
52 | trio.lowlevel.wait_task_rescheduled(foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
53 | trio.lowlevel.wait_writable(foo)
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
49 49 | trio.lowlevel.reattach_detached_coroutine_object(foo, foo)
|
||||
|
|
@ -461,16 +483,17 @@ ASYNC105.py:52:5: ASYNC105 [*] Call to `trio.lowlevel.wait_task_rescheduled` is
|
|||
54 54 |
|
||||
55 55 | async with await trio.open_file(foo): # Ok
|
||||
|
||||
ASYNC105.py:53:5: ASYNC105 [*] Call to `trio.lowlevel.wait_writable` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.lowlevel.wait_writable` is not immediately awaited
|
||||
--> ASYNC105.py:53:5
|
||||
|
|
||||
51 | trio.lowlevel.wait_readable(foo)
|
||||
52 | trio.lowlevel.wait_task_rescheduled(foo)
|
||||
53 | trio.lowlevel.wait_writable(foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
54 |
|
||||
55 | async with await trio.open_file(foo): # Ok
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
50 50 | trio.lowlevel.temporarily_detach_coroutine_object(foo)
|
||||
|
|
@ -482,15 +505,16 @@ ASYNC105.py:53:5: ASYNC105 [*] Call to `trio.lowlevel.wait_writable` is not imme
|
|||
55 55 | async with await trio.open_file(foo): # Ok
|
||||
56 56 | pass
|
||||
|
||||
ASYNC105.py:58:16: ASYNC105 [*] Call to `trio.open_file` is not immediately awaited
|
||||
ASYNC105 [*] Call to `trio.open_file` is not immediately awaited
|
||||
--> ASYNC105.py:58:16
|
||||
|
|
||||
56 | pass
|
||||
57 |
|
||||
58 | async with trio.open_file(foo): # ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
59 | pass
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
||||
ℹ Unsafe fix
|
||||
55 55 | async with await trio.open_file(foo): # Ok
|
||||
|
|
@ -502,11 +526,12 @@ ASYNC105.py:58:16: ASYNC105 [*] Call to `trio.open_file` is not immediately awai
|
|||
60 60 |
|
||||
61 61 |
|
||||
|
||||
ASYNC105.py:64:5: ASYNC105 Call to `trio.open_file` is not immediately awaited
|
||||
ASYNC105 Call to `trio.open_file` is not immediately awaited
|
||||
--> ASYNC105.py:64:5
|
||||
|
|
||||
62 | def func() -> None:
|
||||
63 | # ASYNC105 (without fix)
|
||||
64 | trio.open_file(foo)
|
||||
| ^^^^^^^^^^^^^^^^^^^ ASYNC105
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Add `await`
|
||||
help: Add `await`
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
ASYNC109_0.py:8:16: ASYNC109 Async function definition with a `timeout` parameter
|
||||
ASYNC109 Async function definition with a `timeout` parameter
|
||||
--> ASYNC109_0.py:8:16
|
||||
|
|
||||
8 | async def func(timeout):
|
||||
| ^^^^^^^ ASYNC109
|
||||
| ^^^^^^^
|
||||
9 | ...
|
||||
|
|
||||
= help: Use `trio.fail_after` instead
|
||||
help: Use `trio.fail_after` instead
|
||||
|
||||
ASYNC109_0.py:12:16: ASYNC109 Async function definition with a `timeout` parameter
|
||||
ASYNC109 Async function definition with a `timeout` parameter
|
||||
--> ASYNC109_0.py:12:16
|
||||
|
|
||||
12 | async def func(timeout=10):
|
||||
| ^^^^^^^^^^ ASYNC109
|
||||
| ^^^^^^^^^^
|
||||
13 | ...
|
||||
|
|
||||
= help: Use `trio.fail_after` instead
|
||||
help: Use `trio.fail_after` instead
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
ASYNC109_0.py:8:16: ASYNC109 Async function definition with a `timeout` parameter
|
||||
ASYNC109 Async function definition with a `timeout` parameter
|
||||
--> ASYNC109_0.py:8:16
|
||||
|
|
||||
8 | async def func(timeout):
|
||||
| ^^^^^^^ ASYNC109
|
||||
| ^^^^^^^
|
||||
9 | ...
|
||||
|
|
||||
= help: Use `trio.fail_after` instead
|
||||
help: Use `trio.fail_after` instead
|
||||
|
||||
ASYNC109_0.py:12:16: ASYNC109 Async function definition with a `timeout` parameter
|
||||
ASYNC109 Async function definition with a `timeout` parameter
|
||||
--> ASYNC109_0.py:12:16
|
||||
|
|
||||
12 | async def func(timeout=10):
|
||||
| ^^^^^^^^^^ ASYNC109
|
||||
| ^^^^^^^^^^
|
||||
13 | ...
|
||||
|
|
||||
= help: Use `trio.fail_after` instead
|
||||
help: Use `trio.fail_after` instead
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
ASYNC109_1.py:5:16: ASYNC109 Async function definition with a `timeout` parameter
|
||||
ASYNC109 Async function definition with a `timeout` parameter
|
||||
--> ASYNC109_1.py:5:16
|
||||
|
|
||||
5 | async def func(timeout):
|
||||
| ^^^^^^^ ASYNC109
|
||||
| ^^^^^^^
|
||||
6 | ...
|
||||
|
|
||||
= help: Use `asyncio.timeout` instead
|
||||
help: Use `asyncio.timeout` instead
|
||||
|
||||
ASYNC109_1.py:9:16: ASYNC109 Async function definition with a `timeout` parameter
|
||||
ASYNC109 Async function definition with a `timeout` parameter
|
||||
--> ASYNC109_1.py:9:16
|
||||
|
|
||||
9 | async def func(timeout=10):
|
||||
| ^^^^^^^^^^ ASYNC109
|
||||
| ^^^^^^^^^^
|
||||
10 | ...
|
||||
|
|
||||
= help: Use `asyncio.timeout` instead
|
||||
help: Use `asyncio.timeout` instead
|
||||
|
|
|
|||
|
|
@ -1,42 +1,47 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
---
|
||||
ASYNC110.py:7:5: ASYNC110 Use `trio.Event` instead of awaiting `trio.sleep` in a `while` loop
|
||||
ASYNC110 Use `trio.Event` instead of awaiting `trio.sleep` in a `while` loop
|
||||
--> ASYNC110.py:7:5
|
||||
|
|
||||
6 | async def func():
|
||||
7 | / while True:
|
||||
8 | | await trio.sleep(10)
|
||||
| |____________________________^ ASYNC110
|
||||
| |____________________________^
|
||||
|
|
||||
|
||||
ASYNC110.py:12:5: ASYNC110 Use `trio.Event` instead of awaiting `trio.sleep` in a `while` loop
|
||||
ASYNC110 Use `trio.Event` instead of awaiting `trio.sleep` in a `while` loop
|
||||
--> ASYNC110.py:12:5
|
||||
|
|
||||
11 | async def func():
|
||||
12 | / while True:
|
||||
13 | | await trio.sleep_until(10)
|
||||
| |__________________________________^ ASYNC110
|
||||
| |__________________________________^
|
||||
|
|
||||
|
||||
ASYNC110.py:22:5: ASYNC110 Use `anyio.Event` instead of awaiting `anyio.sleep` in a `while` loop
|
||||
ASYNC110 Use `anyio.Event` instead of awaiting `anyio.sleep` in a `while` loop
|
||||
--> ASYNC110.py:22:5
|
||||
|
|
||||
21 | async def func():
|
||||
22 | / while True:
|
||||
23 | | await anyio.sleep(10)
|
||||
| |_____________________________^ ASYNC110
|
||||
| |_____________________________^
|
||||
|
|
||||
|
||||
ASYNC110.py:27:5: ASYNC110 Use `anyio.Event` instead of awaiting `anyio.sleep` in a `while` loop
|
||||
ASYNC110 Use `anyio.Event` instead of awaiting `anyio.sleep` in a `while` loop
|
||||
--> ASYNC110.py:27:5
|
||||
|
|
||||
26 | async def func():
|
||||
27 | / while True:
|
||||
28 | | await anyio.sleep_until(10)
|
||||
| |___________________________________^ ASYNC110
|
||||
| |___________________________________^
|
||||
|
|
||||
|
||||
ASYNC110.py:37:5: ASYNC110 Use `asyncio.Event` instead of awaiting `asyncio.sleep` in a `while` loop
|
||||
ASYNC110 Use `asyncio.Event` instead of awaiting `asyncio.sleep` in a `while` loop
|
||||
--> ASYNC110.py:37:5
|
||||
|
|
||||
36 | async def func():
|
||||
37 | / while True:
|
||||
38 | | await asyncio.sleep(10)
|
||||
| |_______________________________^ ASYNC110
|
||||
| |_______________________________^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
---
|
||||
ASYNC115.py:5:11: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
--> ASYNC115.py:5:11
|
||||
|
|
||||
3 | from trio import sleep
|
||||
4 |
|
||||
5 | await trio.sleep(0) # ASYNC115
|
||||
| ^^^^^^^^^^^^^ ASYNC115
|
||||
| ^^^^^^^^^^^^^
|
||||
6 | await trio.sleep(1) # OK
|
||||
7 | await trio.sleep(0, 1) # OK
|
||||
|
|
||||
= help: Replace with `trio.lowlevel.checkpoint()`
|
||||
help: Replace with `trio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Safe fix
|
||||
2 2 | import trio
|
||||
|
|
@ -22,16 +23,17 @@ ASYNC115.py:5:11: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio
|
|||
7 7 | await trio.sleep(0, 1) # OK
|
||||
8 8 | await trio.sleep(...) # OK
|
||||
|
||||
ASYNC115.py:11:5: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
--> ASYNC115.py:11:5
|
||||
|
|
||||
9 | await trio.sleep() # OK
|
||||
10 |
|
||||
11 | trio.sleep(0) # ASYNC115
|
||||
| ^^^^^^^^^^^^^ ASYNC115
|
||||
| ^^^^^^^^^^^^^
|
||||
12 | foo = 0
|
||||
13 | trio.sleep(foo) # OK
|
||||
|
|
||||
= help: Replace with `trio.lowlevel.checkpoint()`
|
||||
help: Replace with `trio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Safe fix
|
||||
8 8 | await trio.sleep(...) # OK
|
||||
|
|
@ -43,16 +45,17 @@ ASYNC115.py:11:5: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio
|
|||
13 13 | trio.sleep(foo) # OK
|
||||
14 14 | trio.sleep(1) # OK
|
||||
|
||||
ASYNC115.py:17:5: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
--> ASYNC115.py:17:5
|
||||
|
|
||||
15 | time.sleep(0) # OK
|
||||
16 |
|
||||
17 | sleep(0) # ASYNC115
|
||||
| ^^^^^^^^ ASYNC115
|
||||
| ^^^^^^^^
|
||||
18 |
|
||||
19 | bar = "bar"
|
||||
|
|
||||
= help: Replace with `trio.lowlevel.checkpoint()`
|
||||
help: Replace with `trio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Safe fix
|
||||
14 14 | trio.sleep(1) # OK
|
||||
|
|
@ -64,14 +67,15 @@ ASYNC115.py:17:5: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio
|
|||
19 19 | bar = "bar"
|
||||
20 20 | trio.sleep(bar)
|
||||
|
||||
ASYNC115.py:48:14: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
--> ASYNC115.py:48:14
|
||||
|
|
||||
46 | import trio
|
||||
47 |
|
||||
48 | trio.run(trio.sleep(0)) # ASYNC115
|
||||
| ^^^^^^^^^^^^^ ASYNC115
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Replace with `trio.lowlevel.checkpoint()`
|
||||
help: Replace with `trio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Safe fix
|
||||
45 45 | def func():
|
||||
|
|
@ -83,13 +87,14 @@ ASYNC115.py:48:14: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `tri
|
|||
50 50 |
|
||||
51 51 | from trio import Event, sleep
|
||||
|
||||
ASYNC115.py:55:5: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
--> ASYNC115.py:55:5
|
||||
|
|
||||
54 | def func():
|
||||
55 | sleep(0) # ASYNC115
|
||||
| ^^^^^^^^ ASYNC115
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= help: Replace with `trio.lowlevel.checkpoint()`
|
||||
help: Replace with `trio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Safe fix
|
||||
48 48 | trio.run(trio.sleep(0)) # ASYNC115
|
||||
|
|
@ -106,13 +111,14 @@ ASYNC115.py:55:5: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio
|
|||
57 57 |
|
||||
58 58 | async def func():
|
||||
|
||||
ASYNC115.py:59:11: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
--> ASYNC115.py:59:11
|
||||
|
|
||||
58 | async def func():
|
||||
59 | await sleep(seconds=0) # ASYNC115
|
||||
| ^^^^^^^^^^^^^^^^ ASYNC115
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Replace with `trio.lowlevel.checkpoint()`
|
||||
help: Replace with `trio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Safe fix
|
||||
48 48 | trio.run(trio.sleep(0)) # ASYNC115
|
||||
|
|
@ -133,16 +139,17 @@ ASYNC115.py:59:11: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `tri
|
|||
61 61 |
|
||||
62 62 | def func():
|
||||
|
||||
ASYNC115.py:85:11: ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `anyio.sleep(0)`
|
||||
ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `anyio.sleep(0)`
|
||||
--> ASYNC115.py:85:11
|
||||
|
|
||||
83 | from anyio import sleep
|
||||
84 |
|
||||
85 | await anyio.sleep(0) # ASYNC115
|
||||
| ^^^^^^^^^^^^^^ ASYNC115
|
||||
| ^^^^^^^^^^^^^^
|
||||
86 | await anyio.sleep(1) # OK
|
||||
87 | await anyio.sleep(0, 1) # OK
|
||||
|
|
||||
= help: Replace with `anyio.lowlevel.checkpoint()`
|
||||
help: Replace with `anyio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Safe fix
|
||||
82 82 | import anyio
|
||||
|
|
@ -154,16 +161,17 @@ ASYNC115.py:85:11: ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `an
|
|||
87 87 | await anyio.sleep(0, 1) # OK
|
||||
88 88 | await anyio.sleep(...) # OK
|
||||
|
||||
ASYNC115.py:91:5: ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `anyio.sleep(0)`
|
||||
ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `anyio.sleep(0)`
|
||||
--> ASYNC115.py:91:5
|
||||
|
|
||||
89 | await anyio.sleep() # OK
|
||||
90 |
|
||||
91 | anyio.sleep(0) # ASYNC115
|
||||
| ^^^^^^^^^^^^^^ ASYNC115
|
||||
| ^^^^^^^^^^^^^^
|
||||
92 | foo = 0
|
||||
93 | anyio.sleep(foo) # OK
|
||||
|
|
||||
= help: Replace with `anyio.lowlevel.checkpoint()`
|
||||
help: Replace with `anyio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Safe fix
|
||||
88 88 | await anyio.sleep(...) # OK
|
||||
|
|
@ -175,16 +183,17 @@ ASYNC115.py:91:5: ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `any
|
|||
93 93 | anyio.sleep(foo) # OK
|
||||
94 94 | anyio.sleep(1) # OK
|
||||
|
||||
ASYNC115.py:97:5: ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `anyio.sleep(0)`
|
||||
ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `anyio.sleep(0)`
|
||||
--> ASYNC115.py:97:5
|
||||
|
|
||||
95 | time.sleep(0) # OK
|
||||
96 |
|
||||
97 | sleep(0) # ASYNC115
|
||||
| ^^^^^^^^ ASYNC115
|
||||
| ^^^^^^^^
|
||||
98 |
|
||||
99 | bar = "bar"
|
||||
|
|
||||
= help: Replace with `anyio.lowlevel.checkpoint()`
|
||||
help: Replace with `anyio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Safe fix
|
||||
94 94 | anyio.sleep(1) # OK
|
||||
|
|
@ -196,14 +205,15 @@ ASYNC115.py:97:5: ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `any
|
|||
99 99 | bar = "bar"
|
||||
100 100 | anyio.sleep(bar)
|
||||
|
||||
ASYNC115.py:128:15: ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `anyio.sleep(0)`
|
||||
ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `anyio.sleep(0)`
|
||||
--> ASYNC115.py:128:15
|
||||
|
|
||||
126 | import anyio
|
||||
127 |
|
||||
128 | anyio.run(anyio.sleep(0)) # ASYNC115
|
||||
| ^^^^^^^^^^^^^^ ASYNC115
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Replace with `anyio.lowlevel.checkpoint()`
|
||||
help: Replace with `anyio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Safe fix
|
||||
125 125 | def func():
|
||||
|
|
@ -215,15 +225,16 @@ ASYNC115.py:128:15: ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `a
|
|||
130 130 |
|
||||
131 131 | def func():
|
||||
|
||||
ASYNC115.py:156:11: ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `anyio.sleep(0)`
|
||||
ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `anyio.sleep(0)`
|
||||
--> ASYNC115.py:156:11
|
||||
|
|
||||
154 | await anyio.sleep(seconds=1) # OK
|
||||
155 |
|
||||
156 | await anyio.sleep(delay=0) # ASYNC115
|
||||
| ^^^^^^^^^^^^^^^^^^^^ ASYNC115
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
157 | await anyio.sleep(seconds=0) # OK
|
||||
|
|
||||
= help: Replace with `anyio.lowlevel.checkpoint()`
|
||||
help: Replace with `anyio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Safe fix
|
||||
153 153 | await anyio.sleep(delay=1) # OK
|
||||
|
|
@ -235,15 +246,16 @@ ASYNC115.py:156:11: ASYNC115 [*] Use `anyio.lowlevel.checkpoint()` instead of `a
|
|||
158 158 |
|
||||
159 159 |
|
||||
|
||||
ASYNC115.py:166:11: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
--> ASYNC115.py:166:11
|
||||
|
|
||||
164 | await trio.sleep(delay=1) # OK
|
||||
165 |
|
||||
166 | await trio.sleep(seconds=0) # ASYNC115
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ASYNC115
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
167 | await trio.sleep(delay=0) # OK
|
||||
|
|
||||
= help: Replace with `trio.lowlevel.checkpoint()`
|
||||
help: Replace with `trio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Safe fix
|
||||
163 163 | await trio.sleep(seconds=1) # OK
|
||||
|
|
@ -255,17 +267,18 @@ ASYNC115.py:166:11: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `tr
|
|||
168 168 |
|
||||
169 169 | # https://github.com/astral-sh/ruff/issues/18740
|
||||
|
||||
ASYNC115.py:175:5: ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
ASYNC115 [*] Use `trio.lowlevel.checkpoint()` instead of `trio.sleep(0)`
|
||||
--> ASYNC115.py:175:5
|
||||
|
|
||||
174 | await (
|
||||
175 | / trio # comment
|
||||
176 | | .sleep( # comment
|
||||
177 | | 0 # comment
|
||||
178 | | )
|
||||
| |_____^ ASYNC115
|
||||
| |_____^
|
||||
179 | )
|
||||
|
|
||||
= help: Replace with `trio.lowlevel.checkpoint()`
|
||||
help: Replace with `trio.lowlevel.checkpoint()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
172 172 | import trio
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
---
|
||||
ASYNC116.py:11:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
--> ASYNC116.py:11:11
|
||||
|
|
||||
10 | # These examples are probably not meant to ever wake up:
|
||||
11 | await trio.sleep(100000) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
12 |
|
||||
13 | # 'inf literal' overflow trick
|
||||
|
|
||||
= help: Replace with `trio.sleep_forever()`
|
||||
help: Replace with `trio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
8 8 | import trio
|
||||
|
|
@ -21,15 +22,16 @@ ASYNC116.py:11:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usu
|
|||
13 13 | # 'inf literal' overflow trick
|
||||
14 14 | await trio.sleep(1e999) # error: 116, "async"
|
||||
|
||||
ASYNC116.py:14:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
--> ASYNC116.py:14:11
|
||||
|
|
||||
13 | # 'inf literal' overflow trick
|
||||
14 | await trio.sleep(1e999) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
15 |
|
||||
16 | await trio.sleep(86399)
|
||||
|
|
||||
= help: Replace with `trio.sleep_forever()`
|
||||
help: Replace with `trio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
11 11 | await trio.sleep(100000) # error: 116, "async"
|
||||
|
|
@ -41,15 +43,16 @@ ASYNC116.py:14:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usu
|
|||
16 16 | await trio.sleep(86399)
|
||||
17 17 | await trio.sleep(86400)
|
||||
|
||||
ASYNC116.py:18:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
--> ASYNC116.py:18:11
|
||||
|
|
||||
16 | await trio.sleep(86399)
|
||||
17 | await trio.sleep(86400)
|
||||
18 | await trio.sleep(86400.01) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
19 | await trio.sleep(86401) # error: 116, "async"
|
||||
|
|
||||
= help: Replace with `trio.sleep_forever()`
|
||||
help: Replace with `trio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
15 15 |
|
||||
|
|
@ -61,16 +64,17 @@ ASYNC116.py:18:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usu
|
|||
20 20 |
|
||||
21 21 | await trio.sleep(-1) # will raise a runtime error
|
||||
|
||||
ASYNC116.py:19:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
--> ASYNC116.py:19:11
|
||||
|
|
||||
17 | await trio.sleep(86400)
|
||||
18 | await trio.sleep(86400.01) # error: 116, "async"
|
||||
19 | await trio.sleep(86401) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
20 |
|
||||
21 | await trio.sleep(-1) # will raise a runtime error
|
||||
|
|
||||
= help: Replace with `trio.sleep_forever()`
|
||||
help: Replace with `trio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
16 16 | await trio.sleep(86399)
|
||||
|
|
@ -82,15 +86,16 @@ ASYNC116.py:19:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usu
|
|||
21 21 | await trio.sleep(-1) # will raise a runtime error
|
||||
22 22 | await trio.sleep(0) # handled by different check
|
||||
|
||||
ASYNC116.py:48:5: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
--> ASYNC116.py:48:5
|
||||
|
|
||||
47 | # does not require the call to be awaited, nor in an async fun
|
||||
48 | trio.sleep(86401) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
49 | # also checks that we don't break visit_Call
|
||||
50 | trio.run(trio.sleep(86401)) # error: 116, "async"
|
||||
|
|
||||
= help: Replace with `trio.sleep_forever()`
|
||||
help: Replace with `trio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
45 45 | import trio
|
||||
|
|
@ -102,14 +107,15 @@ ASYNC116.py:48:5: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usua
|
|||
50 50 | trio.run(trio.sleep(86401)) # error: 116, "async"
|
||||
51 51 |
|
||||
|
||||
ASYNC116.py:50:14: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
--> ASYNC116.py:50:14
|
||||
|
|
||||
48 | trio.sleep(86401) # error: 116, "async"
|
||||
49 | # also checks that we don't break visit_Call
|
||||
50 | trio.run(trio.sleep(86401)) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Replace with `trio.sleep_forever()`
|
||||
help: Replace with `trio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
47 47 | # does not require the call to be awaited, nor in an async fun
|
||||
|
|
@ -121,13 +127,14 @@ ASYNC116.py:50:14: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usu
|
|||
52 52 |
|
||||
53 53 | async def import_from_trio():
|
||||
|
||||
ASYNC116.py:57:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
--> ASYNC116.py:57:11
|
||||
|
|
||||
56 | # catch from import
|
||||
57 | await sleep(86401) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: Replace with `trio.sleep_forever()`
|
||||
help: Replace with `trio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 | # ASYNCIO_NO_ERROR - no asyncio.sleep_forever, so check intentionally doesn't trigger.
|
||||
|
|
@ -147,15 +154,16 @@ ASYNC116.py:57:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usu
|
|||
59 60 |
|
||||
60 61 | async def import_anyio():
|
||||
|
||||
ASYNC116.py:64:11: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
--> ASYNC116.py:64:11
|
||||
|
|
||||
63 | # These examples are probably not meant to ever wake up:
|
||||
64 | await anyio.sleep(100000) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
65 |
|
||||
66 | # 'inf literal' overflow trick
|
||||
|
|
||||
= help: Replace with `anyio.sleep_forever()`
|
||||
help: Replace with `anyio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
61 61 | import anyio
|
||||
|
|
@ -167,15 +175,16 @@ ASYNC116.py:64:11: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should us
|
|||
66 66 | # 'inf literal' overflow trick
|
||||
67 67 | await anyio.sleep(1e999) # error: 116, "async"
|
||||
|
||||
ASYNC116.py:67:11: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
--> ASYNC116.py:67:11
|
||||
|
|
||||
66 | # 'inf literal' overflow trick
|
||||
67 | await anyio.sleep(1e999) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
68 |
|
||||
69 | await anyio.sleep(86399)
|
||||
|
|
||||
= help: Replace with `anyio.sleep_forever()`
|
||||
help: Replace with `anyio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
64 64 | await anyio.sleep(100000) # error: 116, "async"
|
||||
|
|
@ -187,15 +196,16 @@ ASYNC116.py:67:11: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should us
|
|||
69 69 | await anyio.sleep(86399)
|
||||
70 70 | await anyio.sleep(86400)
|
||||
|
||||
ASYNC116.py:71:11: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
--> ASYNC116.py:71:11
|
||||
|
|
||||
69 | await anyio.sleep(86399)
|
||||
70 | await anyio.sleep(86400)
|
||||
71 | await anyio.sleep(86400.01) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
72 | await anyio.sleep(86401) # error: 116, "async"
|
||||
|
|
||||
= help: Replace with `anyio.sleep_forever()`
|
||||
help: Replace with `anyio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
68 68 |
|
||||
|
|
@ -207,16 +217,17 @@ ASYNC116.py:71:11: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should us
|
|||
73 73 |
|
||||
74 74 | await anyio.sleep(-1) # will raise a runtime error
|
||||
|
||||
ASYNC116.py:72:11: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
--> ASYNC116.py:72:11
|
||||
|
|
||||
70 | await anyio.sleep(86400)
|
||||
71 | await anyio.sleep(86400.01) # error: 116, "async"
|
||||
72 | await anyio.sleep(86401) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
73 |
|
||||
74 | await anyio.sleep(-1) # will raise a runtime error
|
||||
|
|
||||
= help: Replace with `anyio.sleep_forever()`
|
||||
help: Replace with `anyio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
69 69 | await anyio.sleep(86399)
|
||||
|
|
@ -228,15 +239,16 @@ ASYNC116.py:72:11: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should us
|
|||
74 74 | await anyio.sleep(-1) # will raise a runtime error
|
||||
75 75 | await anyio.sleep(0) # handled by different check
|
||||
|
||||
ASYNC116.py:101:5: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
--> ASYNC116.py:101:5
|
||||
|
|
||||
100 | # does not require the call to be awaited, nor in an async fun
|
||||
101 | anyio.sleep(86401) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
102 | # also checks that we don't break visit_Call
|
||||
103 | anyio.run(anyio.sleep(86401)) # error: 116, "async"
|
||||
|
|
||||
= help: Replace with `anyio.sleep_forever()`
|
||||
help: Replace with `anyio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
98 98 | import anyio
|
||||
|
|
@ -248,14 +260,15 @@ ASYNC116.py:101:5: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should us
|
|||
103 103 | anyio.run(anyio.sleep(86401)) # error: 116, "async"
|
||||
104 104 |
|
||||
|
||||
ASYNC116.py:103:15: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
--> ASYNC116.py:103:15
|
||||
|
|
||||
101 | anyio.sleep(86401) # error: 116, "async"
|
||||
102 | # also checks that we don't break visit_Call
|
||||
103 | anyio.run(anyio.sleep(86401)) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Replace with `anyio.sleep_forever()`
|
||||
help: Replace with `anyio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
100 100 | # does not require the call to be awaited, nor in an async fun
|
||||
|
|
@ -267,13 +280,14 @@ ASYNC116.py:103:15: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should u
|
|||
105 105 |
|
||||
106 106 | async def import_from_anyio():
|
||||
|
||||
ASYNC116.py:110:11: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
--> ASYNC116.py:110:11
|
||||
|
|
||||
109 | # catch from import
|
||||
110 | await sleep(86401) # error: 116, "async"
|
||||
| ^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
= help: Replace with `anyio.sleep_forever()`
|
||||
help: Replace with `anyio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
2 2 | # ASYNCIO_NO_ERROR - no asyncio.sleep_forever, so check intentionally doesn't trigger.
|
||||
|
|
@ -293,15 +307,16 @@ ASYNC116.py:110:11: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should u
|
|||
112 113 |
|
||||
113 114 | async def test_anyio_async116_helpers():
|
||||
|
||||
ASYNC116.py:119:11: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
ASYNC116 [*] `anyio.sleep()` with >24 hour interval should usually be `anyio.sleep_forever()`
|
||||
--> ASYNC116.py:119:11
|
||||
|
|
||||
117 | await anyio.sleep(seconds=1) # OK
|
||||
118 |
|
||||
119 | await anyio.sleep(delay=86401) # ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
120 | await anyio.sleep(seconds=86401) # OK
|
||||
|
|
||||
= help: Replace with `anyio.sleep_forever()`
|
||||
help: Replace with `anyio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
116 116 | await anyio.sleep(delay=1) # OK
|
||||
|
|
@ -313,15 +328,16 @@ ASYNC116.py:119:11: ASYNC116 [*] `anyio.sleep()` with >24 hour interval should u
|
|||
121 121 |
|
||||
122 122 |
|
||||
|
||||
ASYNC116.py:129:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
--> ASYNC116.py:129:11
|
||||
|
|
||||
127 | await trio.sleep(delay=1) # OK
|
||||
128 |
|
||||
129 | await trio.sleep(seconds=86401) # ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
130 | await trio.sleep(delay=86401) # OK
|
||||
|
|
||||
= help: Replace with `trio.sleep_forever()`
|
||||
help: Replace with `trio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
126 126 | await trio.sleep(seconds=1) # OK
|
||||
|
|
@ -333,15 +349,16 @@ ASYNC116.py:129:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should us
|
|||
131 131 |
|
||||
132 132 |
|
||||
|
||||
ASYNC116.py:137:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
--> ASYNC116.py:137:11
|
||||
|
|
||||
135 | from trio import sleep
|
||||
136 |
|
||||
137 | await sleep(18446744073709551616)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
138 | await trio.sleep(99999999999999999999)
|
||||
|
|
||||
= help: Replace with `trio.sleep_forever()`
|
||||
help: Replace with `trio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
134 134 | import trio
|
||||
|
|
@ -351,13 +368,14 @@ ASYNC116.py:137:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should us
|
|||
137 |+ await trio.sleep_forever()
|
||||
138 138 | await trio.sleep(99999999999999999999)
|
||||
|
||||
ASYNC116.py:138:11: ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
ASYNC116 [*] `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`
|
||||
--> ASYNC116.py:138:11
|
||||
|
|
||||
137 | await sleep(18446744073709551616)
|
||||
138 | await trio.sleep(99999999999999999999)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC116
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: Replace with `trio.sleep_forever()`
|
||||
help: Replace with `trio.sleep_forever()`
|
||||
|
||||
ℹ Unsafe fix
|
||||
135 135 | from trio import sleep
|
||||
|
|
|
|||
|
|
@ -1,229 +1,254 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
---
|
||||
ASYNC210.py:8:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:8:5
|
||||
|
|
||||
7 | async def foo():
|
||||
8 | urllib.request.urlopen("http://example.com/foo/bar").read() # ASYNC210
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
ASYNC210.py:12:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:12:5
|
||||
|
|
||||
11 | async def foo():
|
||||
12 | requests.get() # ASYNC210
|
||||
| ^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
ASYNC210.py:16:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:16:5
|
||||
|
|
||||
15 | async def foo():
|
||||
16 | httpx.get() # ASYNC210
|
||||
| ^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
|
||||
ASYNC210.py:20:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:20:5
|
||||
|
|
||||
19 | async def foo():
|
||||
20 | requests.post() # ASYNC210
|
||||
| ^^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
ASYNC210.py:24:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:24:5
|
||||
|
|
||||
23 | async def foo():
|
||||
24 | httpx.post() # ASYNC210
|
||||
| ^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
|
||||
ASYNC210.py:28:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:28:5
|
||||
|
|
||||
27 | async def foo():
|
||||
28 | requests.get() # ASYNC210
|
||||
| ^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^
|
||||
29 | requests.get(...) # ASYNC210
|
||||
30 | requests.get # Ok
|
||||
|
|
||||
|
||||
ASYNC210.py:29:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:29:5
|
||||
|
|
||||
27 | async def foo():
|
||||
28 | requests.get() # ASYNC210
|
||||
29 | requests.get(...) # ASYNC210
|
||||
| ^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^
|
||||
30 | requests.get # Ok
|
||||
31 | print(requests.get()) # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:31:11: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:31:11
|
||||
|
|
||||
29 | requests.get(...) # ASYNC210
|
||||
30 | requests.get # Ok
|
||||
31 | print(requests.get()) # ASYNC210
|
||||
| ^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^
|
||||
32 | print(requests.get(requests.get())) # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:32:11: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:32:11
|
||||
|
|
||||
30 | requests.get # Ok
|
||||
31 | print(requests.get()) # ASYNC210
|
||||
32 | print(requests.get(requests.get())) # ASYNC210
|
||||
| ^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^
|
||||
33 |
|
||||
34 | requests.options() # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:32:24: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:32:24
|
||||
|
|
||||
30 | requests.get # Ok
|
||||
31 | print(requests.get()) # ASYNC210
|
||||
32 | print(requests.get(requests.get())) # ASYNC210
|
||||
| ^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^
|
||||
33 |
|
||||
34 | requests.options() # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:34:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:34:5
|
||||
|
|
||||
32 | print(requests.get(requests.get())) # ASYNC210
|
||||
33 |
|
||||
34 | requests.options() # ASYNC210
|
||||
| ^^^^^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
35 | requests.head() # ASYNC210
|
||||
36 | requests.post() # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:35:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:35:5
|
||||
|
|
||||
34 | requests.options() # ASYNC210
|
||||
35 | requests.head() # ASYNC210
|
||||
| ^^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^^
|
||||
36 | requests.post() # ASYNC210
|
||||
37 | requests.put() # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:36:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:36:5
|
||||
|
|
||||
34 | requests.options() # ASYNC210
|
||||
35 | requests.head() # ASYNC210
|
||||
36 | requests.post() # ASYNC210
|
||||
| ^^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^^
|
||||
37 | requests.put() # ASYNC210
|
||||
38 | requests.patch() # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:37:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:37:5
|
||||
|
|
||||
35 | requests.head() # ASYNC210
|
||||
36 | requests.post() # ASYNC210
|
||||
37 | requests.put() # ASYNC210
|
||||
| ^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^
|
||||
38 | requests.patch() # ASYNC210
|
||||
39 | requests.delete() # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:38:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:38:5
|
||||
|
|
||||
36 | requests.post() # ASYNC210
|
||||
37 | requests.put() # ASYNC210
|
||||
38 | requests.patch() # ASYNC210
|
||||
| ^^^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^^^
|
||||
39 | requests.delete() # ASYNC210
|
||||
40 | requests.foo()
|
||||
|
|
||||
|
||||
ASYNC210.py:39:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:39:5
|
||||
|
|
||||
37 | requests.put() # ASYNC210
|
||||
38 | requests.patch() # ASYNC210
|
||||
39 | requests.delete() # ASYNC210
|
||||
| ^^^^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^^^^
|
||||
40 | requests.foo()
|
||||
|
|
||||
|
||||
ASYNC210.py:42:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:42:5
|
||||
|
|
||||
40 | requests.foo()
|
||||
41 |
|
||||
42 | httpx.options("") # ASYNC210
|
||||
| ^^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^^
|
||||
43 | httpx.head("") # ASYNC210
|
||||
44 | httpx.post("") # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:43:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:43:5
|
||||
|
|
||||
42 | httpx.options("") # ASYNC210
|
||||
43 | httpx.head("") # ASYNC210
|
||||
| ^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^
|
||||
44 | httpx.post("") # ASYNC210
|
||||
45 | httpx.put("") # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:44:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:44:5
|
||||
|
|
||||
42 | httpx.options("") # ASYNC210
|
||||
43 | httpx.head("") # ASYNC210
|
||||
44 | httpx.post("") # ASYNC210
|
||||
| ^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^
|
||||
45 | httpx.put("") # ASYNC210
|
||||
46 | httpx.patch("") # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:45:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:45:5
|
||||
|
|
||||
43 | httpx.head("") # ASYNC210
|
||||
44 | httpx.post("") # ASYNC210
|
||||
45 | httpx.put("") # ASYNC210
|
||||
| ^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^
|
||||
46 | httpx.patch("") # ASYNC210
|
||||
47 | httpx.delete("") # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:46:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:46:5
|
||||
|
|
||||
44 | httpx.post("") # ASYNC210
|
||||
45 | httpx.put("") # ASYNC210
|
||||
46 | httpx.patch("") # ASYNC210
|
||||
| ^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^
|
||||
47 | httpx.delete("") # ASYNC210
|
||||
48 | httpx.foo() # Ok
|
||||
|
|
||||
|
||||
ASYNC210.py:47:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:47:5
|
||||
|
|
||||
45 | httpx.put("") # ASYNC210
|
||||
46 | httpx.patch("") # ASYNC210
|
||||
47 | httpx.delete("") # ASYNC210
|
||||
| ^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^
|
||||
48 | httpx.foo() # Ok
|
||||
|
|
||||
|
||||
ASYNC210.py:50:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:50:5
|
||||
|
|
||||
48 | httpx.foo() # Ok
|
||||
49 |
|
||||
50 | urllib3.request() # ASYNC210
|
||||
| ^^^^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^^^^
|
||||
51 | urllib3.request(...) # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:51:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:51:5
|
||||
|
|
||||
50 | urllib3.request() # ASYNC210
|
||||
51 | urllib3.request(...) # ASYNC210
|
||||
| ^^^^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^^^^
|
||||
52 |
|
||||
53 | urllib.request.urlopen("") # ASYNC210
|
||||
|
|
||||
|
||||
ASYNC210.py:53:5: ASYNC210 Async functions should not call blocking HTTP methods
|
||||
ASYNC210 Async functions should not call blocking HTTP methods
|
||||
--> ASYNC210.py:53:5
|
||||
|
|
||||
51 | urllib3.request(...) # ASYNC210
|
||||
52 |
|
||||
53 | urllib.request.urlopen("") # ASYNC210
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ ASYNC210
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
54 |
|
||||
55 | r = {}
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,77 +1,85 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
---
|
||||
ASYNC22x.py:31:5: ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
--> ASYNC22x.py:31:5
|
||||
|
|
||||
29 | subprocess.getoutput() # ASYNC221
|
||||
30 | )
|
||||
31 | subprocess.Popen() # ASYNC220
|
||||
| ^^^^^^^^^^^^^^^^ ASYNC220
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
32 | os.system() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:73:5: ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
--> ASYNC22x.py:73:5
|
||||
|
|
||||
72 | # if mode is given, and is not os.P_WAIT: ASYNC220
|
||||
73 | os.spawnl(os.P_NOWAIT) # ASYNC220
|
||||
| ^^^^^^^^^ ASYNC220
|
||||
| ^^^^^^^^^
|
||||
74 | os.spawnl(P_NOWAIT) # ASYNC220
|
||||
75 | os.spawnl(mode=os.P_NOWAIT) # ASYNC220
|
||||
|
|
||||
|
||||
ASYNC22x.py:74:5: ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
--> ASYNC22x.py:74:5
|
||||
|
|
||||
72 | # if mode is given, and is not os.P_WAIT: ASYNC220
|
||||
73 | os.spawnl(os.P_NOWAIT) # ASYNC220
|
||||
74 | os.spawnl(P_NOWAIT) # ASYNC220
|
||||
| ^^^^^^^^^ ASYNC220
|
||||
| ^^^^^^^^^
|
||||
75 | os.spawnl(mode=os.P_NOWAIT) # ASYNC220
|
||||
76 | os.spawnl(mode=P_NOWAIT) # ASYNC220
|
||||
|
|
||||
|
||||
ASYNC22x.py:75:5: ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
--> ASYNC22x.py:75:5
|
||||
|
|
||||
73 | os.spawnl(os.P_NOWAIT) # ASYNC220
|
||||
74 | os.spawnl(P_NOWAIT) # ASYNC220
|
||||
75 | os.spawnl(mode=os.P_NOWAIT) # ASYNC220
|
||||
| ^^^^^^^^^ ASYNC220
|
||||
| ^^^^^^^^^
|
||||
76 | os.spawnl(mode=P_NOWAIT) # ASYNC220
|
||||
|
|
||||
|
||||
ASYNC22x.py:76:5: ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
--> ASYNC22x.py:76:5
|
||||
|
|
||||
74 | os.spawnl(P_NOWAIT) # ASYNC220
|
||||
75 | os.spawnl(mode=os.P_NOWAIT) # ASYNC220
|
||||
76 | os.spawnl(mode=P_NOWAIT) # ASYNC220
|
||||
| ^^^^^^^^^ ASYNC220
|
||||
| ^^^^^^^^^
|
||||
77 |
|
||||
78 | P_WAIT = os.P_WAIT
|
||||
|
|
||||
|
||||
ASYNC22x.py:86:5: ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
--> ASYNC22x.py:86:5
|
||||
|
|
||||
85 | # other weird cases: ASYNC220
|
||||
86 | os.spawnl(0) # ASYNC220
|
||||
| ^^^^^^^^^ ASYNC220
|
||||
| ^^^^^^^^^
|
||||
87 | os.spawnl(1) # ASYNC220
|
||||
88 | os.spawnl(foo()) # ASYNC220
|
||||
|
|
||||
|
||||
ASYNC22x.py:87:5: ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
--> ASYNC22x.py:87:5
|
||||
|
|
||||
85 | # other weird cases: ASYNC220
|
||||
86 | os.spawnl(0) # ASYNC220
|
||||
87 | os.spawnl(1) # ASYNC220
|
||||
| ^^^^^^^^^ ASYNC220
|
||||
| ^^^^^^^^^
|
||||
88 | os.spawnl(foo()) # ASYNC220
|
||||
|
|
||||
|
||||
ASYNC22x.py:88:5: ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
ASYNC220 Async functions should not create subprocesses with blocking methods
|
||||
--> ASYNC22x.py:88:5
|
||||
|
|
||||
86 | os.spawnl(0) # ASYNC220
|
||||
87 | os.spawnl(1) # ASYNC220
|
||||
88 | os.spawnl(foo()) # ASYNC220
|
||||
| ^^^^^^^^^ ASYNC220
|
||||
| ^^^^^^^^^
|
||||
89 |
|
||||
90 | # ASYNC222
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,226 +1,250 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
---
|
||||
ASYNC22x.py:8:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:8:5
|
||||
|
|
||||
7 | async def func():
|
||||
8 | subprocess.run("foo") # ASYNC221
|
||||
| ^^^^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
ASYNC22x.py:12:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:12:5
|
||||
|
|
||||
11 | async def func():
|
||||
12 | subprocess.call("foo") # ASYNC221
|
||||
| ^^^^^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
ASYNC22x.py:29:9: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:29:9
|
||||
|
|
||||
27 | async def foo():
|
||||
28 | await async_fun(
|
||||
29 | subprocess.getoutput() # ASYNC221
|
||||
| ^^^^^^^^^^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
30 | )
|
||||
31 | subprocess.Popen() # ASYNC220
|
||||
|
|
||||
|
||||
ASYNC22x.py:32:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:32:5
|
||||
|
|
||||
30 | )
|
||||
31 | subprocess.Popen() # ASYNC220
|
||||
32 | os.system() # ASYNC221
|
||||
| ^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^
|
||||
33 |
|
||||
34 | system()
|
||||
|
|
||||
|
||||
ASYNC22x.py:38:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:38:5
|
||||
|
|
||||
36 | os.anything()
|
||||
37 |
|
||||
38 | subprocess.run() # ASYNC221
|
||||
| ^^^^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^^^^
|
||||
39 | subprocess.call() # ASYNC221
|
||||
40 | subprocess.check_call() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:39:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:39:5
|
||||
|
|
||||
38 | subprocess.run() # ASYNC221
|
||||
39 | subprocess.call() # ASYNC221
|
||||
| ^^^^^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^^^^^
|
||||
40 | subprocess.check_call() # ASYNC221
|
||||
41 | subprocess.check_output() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:40:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:40:5
|
||||
|
|
||||
38 | subprocess.run() # ASYNC221
|
||||
39 | subprocess.call() # ASYNC221
|
||||
40 | subprocess.check_call() # ASYNC221
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
41 | subprocess.check_output() # ASYNC221
|
||||
42 | subprocess.getoutput() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:41:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:41:5
|
||||
|
|
||||
39 | subprocess.call() # ASYNC221
|
||||
40 | subprocess.check_call() # ASYNC221
|
||||
41 | subprocess.check_output() # ASYNC221
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
42 | subprocess.getoutput() # ASYNC221
|
||||
43 | subprocess.getstatusoutput() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:42:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:42:5
|
||||
|
|
||||
40 | subprocess.check_call() # ASYNC221
|
||||
41 | subprocess.check_output() # ASYNC221
|
||||
42 | subprocess.getoutput() # ASYNC221
|
||||
| ^^^^^^^^^^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
43 | subprocess.getstatusoutput() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:43:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:43:5
|
||||
|
|
||||
41 | subprocess.check_output() # ASYNC221
|
||||
42 | subprocess.getoutput() # ASYNC221
|
||||
43 | subprocess.getstatusoutput() # ASYNC221
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
44 |
|
||||
45 | await async_fun(
|
||||
|
|
||||
|
||||
ASYNC22x.py:46:9: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:46:9
|
||||
|
|
||||
45 | await async_fun(
|
||||
46 | subprocess.getoutput() # ASYNC221
|
||||
| ^^^^^^^^^^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
47 | )
|
||||
|
|
||||
|
||||
ASYNC22x.py:54:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:54:5
|
||||
|
|
||||
52 | subprocess()
|
||||
53 |
|
||||
54 | os.posix_spawn() # ASYNC221
|
||||
| ^^^^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^^^^
|
||||
55 | os.posix_spawnp() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:55:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:55:5
|
||||
|
|
||||
54 | os.posix_spawn() # ASYNC221
|
||||
55 | os.posix_spawnp() # ASYNC221
|
||||
| ^^^^^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^^^^^
|
||||
56 |
|
||||
57 | os.spawn()
|
||||
|
|
||||
|
||||
ASYNC22x.py:61:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:61:5
|
||||
|
|
||||
59 | os.spawnllll()
|
||||
60 |
|
||||
61 | os.spawnl() # ASYNC221
|
||||
| ^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^
|
||||
62 | os.spawnle() # ASYNC221
|
||||
63 | os.spawnlp() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:62:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:62:5
|
||||
|
|
||||
61 | os.spawnl() # ASYNC221
|
||||
62 | os.spawnle() # ASYNC221
|
||||
| ^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^
|
||||
63 | os.spawnlp() # ASYNC221
|
||||
64 | os.spawnlpe() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:63:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:63:5
|
||||
|
|
||||
61 | os.spawnl() # ASYNC221
|
||||
62 | os.spawnle() # ASYNC221
|
||||
63 | os.spawnlp() # ASYNC221
|
||||
| ^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^
|
||||
64 | os.spawnlpe() # ASYNC221
|
||||
65 | os.spawnv() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:64:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:64:5
|
||||
|
|
||||
62 | os.spawnle() # ASYNC221
|
||||
63 | os.spawnlp() # ASYNC221
|
||||
64 | os.spawnlpe() # ASYNC221
|
||||
| ^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^
|
||||
65 | os.spawnv() # ASYNC221
|
||||
66 | os.spawnve() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:65:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:65:5
|
||||
|
|
||||
63 | os.spawnlp() # ASYNC221
|
||||
64 | os.spawnlpe() # ASYNC221
|
||||
65 | os.spawnv() # ASYNC221
|
||||
| ^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^
|
||||
66 | os.spawnve() # ASYNC221
|
||||
67 | os.spawnvp() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:66:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:66:5
|
||||
|
|
||||
64 | os.spawnlpe() # ASYNC221
|
||||
65 | os.spawnv() # ASYNC221
|
||||
66 | os.spawnve() # ASYNC221
|
||||
| ^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^
|
||||
67 | os.spawnvp() # ASYNC221
|
||||
68 | os.spawnvpe() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:67:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:67:5
|
||||
|
|
||||
65 | os.spawnv() # ASYNC221
|
||||
66 | os.spawnve() # ASYNC221
|
||||
67 | os.spawnvp() # ASYNC221
|
||||
| ^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^
|
||||
68 | os.spawnvpe() # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:68:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:68:5
|
||||
|
|
||||
66 | os.spawnve() # ASYNC221
|
||||
67 | os.spawnvp() # ASYNC221
|
||||
68 | os.spawnvpe() # ASYNC221
|
||||
| ^^^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^^^
|
||||
69 |
|
||||
70 | P_NOWAIT = os.P_NOWAIT
|
||||
|
|
||||
|
||||
ASYNC22x.py:81:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:81:5
|
||||
|
|
||||
80 | # if it is P_WAIT, ASYNC221
|
||||
81 | os.spawnl(P_WAIT) # ASYNC221
|
||||
| ^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^
|
||||
82 | os.spawnl(mode=os.P_WAIT) # ASYNC221
|
||||
83 | os.spawnl(mode=P_WAIT) # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:82:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:82:5
|
||||
|
|
||||
80 | # if it is P_WAIT, ASYNC221
|
||||
81 | os.spawnl(P_WAIT) # ASYNC221
|
||||
82 | os.spawnl(mode=os.P_WAIT) # ASYNC221
|
||||
| ^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^
|
||||
83 | os.spawnl(mode=P_WAIT) # ASYNC221
|
||||
|
|
||||
|
||||
ASYNC22x.py:83:5: ASYNC221 Async functions should not run processes with blocking methods
|
||||
ASYNC221 Async functions should not run processes with blocking methods
|
||||
--> ASYNC22x.py:83:5
|
||||
|
|
||||
81 | os.spawnl(P_WAIT) # ASYNC221
|
||||
82 | os.spawnl(mode=os.P_WAIT) # ASYNC221
|
||||
83 | os.spawnl(mode=P_WAIT) # ASYNC221
|
||||
| ^^^^^^^^^ ASYNC221
|
||||
| ^^^^^^^^^
|
||||
84 |
|
||||
85 | # other weird cases: ASYNC220
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,64 +1,71 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
---
|
||||
ASYNC22x.py:20:5: ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
--> ASYNC22x.py:20:5
|
||||
|
|
||||
19 | async def func():
|
||||
20 | os.wait4(10) # ASYNC222
|
||||
| ^^^^^^^^ ASYNC222
|
||||
| ^^^^^^^^
|
||||
|
|
||||
|
||||
ASYNC22x.py:24:5: ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
--> ASYNC22x.py:24:5
|
||||
|
|
||||
23 | async def func():
|
||||
24 | os.wait(12) # ASYNC222
|
||||
| ^^^^^^^ ASYNC222
|
||||
| ^^^^^^^
|
||||
|
|
||||
|
||||
ASYNC22x.py:91:5: ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
--> ASYNC22x.py:91:5
|
||||
|
|
||||
90 | # ASYNC222
|
||||
91 | os.wait() # ASYNC222
|
||||
| ^^^^^^^ ASYNC222
|
||||
| ^^^^^^^
|
||||
92 | os.wait3() # ASYNC222
|
||||
93 | os.wait4() # ASYNC222
|
||||
|
|
||||
|
||||
ASYNC22x.py:92:5: ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
--> ASYNC22x.py:92:5
|
||||
|
|
||||
90 | # ASYNC222
|
||||
91 | os.wait() # ASYNC222
|
||||
92 | os.wait3() # ASYNC222
|
||||
| ^^^^^^^^ ASYNC222
|
||||
| ^^^^^^^^
|
||||
93 | os.wait4() # ASYNC222
|
||||
94 | os.waitid() # ASYNC222
|
||||
|
|
||||
|
||||
ASYNC22x.py:93:5: ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
--> ASYNC22x.py:93:5
|
||||
|
|
||||
91 | os.wait() # ASYNC222
|
||||
92 | os.wait3() # ASYNC222
|
||||
93 | os.wait4() # ASYNC222
|
||||
| ^^^^^^^^ ASYNC222
|
||||
| ^^^^^^^^
|
||||
94 | os.waitid() # ASYNC222
|
||||
95 | os.waitpid() # ASYNC222
|
||||
|
|
||||
|
||||
ASYNC22x.py:94:5: ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
--> ASYNC22x.py:94:5
|
||||
|
|
||||
92 | os.wait3() # ASYNC222
|
||||
93 | os.wait4() # ASYNC222
|
||||
94 | os.waitid() # ASYNC222
|
||||
| ^^^^^^^^^ ASYNC222
|
||||
| ^^^^^^^^^
|
||||
95 | os.waitpid() # ASYNC222
|
||||
|
|
||||
|
||||
ASYNC22x.py:95:5: ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
ASYNC222 Async functions should not wait on processes with blocking methods
|
||||
--> ASYNC22x.py:95:5
|
||||
|
|
||||
93 | os.wait4() # ASYNC222
|
||||
94 | os.waitid() # ASYNC222
|
||||
95 | os.waitpid() # ASYNC222
|
||||
| ^^^^^^^^^^ ASYNC222
|
||||
| ^^^^^^^^^^
|
||||
96 |
|
||||
97 | os.waitpi()
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,101 +1,113 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
---
|
||||
ASYNC230.py:6:5: ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
--> ASYNC230.py:6:5
|
||||
|
|
||||
5 | async def foo():
|
||||
6 | open("") # ASYNC230
|
||||
| ^^^^ ASYNC230
|
||||
| ^^^^
|
||||
7 | io.open_code("") # ASYNC230
|
||||
|
|
||||
|
||||
ASYNC230.py:7:5: ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
--> ASYNC230.py:7:5
|
||||
|
|
||||
5 | async def foo():
|
||||
6 | open("") # ASYNC230
|
||||
7 | io.open_code("") # ASYNC230
|
||||
| ^^^^^^^^^^^^ ASYNC230
|
||||
| ^^^^^^^^^^^^
|
||||
8 |
|
||||
9 | with open(""): # ASYNC230
|
||||
|
|
||||
|
||||
ASYNC230.py:9:10: ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
--> ASYNC230.py:9:10
|
||||
|
|
||||
7 | io.open_code("") # ASYNC230
|
||||
8 |
|
||||
9 | with open(""): # ASYNC230
|
||||
| ^^^^ ASYNC230
|
||||
| ^^^^
|
||||
10 | ...
|
||||
|
|
||||
|
||||
ASYNC230.py:12:10: ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
--> ASYNC230.py:12:10
|
||||
|
|
||||
10 | ...
|
||||
11 |
|
||||
12 | with open("") as f: # ASYNC230
|
||||
| ^^^^ ASYNC230
|
||||
| ^^^^
|
||||
13 | ...
|
||||
|
|
||||
|
||||
ASYNC230.py:15:17: ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
--> ASYNC230.py:15:17
|
||||
|
|
||||
13 | ...
|
||||
14 |
|
||||
15 | with foo(), open(""): # ASYNC230
|
||||
| ^^^^ ASYNC230
|
||||
| ^^^^
|
||||
16 | ...
|
||||
|
|
||||
|
||||
ASYNC230.py:18:16: ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
--> ASYNC230.py:18:16
|
||||
|
|
||||
16 | ...
|
||||
17 |
|
||||
18 | async with open(""): # ASYNC230
|
||||
| ^^^^ ASYNC230
|
||||
| ^^^^
|
||||
19 | ...
|
||||
|
|
||||
|
||||
ASYNC230.py:29:5: ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
--> ASYNC230.py:29:5
|
||||
|
|
||||
28 | async def func():
|
||||
29 | open("foo") # ASYNC230
|
||||
| ^^^^ ASYNC230
|
||||
| ^^^^
|
||||
|
|
||||
|
||||
ASYNC230.py:36:5: ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
--> ASYNC230.py:36:5
|
||||
|
|
||||
35 | async def func():
|
||||
36 | Path("foo").open() # ASYNC230
|
||||
| ^^^^^^^^^^^^^^^^ ASYNC230
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
||||
ASYNC230.py:41:5: ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
--> ASYNC230.py:41:5
|
||||
|
|
||||
39 | async def func():
|
||||
40 | p = Path("foo")
|
||||
41 | p.open() # ASYNC230
|
||||
| ^^^^^^ ASYNC230
|
||||
| ^^^^^^
|
||||
|
|
||||
|
||||
ASYNC230.py:45:10: ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
--> ASYNC230.py:45:10
|
||||
|
|
||||
44 | async def func():
|
||||
45 | with Path("foo").open() as f: # ASYNC230
|
||||
| ^^^^^^^^^^^^^^^^ ASYNC230
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
46 | pass
|
||||
|
|
||||
|
||||
ASYNC230.py:53:9: ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
--> ASYNC230.py:53:9
|
||||
|
|
||||
52 | async def bar():
|
||||
53 | p.open() # ASYNC230
|
||||
| ^^^^^^ ASYNC230
|
||||
| ^^^^^^
|
||||
|
|
||||
|
||||
ASYNC230.py:59:5: ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
ASYNC230 Async functions should not open files with blocking methods like `open`
|
||||
--> ASYNC230.py:59:5
|
||||
|
|
||||
57 | (p1, p2) = (Path("foo"), Path("bar"))
|
||||
58 |
|
||||
59 | p1.open() # ASYNC230
|
||||
| ^^^^^^^ ASYNC230
|
||||
| ^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
ASYNC251.py:6:5: ASYNC251 Async functions should not call `time.sleep`
|
||||
ASYNC251 Async functions should not call `time.sleep`
|
||||
--> ASYNC251.py:6:5
|
||||
|
|
||||
5 | async def func():
|
||||
6 | time.sleep(1) # ASYNC251
|
||||
| ^^^^^^^^^^ ASYNC251
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,26 +1,28 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
S101.py:1:1: S101 Use of `assert` detected
|
||||
S101 Use of `assert` detected
|
||||
--> S101.py:1:1
|
||||
|
|
||||
1 | assert True # S101
|
||||
| ^^^^^^ S101
|
||||
| ^^^^^^
|
||||
|
|
||||
|
||||
S101.py:6:5: S101 Use of `assert` detected
|
||||
S101 Use of `assert` detected
|
||||
--> S101.py:6:5
|
||||
|
|
||||
4 | def fn():
|
||||
5 | x = 1
|
||||
6 | assert x == 1 # S101
|
||||
| ^^^^^^ S101
|
||||
| ^^^^^^
|
||||
7 | assert x == 2 # S101
|
||||
|
|
||||
|
||||
S101.py:7:5: S101 Use of `assert` detected
|
||||
S101 Use of `assert` detected
|
||||
--> S101.py:7:5
|
||||
|
|
||||
5 | x = 1
|
||||
6 | assert x == 1 # S101
|
||||
7 | assert x == 2 # S101
|
||||
| ^^^^^^ S101
|
||||
| ^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,30 +1,33 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
---
|
||||
S102.py:3:5: S102 Use of `exec` detected
|
||||
S102 Use of `exec` detected
|
||||
--> S102.py:3:5
|
||||
|
|
||||
1 | def fn():
|
||||
2 | # Error
|
||||
3 | exec('x = 2')
|
||||
| ^^^^ S102
|
||||
| ^^^^
|
||||
4 |
|
||||
5 | exec('y = 3')
|
||||
|
|
||||
|
||||
S102.py:5:1: S102 Use of `exec` detected
|
||||
S102 Use of `exec` detected
|
||||
--> S102.py:5:1
|
||||
|
|
||||
3 | exec('x = 2')
|
||||
4 |
|
||||
5 | exec('y = 3')
|
||||
| ^^^^ S102
|
||||
| ^^^^
|
||||
|
|
||||
|
||||
S102.py:11:5: S102 Use of `exec` detected
|
||||
S102 Use of `exec` detected
|
||||
--> S102.py:11:5
|
||||
|
|
||||
9 | def _():
|
||||
10 | from builtins import exec
|
||||
11 | exec('') # Error
|
||||
| ^^^^ S102
|
||||
| ^^^^
|
||||
12 |
|
||||
13 | def _():
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,138 +1,152 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
---
|
||||
S103.py:6:25: S103 `os.chmod` setting a permissive mask `0o227` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o227` on file or directory
|
||||
--> S103.py:6:25
|
||||
|
|
||||
4 | keyfile = "foo"
|
||||
5 |
|
||||
6 | os.chmod("/etc/passwd", 0o227) # Error
|
||||
| ^^^^^ S103
|
||||
| ^^^^^
|
||||
7 | os.chmod("/etc/passwd", 0o7) # Error
|
||||
8 | os.chmod("/etc/passwd", 0o664) # OK
|
||||
|
|
||||
|
||||
S103.py:7:25: S103 `os.chmod` setting a permissive mask `0o7` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o7` on file or directory
|
||||
--> S103.py:7:25
|
||||
|
|
||||
6 | os.chmod("/etc/passwd", 0o227) # Error
|
||||
7 | os.chmod("/etc/passwd", 0o7) # Error
|
||||
| ^^^ S103
|
||||
| ^^^
|
||||
8 | os.chmod("/etc/passwd", 0o664) # OK
|
||||
9 | os.chmod("/etc/passwd", 0o777) # Error
|
||||
|
|
||||
|
||||
S103.py:9:25: S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
--> S103.py:9:25
|
||||
|
|
||||
7 | os.chmod("/etc/passwd", 0o7) # Error
|
||||
8 | os.chmod("/etc/passwd", 0o664) # OK
|
||||
9 | os.chmod("/etc/passwd", 0o777) # Error
|
||||
| ^^^^^ S103
|
||||
| ^^^^^
|
||||
10 | os.chmod("/etc/passwd", 0o770) # Error
|
||||
11 | os.chmod("/etc/passwd", 0o776) # Error
|
||||
|
|
||||
|
||||
S103.py:10:25: S103 `os.chmod` setting a permissive mask `0o770` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o770` on file or directory
|
||||
--> S103.py:10:25
|
||||
|
|
||||
8 | os.chmod("/etc/passwd", 0o664) # OK
|
||||
9 | os.chmod("/etc/passwd", 0o777) # Error
|
||||
10 | os.chmod("/etc/passwd", 0o770) # Error
|
||||
| ^^^^^ S103
|
||||
| ^^^^^
|
||||
11 | os.chmod("/etc/passwd", 0o776) # Error
|
||||
12 | os.chmod("/etc/passwd", 0o760) # OK
|
||||
|
|
||||
|
||||
S103.py:11:25: S103 `os.chmod` setting a permissive mask `0o776` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o776` on file or directory
|
||||
--> S103.py:11:25
|
||||
|
|
||||
9 | os.chmod("/etc/passwd", 0o777) # Error
|
||||
10 | os.chmod("/etc/passwd", 0o770) # Error
|
||||
11 | os.chmod("/etc/passwd", 0o776) # Error
|
||||
| ^^^^^ S103
|
||||
| ^^^^^
|
||||
12 | os.chmod("/etc/passwd", 0o760) # OK
|
||||
13 | os.chmod("~/.bashrc", 511) # Error
|
||||
|
|
||||
|
||||
S103.py:13:23: S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
--> S103.py:13:23
|
||||
|
|
||||
11 | os.chmod("/etc/passwd", 0o776) # Error
|
||||
12 | os.chmod("/etc/passwd", 0o760) # OK
|
||||
13 | os.chmod("~/.bashrc", 511) # Error
|
||||
| ^^^ S103
|
||||
| ^^^
|
||||
14 | os.chmod("/etc/hosts", 0o777) # Error
|
||||
15 | os.chmod("/tmp/oh_hai", 0x1FF) # Error
|
||||
|
|
||||
|
||||
S103.py:14:24: S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
--> S103.py:14:24
|
||||
|
|
||||
12 | os.chmod("/etc/passwd", 0o760) # OK
|
||||
13 | os.chmod("~/.bashrc", 511) # Error
|
||||
14 | os.chmod("/etc/hosts", 0o777) # Error
|
||||
| ^^^^^ S103
|
||||
| ^^^^^
|
||||
15 | os.chmod("/tmp/oh_hai", 0x1FF) # Error
|
||||
16 | os.chmod("/etc/passwd", stat.S_IRWXU) # OK
|
||||
|
|
||||
|
||||
S103.py:15:25: S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
--> S103.py:15:25
|
||||
|
|
||||
13 | os.chmod("~/.bashrc", 511) # Error
|
||||
14 | os.chmod("/etc/hosts", 0o777) # Error
|
||||
15 | os.chmod("/tmp/oh_hai", 0x1FF) # Error
|
||||
| ^^^^^ S103
|
||||
| ^^^^^
|
||||
16 | os.chmod("/etc/passwd", stat.S_IRWXU) # OK
|
||||
17 | os.chmod(keyfile, 0o777) # Error
|
||||
|
|
||||
|
||||
S103.py:17:19: S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
--> S103.py:17:19
|
||||
|
|
||||
15 | os.chmod("/tmp/oh_hai", 0x1FF) # Error
|
||||
16 | os.chmod("/etc/passwd", stat.S_IRWXU) # OK
|
||||
17 | os.chmod(keyfile, 0o777) # Error
|
||||
| ^^^^^ S103
|
||||
| ^^^^^
|
||||
18 | os.chmod(keyfile, 0o7 | 0o70 | 0o700) # Error
|
||||
19 | os.chmod(keyfile, stat.S_IRWXO | stat.S_IRWXG | stat.S_IRWXU) # Error
|
||||
|
|
||||
|
||||
S103.py:18:19: S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
--> S103.py:18:19
|
||||
|
|
||||
16 | os.chmod("/etc/passwd", stat.S_IRWXU) # OK
|
||||
17 | os.chmod(keyfile, 0o777) # Error
|
||||
18 | os.chmod(keyfile, 0o7 | 0o70 | 0o700) # Error
|
||||
| ^^^^^^^^^^^^^^^^^^ S103
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
19 | os.chmod(keyfile, stat.S_IRWXO | stat.S_IRWXG | stat.S_IRWXU) # Error
|
||||
20 | os.chmod("~/hidden_exec", stat.S_IXGRP) # Error
|
||||
|
|
||||
|
||||
S103.py:19:19: S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o777` on file or directory
|
||||
--> S103.py:19:19
|
||||
|
|
||||
17 | os.chmod(keyfile, 0o777) # Error
|
||||
18 | os.chmod(keyfile, 0o7 | 0o70 | 0o700) # Error
|
||||
19 | os.chmod(keyfile, stat.S_IRWXO | stat.S_IRWXG | stat.S_IRWXU) # Error
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ S103
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
20 | os.chmod("~/hidden_exec", stat.S_IXGRP) # Error
|
||||
21 | os.chmod("~/hidden_exec", stat.S_IXOTH) # OK
|
||||
|
|
||||
|
||||
S103.py:20:27: S103 `os.chmod` setting a permissive mask `0o10` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o10` on file or directory
|
||||
--> S103.py:20:27
|
||||
|
|
||||
18 | os.chmod(keyfile, 0o7 | 0o70 | 0o700) # Error
|
||||
19 | os.chmod(keyfile, stat.S_IRWXO | stat.S_IRWXG | stat.S_IRWXU) # Error
|
||||
20 | os.chmod("~/hidden_exec", stat.S_IXGRP) # Error
|
||||
| ^^^^^^^^^^^^ S103
|
||||
| ^^^^^^^^^^^^
|
||||
21 | os.chmod("~/hidden_exec", stat.S_IXOTH) # OK
|
||||
22 | os.chmod("/etc/passwd", stat.S_IWOTH) # Error
|
||||
|
|
||||
|
||||
S103.py:22:25: S103 `os.chmod` setting a permissive mask `0o2` on file or directory
|
||||
S103 `os.chmod` setting a permissive mask `0o2` on file or directory
|
||||
--> S103.py:22:25
|
||||
|
|
||||
20 | os.chmod("~/hidden_exec", stat.S_IXGRP) # Error
|
||||
21 | os.chmod("~/hidden_exec", stat.S_IXOTH) # OK
|
||||
22 | os.chmod("/etc/passwd", stat.S_IWOTH) # Error
|
||||
| ^^^^^^^^^^^^ S103
|
||||
| ^^^^^^^^^^^^
|
||||
23 | os.chmod("/etc/passwd", 0o100000000) # Error
|
||||
|
|
||||
|
||||
S103.py:23:25: S103 `os.chmod` setting an invalid mask on file or directory
|
||||
S103 `os.chmod` setting an invalid mask on file or directory
|
||||
--> S103.py:23:25
|
||||
|
|
||||
21 | os.chmod("~/hidden_exec", stat.S_IXOTH) # OK
|
||||
22 | os.chmod("/etc/passwd", stat.S_IWOTH) # Error
|
||||
23 | os.chmod("/etc/passwd", 0o100000000) # Error
|
||||
| ^^^^^^^^^^^ S103
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,70 +1,78 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
---
|
||||
S104.py:9:1: S104 Possible binding to all interfaces
|
||||
S104 Possible binding to all interfaces
|
||||
--> S104.py:9:1
|
||||
|
|
||||
8 | # Error
|
||||
9 | "0.0.0.0"
|
||||
| ^^^^^^^^^ S104
|
||||
| ^^^^^^^^^
|
||||
10 | '0.0.0.0'
|
||||
11 | f"0.0.0.0"
|
||||
|
|
||||
|
||||
S104.py:10:1: S104 Possible binding to all interfaces
|
||||
S104 Possible binding to all interfaces
|
||||
--> S104.py:10:1
|
||||
|
|
||||
8 | # Error
|
||||
9 | "0.0.0.0"
|
||||
10 | '0.0.0.0'
|
||||
| ^^^^^^^^^ S104
|
||||
| ^^^^^^^^^
|
||||
11 | f"0.0.0.0"
|
||||
|
|
||||
|
||||
S104.py:11:3: S104 Possible binding to all interfaces
|
||||
S104 Possible binding to all interfaces
|
||||
--> S104.py:11:3
|
||||
|
|
||||
9 | "0.0.0.0"
|
||||
10 | '0.0.0.0'
|
||||
11 | f"0.0.0.0"
|
||||
| ^^^^^^^ S104
|
||||
| ^^^^^^^
|
||||
|
|
||||
|
||||
S104.py:15:6: S104 Possible binding to all interfaces
|
||||
S104 Possible binding to all interfaces
|
||||
--> S104.py:15:6
|
||||
|
|
||||
14 | # Error
|
||||
15 | func("0.0.0.0")
|
||||
| ^^^^^^^^^ S104
|
||||
| ^^^^^^^^^
|
||||
|
|
||||
|
||||
S104.py:19:9: S104 Possible binding to all interfaces
|
||||
S104 Possible binding to all interfaces
|
||||
--> S104.py:19:9
|
||||
|
|
||||
18 | def my_func():
|
||||
19 | x = "0.0.0.0"
|
||||
| ^^^^^^^^^ S104
|
||||
| ^^^^^^^^^
|
||||
20 | print(x)
|
||||
|
|
||||
|
||||
S104.py:24:1: S104 Possible binding to all interfaces
|
||||
S104 Possible binding to all interfaces
|
||||
--> S104.py:24:1
|
||||
|
|
||||
23 | # Implicit string concatenation
|
||||
24 | "0.0.0.0" f"0.0.0.0{expr}0.0.0.0"
|
||||
| ^^^^^^^^^ S104
|
||||
| ^^^^^^^^^
|
||||
25 |
|
||||
26 | # t-strings - all ok
|
||||
|
|
||||
|
||||
S104.py:24:13: S104 Possible binding to all interfaces
|
||||
S104 Possible binding to all interfaces
|
||||
--> S104.py:24:13
|
||||
|
|
||||
23 | # Implicit string concatenation
|
||||
24 | "0.0.0.0" f"0.0.0.0{expr}0.0.0.0"
|
||||
| ^^^^^^^ S104
|
||||
| ^^^^^^^
|
||||
25 |
|
||||
26 | # t-strings - all ok
|
||||
|
|
||||
|
||||
S104.py:24:26: S104 Possible binding to all interfaces
|
||||
S104 Possible binding to all interfaces
|
||||
--> S104.py:24:26
|
||||
|
|
||||
23 | # Implicit string concatenation
|
||||
24 | "0.0.0.0" f"0.0.0.0{expr}0.0.0.0"
|
||||
| ^^^^^^^ S104
|
||||
| ^^^^^^^
|
||||
25 |
|
||||
26 | # t-strings - all ok
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,395 +1,436 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
---
|
||||
S105.py:13:12: S105 Possible hardcoded password assigned to: "password"
|
||||
S105 Possible hardcoded password assigned to: "password"
|
||||
--> S105.py:13:12
|
||||
|
|
||||
12 | # Errors
|
||||
13 | password = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
14 | _pass = "s3cr3t"
|
||||
15 | passwd = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:14:9: S105 Possible hardcoded password assigned to: "_pass"
|
||||
S105 Possible hardcoded password assigned to: "_pass"
|
||||
--> S105.py:14:9
|
||||
|
|
||||
12 | # Errors
|
||||
13 | password = "s3cr3t"
|
||||
14 | _pass = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
15 | passwd = "s3cr3t"
|
||||
16 | pwd = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:15:10: S105 Possible hardcoded password assigned to: "passwd"
|
||||
S105 Possible hardcoded password assigned to: "passwd"
|
||||
--> S105.py:15:10
|
||||
|
|
||||
13 | password = "s3cr3t"
|
||||
14 | _pass = "s3cr3t"
|
||||
15 | passwd = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
16 | pwd = "s3cr3t"
|
||||
17 | secret = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:16:7: S105 Possible hardcoded password assigned to: "pwd"
|
||||
S105 Possible hardcoded password assigned to: "pwd"
|
||||
--> S105.py:16:7
|
||||
|
|
||||
14 | _pass = "s3cr3t"
|
||||
15 | passwd = "s3cr3t"
|
||||
16 | pwd = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
17 | secret = "s3cr3t"
|
||||
18 | token = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:17:10: S105 Possible hardcoded password assigned to: "secret"
|
||||
S105 Possible hardcoded password assigned to: "secret"
|
||||
--> S105.py:17:10
|
||||
|
|
||||
15 | passwd = "s3cr3t"
|
||||
16 | pwd = "s3cr3t"
|
||||
17 | secret = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
18 | token = "s3cr3t"
|
||||
19 | secrete = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:18:9: S105 Possible hardcoded password assigned to: "token"
|
||||
S105 Possible hardcoded password assigned to: "token"
|
||||
--> S105.py:18:9
|
||||
|
|
||||
16 | pwd = "s3cr3t"
|
||||
17 | secret = "s3cr3t"
|
||||
18 | token = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
19 | secrete = "s3cr3t"
|
||||
20 | safe = password = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:19:11: S105 Possible hardcoded password assigned to: "secrete"
|
||||
S105 Possible hardcoded password assigned to: "secrete"
|
||||
--> S105.py:19:11
|
||||
|
|
||||
17 | secret = "s3cr3t"
|
||||
18 | token = "s3cr3t"
|
||||
19 | secrete = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
20 | safe = password = "s3cr3t"
|
||||
21 | password = safe = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:20:19: S105 Possible hardcoded password assigned to: "password"
|
||||
S105 Possible hardcoded password assigned to: "password"
|
||||
--> S105.py:20:19
|
||||
|
|
||||
18 | token = "s3cr3t"
|
||||
19 | secrete = "s3cr3t"
|
||||
20 | safe = password = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
21 | password = safe = "s3cr3t"
|
||||
22 | PASSWORD = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:21:19: S105 Possible hardcoded password assigned to: "password"
|
||||
S105 Possible hardcoded password assigned to: "password"
|
||||
--> S105.py:21:19
|
||||
|
|
||||
19 | secrete = "s3cr3t"
|
||||
20 | safe = password = "s3cr3t"
|
||||
21 | password = safe = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
22 | PASSWORD = "s3cr3t"
|
||||
23 | PassWord = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:22:12: S105 Possible hardcoded password assigned to: "PASSWORD"
|
||||
S105 Possible hardcoded password assigned to: "PASSWORD"
|
||||
--> S105.py:22:12
|
||||
|
|
||||
20 | safe = password = "s3cr3t"
|
||||
21 | password = safe = "s3cr3t"
|
||||
22 | PASSWORD = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
23 | PassWord = "s3cr3t"
|
||||
24 | password: str = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:23:12: S105 Possible hardcoded password assigned to: "PassWord"
|
||||
S105 Possible hardcoded password assigned to: "PassWord"
|
||||
--> S105.py:23:12
|
||||
|
|
||||
21 | password = safe = "s3cr3t"
|
||||
22 | PASSWORD = "s3cr3t"
|
||||
23 | PassWord = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
24 | password: str = "s3cr3t"
|
||||
25 | password: Final = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:24:17: S105 Possible hardcoded password assigned to: "password"
|
||||
S105 Possible hardcoded password assigned to: "password"
|
||||
--> S105.py:24:17
|
||||
|
|
||||
22 | PASSWORD = "s3cr3t"
|
||||
23 | PassWord = "s3cr3t"
|
||||
24 | password: str = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
25 | password: Final = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:25:19: S105 Possible hardcoded password assigned to: "password"
|
||||
S105 Possible hardcoded password assigned to: "password"
|
||||
--> S105.py:25:19
|
||||
|
|
||||
23 | PassWord = "s3cr3t"
|
||||
24 | password: str = "s3cr3t"
|
||||
25 | password: Final = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
26 |
|
||||
27 | d["password"] = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:27:17: S105 Possible hardcoded password assigned to: "password"
|
||||
S105 Possible hardcoded password assigned to: "password"
|
||||
--> S105.py:27:17
|
||||
|
|
||||
25 | password: Final = "s3cr3t"
|
||||
26 |
|
||||
27 | d["password"] = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
28 | d["pass"] = "s3cr3t"
|
||||
29 | d["passwd"] = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:28:13: S105 Possible hardcoded password assigned to: "pass"
|
||||
S105 Possible hardcoded password assigned to: "pass"
|
||||
--> S105.py:28:13
|
||||
|
|
||||
27 | d["password"] = "s3cr3t"
|
||||
28 | d["pass"] = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
29 | d["passwd"] = "s3cr3t"
|
||||
30 | d["pwd"] = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:29:15: S105 Possible hardcoded password assigned to: "passwd"
|
||||
S105 Possible hardcoded password assigned to: "passwd"
|
||||
--> S105.py:29:15
|
||||
|
|
||||
27 | d["password"] = "s3cr3t"
|
||||
28 | d["pass"] = "s3cr3t"
|
||||
29 | d["passwd"] = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
30 | d["pwd"] = "s3cr3t"
|
||||
31 | d["secret"] = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:30:12: S105 Possible hardcoded password assigned to: "pwd"
|
||||
S105 Possible hardcoded password assigned to: "pwd"
|
||||
--> S105.py:30:12
|
||||
|
|
||||
28 | d["pass"] = "s3cr3t"
|
||||
29 | d["passwd"] = "s3cr3t"
|
||||
30 | d["pwd"] = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
31 | d["secret"] = "s3cr3t"
|
||||
32 | d["token"] = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:31:15: S105 Possible hardcoded password assigned to: "secret"
|
||||
S105 Possible hardcoded password assigned to: "secret"
|
||||
--> S105.py:31:15
|
||||
|
|
||||
29 | d["passwd"] = "s3cr3t"
|
||||
30 | d["pwd"] = "s3cr3t"
|
||||
31 | d["secret"] = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
32 | d["token"] = "s3cr3t"
|
||||
33 | d["secrete"] = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:32:14: S105 Possible hardcoded password assigned to: "token"
|
||||
S105 Possible hardcoded password assigned to: "token"
|
||||
--> S105.py:32:14
|
||||
|
|
||||
30 | d["pwd"] = "s3cr3t"
|
||||
31 | d["secret"] = "s3cr3t"
|
||||
32 | d["token"] = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
33 | d["secrete"] = "s3cr3t"
|
||||
34 | safe = d["password"] = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:33:16: S105 Possible hardcoded password assigned to: "secrete"
|
||||
S105 Possible hardcoded password assigned to: "secrete"
|
||||
--> S105.py:33:16
|
||||
|
|
||||
31 | d["secret"] = "s3cr3t"
|
||||
32 | d["token"] = "s3cr3t"
|
||||
33 | d["secrete"] = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
34 | safe = d["password"] = "s3cr3t"
|
||||
35 | d["password"] = safe = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:34:24: S105 Possible hardcoded password assigned to: "password"
|
||||
S105 Possible hardcoded password assigned to: "password"
|
||||
--> S105.py:34:24
|
||||
|
|
||||
32 | d["token"] = "s3cr3t"
|
||||
33 | d["secrete"] = "s3cr3t"
|
||||
34 | safe = d["password"] = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
35 | d["password"] = safe = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:35:24: S105 Possible hardcoded password assigned to: "password"
|
||||
S105 Possible hardcoded password assigned to: "password"
|
||||
--> S105.py:35:24
|
||||
|
|
||||
33 | d["secrete"] = "s3cr3t"
|
||||
34 | safe = d["password"] = "s3cr3t"
|
||||
35 | d["password"] = safe = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
|
|
||||
|
||||
S105.py:39:16: S105 Possible hardcoded password assigned to: "password"
|
||||
S105 Possible hardcoded password assigned to: "password"
|
||||
--> S105.py:39:16
|
||||
|
|
||||
38 | class MyClass:
|
||||
39 | password = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
40 | safe = password
|
||||
|
|
||||
|
||||
S105.py:43:20: S105 Possible hardcoded password assigned to: "password"
|
||||
S105 Possible hardcoded password assigned to: "password"
|
||||
--> S105.py:43:20
|
||||
|
|
||||
43 | MyClass.password = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
44 | MyClass._pass = "s3cr3t"
|
||||
45 | MyClass.passwd = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:44:17: S105 Possible hardcoded password assigned to: "_pass"
|
||||
S105 Possible hardcoded password assigned to: "_pass"
|
||||
--> S105.py:44:17
|
||||
|
|
||||
43 | MyClass.password = "s3cr3t"
|
||||
44 | MyClass._pass = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
45 | MyClass.passwd = "s3cr3t"
|
||||
46 | MyClass.pwd = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:45:18: S105 Possible hardcoded password assigned to: "passwd"
|
||||
S105 Possible hardcoded password assigned to: "passwd"
|
||||
--> S105.py:45:18
|
||||
|
|
||||
43 | MyClass.password = "s3cr3t"
|
||||
44 | MyClass._pass = "s3cr3t"
|
||||
45 | MyClass.passwd = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
46 | MyClass.pwd = "s3cr3t"
|
||||
47 | MyClass.secret = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:46:15: S105 Possible hardcoded password assigned to: "pwd"
|
||||
S105 Possible hardcoded password assigned to: "pwd"
|
||||
--> S105.py:46:15
|
||||
|
|
||||
44 | MyClass._pass = "s3cr3t"
|
||||
45 | MyClass.passwd = "s3cr3t"
|
||||
46 | MyClass.pwd = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
47 | MyClass.secret = "s3cr3t"
|
||||
48 | MyClass.token = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:47:18: S105 Possible hardcoded password assigned to: "secret"
|
||||
S105 Possible hardcoded password assigned to: "secret"
|
||||
--> S105.py:47:18
|
||||
|
|
||||
45 | MyClass.passwd = "s3cr3t"
|
||||
46 | MyClass.pwd = "s3cr3t"
|
||||
47 | MyClass.secret = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
48 | MyClass.token = "s3cr3t"
|
||||
49 | MyClass.secrete = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:48:17: S105 Possible hardcoded password assigned to: "token"
|
||||
S105 Possible hardcoded password assigned to: "token"
|
||||
--> S105.py:48:17
|
||||
|
|
||||
46 | MyClass.pwd = "s3cr3t"
|
||||
47 | MyClass.secret = "s3cr3t"
|
||||
48 | MyClass.token = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
49 | MyClass.secrete = "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:49:19: S105 Possible hardcoded password assigned to: "secrete"
|
||||
S105 Possible hardcoded password assigned to: "secrete"
|
||||
--> S105.py:49:19
|
||||
|
|
||||
47 | MyClass.secret = "s3cr3t"
|
||||
48 | MyClass.token = "s3cr3t"
|
||||
49 | MyClass.secrete = "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
50 |
|
||||
51 | password == "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:51:13: S105 Possible hardcoded password assigned to: "password"
|
||||
S105 Possible hardcoded password assigned to: "password"
|
||||
--> S105.py:51:13
|
||||
|
|
||||
49 | MyClass.secrete = "s3cr3t"
|
||||
50 |
|
||||
51 | password == "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
52 | _pass == "s3cr3t"
|
||||
53 | passwd == "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:52:10: S105 Possible hardcoded password assigned to: "_pass"
|
||||
S105 Possible hardcoded password assigned to: "_pass"
|
||||
--> S105.py:52:10
|
||||
|
|
||||
51 | password == "s3cr3t"
|
||||
52 | _pass == "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
53 | passwd == "s3cr3t"
|
||||
54 | pwd == "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:53:11: S105 Possible hardcoded password assigned to: "passwd"
|
||||
S105 Possible hardcoded password assigned to: "passwd"
|
||||
--> S105.py:53:11
|
||||
|
|
||||
51 | password == "s3cr3t"
|
||||
52 | _pass == "s3cr3t"
|
||||
53 | passwd == "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
54 | pwd == "s3cr3t"
|
||||
55 | secret == "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:54:8: S105 Possible hardcoded password assigned to: "pwd"
|
||||
S105 Possible hardcoded password assigned to: "pwd"
|
||||
--> S105.py:54:8
|
||||
|
|
||||
52 | _pass == "s3cr3t"
|
||||
53 | passwd == "s3cr3t"
|
||||
54 | pwd == "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
55 | secret == "s3cr3t"
|
||||
56 | token == "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:55:11: S105 Possible hardcoded password assigned to: "secret"
|
||||
S105 Possible hardcoded password assigned to: "secret"
|
||||
--> S105.py:55:11
|
||||
|
|
||||
53 | passwd == "s3cr3t"
|
||||
54 | pwd == "s3cr3t"
|
||||
55 | secret == "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
56 | token == "s3cr3t"
|
||||
57 | secrete == "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:56:10: S105 Possible hardcoded password assigned to: "token"
|
||||
S105 Possible hardcoded password assigned to: "token"
|
||||
--> S105.py:56:10
|
||||
|
|
||||
54 | pwd == "s3cr3t"
|
||||
55 | secret == "s3cr3t"
|
||||
56 | token == "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
57 | secrete == "s3cr3t"
|
||||
58 | password == safe == "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:57:12: S105 Possible hardcoded password assigned to: "secrete"
|
||||
S105 Possible hardcoded password assigned to: "secrete"
|
||||
--> S105.py:57:12
|
||||
|
|
||||
55 | secret == "s3cr3t"
|
||||
56 | token == "s3cr3t"
|
||||
57 | secrete == "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
58 | password == safe == "s3cr3t"
|
||||
|
|
||||
|
||||
S105.py:58:21: S105 Possible hardcoded password assigned to: "password"
|
||||
S105 Possible hardcoded password assigned to: "password"
|
||||
--> S105.py:58:21
|
||||
|
|
||||
56 | token == "s3cr3t"
|
||||
57 | secrete == "s3cr3t"
|
||||
58 | password == safe == "s3cr3t"
|
||||
| ^^^^^^^^ S105
|
||||
| ^^^^^^^^
|
||||
59 |
|
||||
60 | if token == "1\n2":
|
||||
|
|
||||
|
||||
S105.py:60:13: S105 Possible hardcoded password assigned to: "token"
|
||||
S105 Possible hardcoded password assigned to: "token"
|
||||
--> S105.py:60:13
|
||||
|
|
||||
58 | password == safe == "s3cr3t"
|
||||
59 |
|
||||
60 | if token == "1\n2":
|
||||
| ^^^^^^ S105
|
||||
| ^^^^^^
|
||||
61 | pass
|
||||
|
|
||||
|
||||
S105.py:63:13: S105 Possible hardcoded password assigned to: "token"
|
||||
S105 Possible hardcoded password assigned to: "token"
|
||||
--> S105.py:63:13
|
||||
|
|
||||
61 | pass
|
||||
62 |
|
||||
63 | if token == "3\t4":
|
||||
| ^^^^^^ S105
|
||||
| ^^^^^^
|
||||
64 | pass
|
||||
|
|
||||
|
||||
S105.py:66:13: S105 Possible hardcoded password assigned to: "token"
|
||||
S105 Possible hardcoded password assigned to: "token"
|
||||
--> S105.py:66:13
|
||||
|
|
||||
64 | pass
|
||||
65 |
|
||||
66 | if token == "5\r6":
|
||||
| ^^^^^^ S105
|
||||
| ^^^^^^
|
||||
67 | pass
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
S106.py:14:9: S106 Possible hardcoded password assigned to argument: "password"
|
||||
S106 Possible hardcoded password assigned to argument: "password"
|
||||
--> S106.py:14:9
|
||||
|
|
||||
13 | # Error
|
||||
14 | func(1, password="s3cr3t")
|
||||
| ^^^^^^^^^^^^^^^^^ S106
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,38 +1,42 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
snapshot_kind: text
|
||||
---
|
||||
S107.py:5:29: S107 Possible hardcoded password assigned to function default: "password"
|
||||
S107 Possible hardcoded password assigned to function default: "password"
|
||||
--> S107.py:5:29
|
||||
|
|
||||
5 | def default(first, password="default"):
|
||||
| ^^^^^^^^^ S107
|
||||
| ^^^^^^^^^
|
||||
6 | pass
|
||||
|
|
||||
|
||||
S107.py:13:45: S107 Possible hardcoded password assigned to function default: "password"
|
||||
S107 Possible hardcoded password assigned to function default: "password"
|
||||
--> S107.py:13:45
|
||||
|
|
||||
13 | def default_posonly(first, /, pos, password="posonly"):
|
||||
| ^^^^^^^^^ S107
|
||||
| ^^^^^^^^^
|
||||
14 | pass
|
||||
|
|
||||
|
||||
S107.py:21:39: S107 Possible hardcoded password assigned to function default: "password"
|
||||
S107 Possible hardcoded password assigned to function default: "password"
|
||||
--> S107.py:21:39
|
||||
|
|
||||
21 | def default_kwonly(first, *, password="kwonly"):
|
||||
| ^^^^^^^^ S107
|
||||
| ^^^^^^^^
|
||||
22 | pass
|
||||
|
|
||||
|
||||
S107.py:29:39: S107 Possible hardcoded password assigned to function default: "secret"
|
||||
S107 Possible hardcoded password assigned to function default: "secret"
|
||||
--> S107.py:29:39
|
||||
|
|
||||
29 | def default_all(first, /, pos, secret="posonly", *, password="kwonly"):
|
||||
| ^^^^^^^^^ S107
|
||||
| ^^^^^^^^^
|
||||
30 | pass
|
||||
|
|
||||
|
||||
S107.py:29:62: S107 Possible hardcoded password assigned to function default: "password"
|
||||
S107 Possible hardcoded password assigned to function default: "password"
|
||||
--> S107.py:29:62
|
||||
|
|
||||
29 | def default_all(first, /, pos, secret="posonly", *, password="kwonly"):
|
||||
| ^^^^^^^^ S107
|
||||
| ^^^^^^^^
|
||||
30 | pass
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,64 +1,71 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
---
|
||||
S108.py:5:11: S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
--> S108.py:5:11
|
||||
|
|
||||
3 | f.write("def")
|
||||
4 |
|
||||
5 | with open("/tmp/abc", "w") as f:
|
||||
| ^^^^^^^^^^ S108
|
||||
| ^^^^^^^^^^
|
||||
6 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:8:13: S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
--> S108.py:8:13
|
||||
|
|
||||
6 | f.write("def")
|
||||
7 |
|
||||
8 | with open(f"/tmp/abc", "w") as f:
|
||||
| ^^^^^^^^ S108
|
||||
| ^^^^^^^^
|
||||
9 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:11:11: S108 Probable insecure usage of temporary file or directory: "/var/tmp/123"
|
||||
S108 Probable insecure usage of temporary file or directory: "/var/tmp/123"
|
||||
--> S108.py:11:11
|
||||
|
|
||||
9 | f.write("def")
|
||||
10 |
|
||||
11 | with open("/var/tmp/123", "w") as f:
|
||||
| ^^^^^^^^^^^^^^ S108
|
||||
| ^^^^^^^^^^^^^^
|
||||
12 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:14:11: S108 Probable insecure usage of temporary file or directory: "/dev/shm/unit/test"
|
||||
S108 Probable insecure usage of temporary file or directory: "/dev/shm/unit/test"
|
||||
--> S108.py:14:11
|
||||
|
|
||||
12 | f.write("def")
|
||||
13 |
|
||||
14 | with open("/dev/shm/unit/test", "w") as f:
|
||||
| ^^^^^^^^^^^^^^^^^^^^ S108
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
15 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:22:11: S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
--> S108.py:22:11
|
||||
|
|
||||
21 | # Implicit string concatenation
|
||||
22 | with open("/tmp/" "abc", "w") as f:
|
||||
| ^^^^^^^^^^^^^ S108
|
||||
| ^^^^^^^^^^^^^
|
||||
23 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:25:11: S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
--> S108.py:25:11
|
||||
|
|
||||
23 | f.write("def")
|
||||
24 |
|
||||
25 | with open("/tmp/abc" f"/tmp/abc", "w") as f:
|
||||
| ^^^^^^^^^^ S108
|
||||
| ^^^^^^^^^^
|
||||
26 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:25:24: S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
--> S108.py:25:24
|
||||
|
|
||||
23 | f.write("def")
|
||||
24 |
|
||||
25 | with open("/tmp/abc" f"/tmp/abc", "w") as f:
|
||||
| ^^^^^^^^ S108
|
||||
| ^^^^^^^^
|
||||
26 | f.write("def")
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,72 +1,80 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
---
|
||||
S108.py:5:11: S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
--> S108.py:5:11
|
||||
|
|
||||
3 | f.write("def")
|
||||
4 |
|
||||
5 | with open("/tmp/abc", "w") as f:
|
||||
| ^^^^^^^^^^ S108
|
||||
| ^^^^^^^^^^
|
||||
6 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:8:13: S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
--> S108.py:8:13
|
||||
|
|
||||
6 | f.write("def")
|
||||
7 |
|
||||
8 | with open(f"/tmp/abc", "w") as f:
|
||||
| ^^^^^^^^ S108
|
||||
| ^^^^^^^^
|
||||
9 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:11:11: S108 Probable insecure usage of temporary file or directory: "/var/tmp/123"
|
||||
S108 Probable insecure usage of temporary file or directory: "/var/tmp/123"
|
||||
--> S108.py:11:11
|
||||
|
|
||||
9 | f.write("def")
|
||||
10 |
|
||||
11 | with open("/var/tmp/123", "w") as f:
|
||||
| ^^^^^^^^^^^^^^ S108
|
||||
| ^^^^^^^^^^^^^^
|
||||
12 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:14:11: S108 Probable insecure usage of temporary file or directory: "/dev/shm/unit/test"
|
||||
S108 Probable insecure usage of temporary file or directory: "/dev/shm/unit/test"
|
||||
--> S108.py:14:11
|
||||
|
|
||||
12 | f.write("def")
|
||||
13 |
|
||||
14 | with open("/dev/shm/unit/test", "w") as f:
|
||||
| ^^^^^^^^^^^^^^^^^^^^ S108
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
15 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:18:11: S108 Probable insecure usage of temporary file or directory: "/foo/bar"
|
||||
S108 Probable insecure usage of temporary file or directory: "/foo/bar"
|
||||
--> S108.py:18:11
|
||||
|
|
||||
17 | # not ok by config
|
||||
18 | with open("/foo/bar", "w") as f:
|
||||
| ^^^^^^^^^^ S108
|
||||
| ^^^^^^^^^^
|
||||
19 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:22:11: S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
--> S108.py:22:11
|
||||
|
|
||||
21 | # Implicit string concatenation
|
||||
22 | with open("/tmp/" "abc", "w") as f:
|
||||
| ^^^^^^^^^^^^^ S108
|
||||
| ^^^^^^^^^^^^^
|
||||
23 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:25:11: S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
--> S108.py:25:11
|
||||
|
|
||||
23 | f.write("def")
|
||||
24 |
|
||||
25 | with open("/tmp/abc" f"/tmp/abc", "w") as f:
|
||||
| ^^^^^^^^^^ S108
|
||||
| ^^^^^^^^^^
|
||||
26 | f.write("def")
|
||||
|
|
||||
|
||||
S108.py:25:24: S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
S108 Probable insecure usage of temporary file or directory: "/tmp/abc"
|
||||
--> S108.py:25:24
|
||||
|
|
||||
23 | f.write("def")
|
||||
24 |
|
||||
25 | with open("/tmp/abc" f"/tmp/abc", "w") as f:
|
||||
| ^^^^^^^^ S108
|
||||
| ^^^^^^^^
|
||||
26 | f.write("def")
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,24 +1,26 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
---
|
||||
S110.py:3:1: S110 `try`-`except`-`pass` detected, consider logging the exception
|
||||
S110 `try`-`except`-`pass` detected, consider logging the exception
|
||||
--> S110.py:3:1
|
||||
|
|
||||
1 | try:
|
||||
2 | pass
|
||||
3 | / except Exception:
|
||||
4 | | pass
|
||||
| |________^ S110
|
||||
| |________^
|
||||
5 |
|
||||
6 | try:
|
||||
|
|
||||
|
||||
S110.py:8:1: S110 `try`-`except`-`pass` detected, consider logging the exception
|
||||
S110 `try`-`except`-`pass` detected, consider logging the exception
|
||||
--> S110.py:8:1
|
||||
|
|
||||
6 | try:
|
||||
7 | pass
|
||||
8 | / except:
|
||||
9 | | pass
|
||||
| |________^ S110
|
||||
| |________^
|
||||
10 |
|
||||
11 | try:
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,33 +1,36 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
---
|
||||
S110.py:3:1: S110 `try`-`except`-`pass` detected, consider logging the exception
|
||||
S110 `try`-`except`-`pass` detected, consider logging the exception
|
||||
--> S110.py:3:1
|
||||
|
|
||||
1 | try:
|
||||
2 | pass
|
||||
3 | / except Exception:
|
||||
4 | | pass
|
||||
| |________^ S110
|
||||
| |________^
|
||||
5 |
|
||||
6 | try:
|
||||
|
|
||||
|
||||
S110.py:8:1: S110 `try`-`except`-`pass` detected, consider logging the exception
|
||||
S110 `try`-`except`-`pass` detected, consider logging the exception
|
||||
--> S110.py:8:1
|
||||
|
|
||||
6 | try:
|
||||
7 | pass
|
||||
8 | / except:
|
||||
9 | | pass
|
||||
| |________^ S110
|
||||
| |________^
|
||||
10 |
|
||||
11 | try:
|
||||
|
|
||||
|
||||
S110.py:13:1: S110 `try`-`except`-`pass` detected, consider logging the exception
|
||||
S110 `try`-`except`-`pass` detected, consider logging the exception
|
||||
--> S110.py:13:1
|
||||
|
|
||||
11 | try:
|
||||
12 | pass
|
||||
13 | / except ValueError:
|
||||
14 | | pass
|
||||
| |________^ S110
|
||||
| |________^
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,46 +1,50 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
---
|
||||
S112.py:4:5: S112 `try`-`except`-`continue` detected, consider logging the exception
|
||||
S112 `try`-`except`-`continue` detected, consider logging the exception
|
||||
--> S112.py:4:5
|
||||
|
|
||||
2 | try:
|
||||
3 | pass
|
||||
4 | / except Exception:
|
||||
5 | | continue
|
||||
| |________________^ S112
|
||||
| |________________^
|
||||
6 |
|
||||
7 | try:
|
||||
|
|
||||
|
||||
S112.py:9:5: S112 `try`-`except`-`continue` detected, consider logging the exception
|
||||
S112 `try`-`except`-`continue` detected, consider logging the exception
|
||||
--> S112.py:9:5
|
||||
|
|
||||
7 | try:
|
||||
8 | pass
|
||||
9 | / except:
|
||||
10 | | continue
|
||||
| |________________^ S112
|
||||
| |________________^
|
||||
11 |
|
||||
12 | try:
|
||||
|
|
||||
|
||||
S112.py:14:5: S112 `try`-`except`-`continue` detected, consider logging the exception
|
||||
S112 `try`-`except`-`continue` detected, consider logging the exception
|
||||
--> S112.py:14:5
|
||||
|
|
||||
12 | try:
|
||||
13 | pass
|
||||
14 | / except (Exception,):
|
||||
15 | | continue
|
||||
| |________________^ S112
|
||||
| |________________^
|
||||
16 |
|
||||
17 | try:
|
||||
|
|
||||
|
||||
S112.py:19:5: S112 `try`-`except`-`continue` detected, consider logging the exception
|
||||
S112 `try`-`except`-`continue` detected, consider logging the exception
|
||||
--> S112.py:19:5
|
||||
|
|
||||
17 | try:
|
||||
18 | pass
|
||||
19 | / except (Exception, ValueError):
|
||||
20 | | continue
|
||||
| |________________^ S112
|
||||
| |________________^
|
||||
21 |
|
||||
22 | try:
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,237 +1,261 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
---
|
||||
S113.py:46:1: S113 Probable use of `requests` call without timeout
|
||||
S113 Probable use of `requests` call without timeout
|
||||
--> S113.py:46:1
|
||||
|
|
||||
45 | # Errors
|
||||
46 | requests.get('https://gmail.com')
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
47 | requests.get('https://gmail.com', timeout=None)
|
||||
48 | requests.post('https://gmail.com')
|
||||
|
|
||||
|
||||
S113.py:47:35: S113 Probable use of `requests` call with timeout set to `None`
|
||||
S113 Probable use of `requests` call with timeout set to `None`
|
||||
--> S113.py:47:35
|
||||
|
|
||||
45 | # Errors
|
||||
46 | requests.get('https://gmail.com')
|
||||
47 | requests.get('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
48 | requests.post('https://gmail.com')
|
||||
49 | requests.post('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:48:1: S113 Probable use of `requests` call without timeout
|
||||
S113 Probable use of `requests` call without timeout
|
||||
--> S113.py:48:1
|
||||
|
|
||||
46 | requests.get('https://gmail.com')
|
||||
47 | requests.get('https://gmail.com', timeout=None)
|
||||
48 | requests.post('https://gmail.com')
|
||||
| ^^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^^
|
||||
49 | requests.post('https://gmail.com', timeout=None)
|
||||
50 | requests.put('https://gmail.com')
|
||||
|
|
||||
|
||||
S113.py:49:36: S113 Probable use of `requests` call with timeout set to `None`
|
||||
S113 Probable use of `requests` call with timeout set to `None`
|
||||
--> S113.py:49:36
|
||||
|
|
||||
47 | requests.get('https://gmail.com', timeout=None)
|
||||
48 | requests.post('https://gmail.com')
|
||||
49 | requests.post('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
50 | requests.put('https://gmail.com')
|
||||
51 | requests.put('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:50:1: S113 Probable use of `requests` call without timeout
|
||||
S113 Probable use of `requests` call without timeout
|
||||
--> S113.py:50:1
|
||||
|
|
||||
48 | requests.post('https://gmail.com')
|
||||
49 | requests.post('https://gmail.com', timeout=None)
|
||||
50 | requests.put('https://gmail.com')
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
51 | requests.put('https://gmail.com', timeout=None)
|
||||
52 | requests.delete('https://gmail.com')
|
||||
|
|
||||
|
||||
S113.py:51:35: S113 Probable use of `requests` call with timeout set to `None`
|
||||
S113 Probable use of `requests` call with timeout set to `None`
|
||||
--> S113.py:51:35
|
||||
|
|
||||
49 | requests.post('https://gmail.com', timeout=None)
|
||||
50 | requests.put('https://gmail.com')
|
||||
51 | requests.put('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
52 | requests.delete('https://gmail.com')
|
||||
53 | requests.delete('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:52:1: S113 Probable use of `requests` call without timeout
|
||||
S113 Probable use of `requests` call without timeout
|
||||
--> S113.py:52:1
|
||||
|
|
||||
50 | requests.put('https://gmail.com')
|
||||
51 | requests.put('https://gmail.com', timeout=None)
|
||||
52 | requests.delete('https://gmail.com')
|
||||
| ^^^^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^^^^
|
||||
53 | requests.delete('https://gmail.com', timeout=None)
|
||||
54 | requests.patch('https://gmail.com')
|
||||
|
|
||||
|
||||
S113.py:53:38: S113 Probable use of `requests` call with timeout set to `None`
|
||||
S113 Probable use of `requests` call with timeout set to `None`
|
||||
--> S113.py:53:38
|
||||
|
|
||||
51 | requests.put('https://gmail.com', timeout=None)
|
||||
52 | requests.delete('https://gmail.com')
|
||||
53 | requests.delete('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
54 | requests.patch('https://gmail.com')
|
||||
55 | requests.patch('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:54:1: S113 Probable use of `requests` call without timeout
|
||||
S113 Probable use of `requests` call without timeout
|
||||
--> S113.py:54:1
|
||||
|
|
||||
52 | requests.delete('https://gmail.com')
|
||||
53 | requests.delete('https://gmail.com', timeout=None)
|
||||
54 | requests.patch('https://gmail.com')
|
||||
| ^^^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^^^
|
||||
55 | requests.patch('https://gmail.com', timeout=None)
|
||||
56 | requests.options('https://gmail.com')
|
||||
|
|
||||
|
||||
S113.py:55:37: S113 Probable use of `requests` call with timeout set to `None`
|
||||
S113 Probable use of `requests` call with timeout set to `None`
|
||||
--> S113.py:55:37
|
||||
|
|
||||
53 | requests.delete('https://gmail.com', timeout=None)
|
||||
54 | requests.patch('https://gmail.com')
|
||||
55 | requests.patch('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
56 | requests.options('https://gmail.com')
|
||||
57 | requests.options('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:56:1: S113 Probable use of `requests` call without timeout
|
||||
S113 Probable use of `requests` call without timeout
|
||||
--> S113.py:56:1
|
||||
|
|
||||
54 | requests.patch('https://gmail.com')
|
||||
55 | requests.patch('https://gmail.com', timeout=None)
|
||||
56 | requests.options('https://gmail.com')
|
||||
| ^^^^^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
57 | requests.options('https://gmail.com', timeout=None)
|
||||
58 | requests.head('https://gmail.com')
|
||||
|
|
||||
|
||||
S113.py:57:39: S113 Probable use of `requests` call with timeout set to `None`
|
||||
S113 Probable use of `requests` call with timeout set to `None`
|
||||
--> S113.py:57:39
|
||||
|
|
||||
55 | requests.patch('https://gmail.com', timeout=None)
|
||||
56 | requests.options('https://gmail.com')
|
||||
57 | requests.options('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
58 | requests.head('https://gmail.com')
|
||||
59 | requests.head('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:58:1: S113 Probable use of `requests` call without timeout
|
||||
S113 Probable use of `requests` call without timeout
|
||||
--> S113.py:58:1
|
||||
|
|
||||
56 | requests.options('https://gmail.com')
|
||||
57 | requests.options('https://gmail.com', timeout=None)
|
||||
58 | requests.head('https://gmail.com')
|
||||
| ^^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^^
|
||||
59 | requests.head('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:59:36: S113 Probable use of `requests` call with timeout set to `None`
|
||||
S113 Probable use of `requests` call with timeout set to `None`
|
||||
--> S113.py:59:36
|
||||
|
|
||||
57 | requests.options('https://gmail.com', timeout=None)
|
||||
58 | requests.head('https://gmail.com')
|
||||
59 | requests.head('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
60 |
|
||||
61 | httpx.get('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:61:32: S113 Probable use of `httpx` call with timeout set to `None`
|
||||
S113 Probable use of `httpx` call with timeout set to `None`
|
||||
--> S113.py:61:32
|
||||
|
|
||||
59 | requests.head('https://gmail.com', timeout=None)
|
||||
60 |
|
||||
61 | httpx.get('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
62 | httpx.post('https://gmail.com', timeout=None)
|
||||
63 | httpx.put('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:62:33: S113 Probable use of `httpx` call with timeout set to `None`
|
||||
S113 Probable use of `httpx` call with timeout set to `None`
|
||||
--> S113.py:62:33
|
||||
|
|
||||
61 | httpx.get('https://gmail.com', timeout=None)
|
||||
62 | httpx.post('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
63 | httpx.put('https://gmail.com', timeout=None)
|
||||
64 | httpx.delete('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:63:32: S113 Probable use of `httpx` call with timeout set to `None`
|
||||
S113 Probable use of `httpx` call with timeout set to `None`
|
||||
--> S113.py:63:32
|
||||
|
|
||||
61 | httpx.get('https://gmail.com', timeout=None)
|
||||
62 | httpx.post('https://gmail.com', timeout=None)
|
||||
63 | httpx.put('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
64 | httpx.delete('https://gmail.com', timeout=None)
|
||||
65 | httpx.patch('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:64:35: S113 Probable use of `httpx` call with timeout set to `None`
|
||||
S113 Probable use of `httpx` call with timeout set to `None`
|
||||
--> S113.py:64:35
|
||||
|
|
||||
62 | httpx.post('https://gmail.com', timeout=None)
|
||||
63 | httpx.put('https://gmail.com', timeout=None)
|
||||
64 | httpx.delete('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
65 | httpx.patch('https://gmail.com', timeout=None)
|
||||
66 | httpx.options('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:65:34: S113 Probable use of `httpx` call with timeout set to `None`
|
||||
S113 Probable use of `httpx` call with timeout set to `None`
|
||||
--> S113.py:65:34
|
||||
|
|
||||
63 | httpx.put('https://gmail.com', timeout=None)
|
||||
64 | httpx.delete('https://gmail.com', timeout=None)
|
||||
65 | httpx.patch('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
66 | httpx.options('https://gmail.com', timeout=None)
|
||||
67 | httpx.head('https://gmail.com', timeout=None)
|
||||
|
|
||||
|
||||
S113.py:66:36: S113 Probable use of `httpx` call with timeout set to `None`
|
||||
S113 Probable use of `httpx` call with timeout set to `None`
|
||||
--> S113.py:66:36
|
||||
|
|
||||
64 | httpx.delete('https://gmail.com', timeout=None)
|
||||
65 | httpx.patch('https://gmail.com', timeout=None)
|
||||
66 | httpx.options('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
67 | httpx.head('https://gmail.com', timeout=None)
|
||||
68 | httpx.Client(timeout=None)
|
||||
|
|
||||
|
||||
S113.py:67:33: S113 Probable use of `httpx` call with timeout set to `None`
|
||||
S113 Probable use of `httpx` call with timeout set to `None`
|
||||
--> S113.py:67:33
|
||||
|
|
||||
65 | httpx.patch('https://gmail.com', timeout=None)
|
||||
66 | httpx.options('https://gmail.com', timeout=None)
|
||||
67 | httpx.head('https://gmail.com', timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
68 | httpx.Client(timeout=None)
|
||||
69 | httpx.AsyncClient(timeout=None)
|
||||
|
|
||||
|
||||
S113.py:68:14: S113 Probable use of `httpx` call with timeout set to `None`
|
||||
S113 Probable use of `httpx` call with timeout set to `None`
|
||||
--> S113.py:68:14
|
||||
|
|
||||
66 | httpx.options('https://gmail.com', timeout=None)
|
||||
67 | httpx.head('https://gmail.com', timeout=None)
|
||||
68 | httpx.Client(timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
69 | httpx.AsyncClient(timeout=None)
|
||||
|
|
||||
|
||||
S113.py:69:19: S113 Probable use of `httpx` call with timeout set to `None`
|
||||
S113 Probable use of `httpx` call with timeout set to `None`
|
||||
--> S113.py:69:19
|
||||
|
|
||||
67 | httpx.head('https://gmail.com', timeout=None)
|
||||
68 | httpx.Client(timeout=None)
|
||||
69 | httpx.AsyncClient(timeout=None)
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
70 |
|
||||
71 | with httpx.Client(timeout=None) as client:
|
||||
|
|
||||
|
||||
S113.py:71:19: S113 Probable use of `httpx` call with timeout set to `None`
|
||||
S113 Probable use of `httpx` call with timeout set to `None`
|
||||
--> S113.py:71:19
|
||||
|
|
||||
69 | httpx.AsyncClient(timeout=None)
|
||||
70 |
|
||||
71 | with httpx.Client(timeout=None) as client:
|
||||
| ^^^^^^^^^^^^ S113
|
||||
| ^^^^^^^^^^^^
|
||||
72 | client.get('https://gmail.com')
|
||||
|
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
---
|
||||
source: crates/ruff_linter/src/rules/flake8_bandit/mod.rs
|
||||
---
|
||||
S201.py:10:9: S201 Use of `debug=True` in Flask app detected
|
||||
S201 Use of `debug=True` in Flask app detected
|
||||
--> S201.py:10:9
|
||||
|
|
||||
9 | # OK
|
||||
10 | app.run(debug=True)
|
||||
| ^^^^^^^^^^ S201
|
||||
| ^^^^^^^^^^
|
||||
11 |
|
||||
12 | # Errors
|
||||
|
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue