Skip to content

Commit

Permalink
Update info for new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Sep 25, 2023
1 parent d8df26e commit 6c86f28
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
@@ -1,5 +1,5 @@
# Docstring followed by whitespace with no newline
# Regression test for https://github.com/astral-sh/ruff/issues/7155
# Import followed by whitespace with no newline
# Same as B006_2.py, but import instead of docstring

def foobar(foor, bar={}):
import os
@@ -1,5 +1,5 @@
# Docstring with no newline

# Import with no newline
# Same as B006_3.py, but import instead of docstring

def foobar(foor, bar={}):
import os
Expand Up @@ -3,7 +3,7 @@ source: crates/ruff_linter/src/rules/flake8_bugbear/mod.rs
---
B006_6.py:4:22: B006 [*] Do not use mutable data structures for argument defaults
|
2 | # Regression test for https://github.com/astral-sh/ruff/issues/7155
2 | # Same as B006_2.py, but import instead of docstring
3 |
4 | def foobar(foor, bar={}):
| ^^ B006
Expand All @@ -12,8 +12,8 @@ B006_6.py:4:22: B006 [*] Do not use mutable data structures for argument default
= help: Replace with `None`; initialize within function

ℹ Possible fix
1 1 | # Docstring followed by whitespace with no newline
2 2 | # Regression test for https://github.com/astral-sh/ruff/issues/7155
1 1 | # Import followed by whitespace with no newline
2 2 | # Same as B006_2.py, but import instead of docstring
3 3 |
4 |-def foobar(foor, bar={}):
5 |- import os
Expand Down
Expand Up @@ -3,15 +3,17 @@ source: crates/ruff_linter/src/rules/flake8_bugbear/mod.rs
---
B006_7.py:4:22: B006 [*] Do not use mutable data structures for argument defaults
|
2 | # Same as B006_3.py, but import instead of docstring
3 |
4 | def foobar(foor, bar={}):
| ^^ B006
5 | import os
|
= help: Replace with `None`; initialize within function

ℹ Possible fix
1 1 | # Docstring with no newline
2 2 |
1 1 | # Import with no newline
2 2 | # Same as B006_3.py, but import instead of docstring
3 3 |
4 |-def foobar(foor, bar={}):
5 |- import os
Expand Down

0 comments on commit 6c86f28

Please sign in to comment.