Skip to content

Commit

Permalink
Remove uses of # pyre-placeholder-stub (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
grievejia authored Jul 20, 2024
1 parent 72701e4 commit e20e757
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
10 changes: 10 additions & 0 deletions libcst/tests/test_fuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class FuzzTest(unittest.TestCase):
@unittest.skipUnless(
bool(os.environ.get("HYPOTHESIS", False)), "Hypothesis not requested"
)
# pyre-fixme[56]: Pyre was not able to infer the type of the decorator
# `hypothesis.given($parameter$source_code =
# hypothesmith.from_grammar($parameter$start = "file_input"))`.
@hypothesis.given(source_code=from_grammar(start="file_input"))
def test_parsing_compilable_module_strings(self, source_code: str) -> None:
"""The `from_grammar()` strategy generates strings from Python's grammar.
Expand Down Expand Up @@ -77,6 +80,9 @@ def test_parsing_compilable_module_strings(self, source_code: str) -> None:
@unittest.skipUnless(
bool(os.environ.get("HYPOTHESIS", False)), "Hypothesis not requested"
)
# pyre-fixme[56]: Pyre was not able to infer the type of the decorator
# `hypothesis.given($parameter$source_code =
# hypothesmith.from_grammar($parameter$start = "eval_input").map(str.strip))`.
@hypothesis.given(source_code=from_grammar(start="eval_input").map(str.strip))
def test_parsing_compilable_expression_strings(self, source_code: str) -> None:
"""Much like statements, but for expressions this time.
Expand Down Expand Up @@ -105,6 +111,10 @@ def test_parsing_compilable_expression_strings(self, source_code: str) -> None:
@unittest.skipUnless(
bool(os.environ.get("HYPOTHESIS", False)), "Hypothesis not requested"
)
# pyre-fixme[56]: Pyre was not able to infer the type of the decorator
# `hypothesis.given($parameter$source_code =
# hypothesmith.from_grammar($parameter$start = "single_input").map(lambda
# ($parameter$s) (s.replace("
@hypothesis.given(
source_code=from_grammar(start="single_input").map(
lambda s: s.replace("\n", "") + "\n"
Expand Down
6 changes: 5 additions & 1 deletion stubs/hypothesis.pyi
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# pyre-placeholder-stub
# pyre-unsafe

from typing import Any

def __getattr__(name: str) -> Any: ...
6 changes: 5 additions & 1 deletion stubs/hypothesmith.pyi
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# pyre-placeholder-stub
# pyre-unsafe

from typing import Any

def __getattr__(name: str) -> Any: ...
6 changes: 5 additions & 1 deletion stubs/setuptools.pyi
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# pyre-placeholder-stub
# pyre-unsafe

from typing import Any

def __getattr__(name: str) -> Any: ...
6 changes: 5 additions & 1 deletion stubs/typing_inspect.pyi
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# pyre-placeholder-stub
# pyre-unsafe

from typing import Any

def __getattr__(name: str) -> Any: ...

0 comments on commit e20e757

Please sign in to comment.