Skip to content

Commit

Permalink
fix flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
orsinium committed Nov 18, 2021
1 parent 3fa57b1 commit c30eda6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deal/linter/_extractors/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _get_contracts(decorators: list) -> Iterator[ContractInfo]:
yield ContractInfo(
name=name.split('.')[-1],
args=[],
line=contract.lineno
line=contract.lineno,
)
if name == 'deal.inherit':
yield from _resolve_inherit(contract)
Expand Down
8 changes: 4 additions & 4 deletions tests/test_cli/test_decorate.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def f(x):
def f(x):
print(1/0)
return -1
"""
""",
),
(
['--types', 'raises', 'safe'],
Expand All @@ -43,7 +43,7 @@ def f(x):
def f(x):
print(1/0)
return -1
"""
""",
),
(
['--types', 'has', '--double-quotes'],
Expand All @@ -61,7 +61,7 @@ def f(x):
def f(x):
print(1/0)
return -1
"""
""",
),
(
[],
Expand All @@ -76,7 +76,7 @@ def f(x):
@deal.pure
def f(x):
return x
"""
""",
),
])
def test_decorate_command(flags: list, given: str, expected: str, tmp_path: Path):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_linter/test_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def test_transformer_raises(content: str, tmp_path: Path) -> None:
expected = dedent(expected)
tr = Transformer(
content=given,
path=tmp_path / "example.py",
path=tmp_path / 'example.py',
types={TransformationType.RAISES, TransformationType.SAFE},
)
actual = tr.transform()
Expand Down Expand Up @@ -340,7 +340,7 @@ def test_transformer_has(content: str, tmp_path: Path) -> None:
expected = dedent(expected)
tr = Transformer(
content=given,
path=tmp_path / "example.py",
path=tmp_path / 'example.py',
types={TransformationType.HAS},
)
actual = tr.transform()
Expand Down Expand Up @@ -460,7 +460,7 @@ def test_transformer_import(content: str, tmp_path: Path) -> None:
expected = dedent(expected)
tr = Transformer(
content=given,
path=tmp_path / "example.py",
path=tmp_path / 'example.py',
types={TransformationType.HAS, TransformationType.IMPORT},
)
actual = tr.transform()
Expand Down

0 comments on commit c30eda6

Please sign in to comment.