Skip to content

Commit 4e461ec

Browse files
committed
Replace pass with ellipsis.
1 parent 092e935 commit 4e461ec

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

tests/test_dispatch.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ def func(a: int, b: float = 0.0):
108108
@pytest.mark.benchmark
109109
def test_keywords():
110110
@multidispatch
111-
def func(arg):
112-
pass
111+
def func(arg): ...
113112

114113
@func.register
115114
def _(arg: int):

tests/test_docstring.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ def foo(bar: int):
66
"""
77
Argument is an integer
88
"""
9-
pass
9+
...
1010

1111

1212
@multimethod
1313
def foo(bar: str):
1414
"""
1515
Argument is a string
1616
"""
17-
pass
17+
...
1818

1919

2020
@foo.register
21-
def _(bar: float):
22-
pass
21+
def _(bar: float): ...
2322

2423

2524
def test_docstring():

tests/test_methods.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ def test_signature():
9191
assert signature([list]) <= signature([list[int]])
9292

9393

94-
class namespace:
95-
pass
94+
class namespace: ...
9695

9796

9897
class cls:

tests/test_subscripts.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,10 @@ def _(arg: type[list[str]]):
7070

7171

7272
def test_generic():
73-
class cls(Generic[TypeVar('T')]):
74-
pass
73+
class cls(Generic[TypeVar('T')]): ...
7574

7675
@multimethod
77-
def func(x: cls[int]):
78-
pass
76+
def func(x: cls[int]): ...
7977

8078
obj = cls[int]()
8179
assert isinstance(obj, subtype(cls[int]))

0 commit comments

Comments
 (0)