Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test_fix_pyre_directives.py #1082

Merged
merged 7 commits into from
Jan 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading