Improve exclusion syntax to match exact files (#209)

This commit is contained in:
Charlie Marsh
2022-09-15 21:40:49 -04:00
committed by GitHub
parent 6bbf3f46c4
commit 9d4a4478f7
13 changed files with 193 additions and 44 deletions

27
test/F823.py Normal file
View File

@@ -0,0 +1,27 @@
my_dict = {}
my_var = 0
def foo():
my_var += 1
def bar():
global my_var
my_var += 1
def baz():
global my_var
global my_dict
my_dict[my_var] += 1
def dec(x):
return x
@dec
def f():
dec = 1
return dec

9
test/directory/F706.py Normal file
View File

@@ -0,0 +1,9 @@
def f() -> int:
return 1
class Foo:
return 2
return 3

9
test/directory/F707.py Normal file
View File

@@ -0,0 +1,9 @@
def f() -> int:
return 1
class Foo:
return 2
return 3

9
test/ignore.py Normal file
View File

@@ -0,0 +1,9 @@
def f() -> int:
return 1
class Foo:
return 2
return 3

3
test/pyproject.toml Normal file
View File

@@ -0,0 +1,3 @@
[tool.ruff]
line-length = 88
extend-exclude = ["./directory/*"]