Skip to content

Commit

Permalink
Update test_fix_pyre_directives.py (#1082)
Browse files Browse the repository at this point in the history
* Update test_fix_pyre_directives.py

refactor with fstring to format string to make code more Pythonic.

* Update test_fix_pyre_directives.py

refactor with fstring to format string to make code more Pythonic.

* Update test_fix_pyre_directives.py

refactor with fstring to format string to make code more Pythonic.

* Update test_fix_pyre_directives.py

refactor with fstring to format string to make code more Pythonic.

* Update test_fix_pyre_directives.py

refactor with chain constant value assignment to make code more Pythonic

* Update test_fix_pyre_directives.py

refactor with chain constant value assignment to make code more Pythonic
  • Loading branch information
anonymousdouble authored Jan 3, 2024
1 parent 30df6fc commit dbbfe1e
Showing 1 changed file with 9 additions and 29 deletions.
38 changes: 9 additions & 29 deletions libcst/codemod/commands/tests/test_fix_pyre_directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@ def test_no_need_to_fix_simple(self) -> None:
"""
Tests that a pyre-strict inside the module header doesn't get touched.
"""
before = """
# pyre-strict
from typing import List
def baz() -> List[Foo]:
pass
"""
after = """
after = (
before
) = """
# pyre-strict
from typing import List
Expand All @@ -34,16 +29,9 @@ def test_no_need_to_fix_complex_bottom(self) -> None:
"""
Tests that a pyre-strict inside the module header doesn't get touched.
"""
before = """
# This is some header comment.
#
# pyre-strict
from typing import List
def baz() -> List[Foo]:
pass
"""
after = """
after = (
before
) = """
# This is some header comment.
#
# pyre-strict
Expand All @@ -58,17 +46,9 @@ def test_no_need_to_fix_complex_top(self) -> None:
"""
Tests that a pyre-strict inside the module header doesn't get touched.
"""
before = """
# pyre-strict
#
# This is some header comment.
from typing import List
def baz() -> List[Foo]:
pass
"""
after = """
after = (
before
) = """
# pyre-strict
#
# This is some header comment.
Expand Down

0 comments on commit dbbfe1e

Please sign in to comment.