Skip to content

Commit

Permalink
apply Black 2024 style in fbcode (5/16)
Browse files Browse the repository at this point in the history
Summary:
Formats the covered files with pyfmt.

paintitblack

Reviewed By: aleivag

Differential Revision: D54447730

fbshipit-source-id: 85ed104b2f8f5e26ae0dea9ee17392ecad8b9407
  • Loading branch information
amyreese authored and facebook-github-bot committed Mar 3, 2024
1 parent b24b681 commit 23f41df
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tests/test_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class TestSandbox(unittest.TestCase):
"""The sandbox area can be used in order to test ERRPY syntax and compare
the output AST with that produced by CPython."""

maxDiff: Optional[
int
] = None # this is to display large diffs which we want for this tool
maxDiff: Optional[int] = (
None # this is to display large diffs which we want for this tool
)

def check_ast_file(self, fname: str, pretty_print: bool, flat_ast: bool) -> None:
code = read_code(fname)
Expand Down
6 changes: 3 additions & 3 deletions tests/utils/error_recovery_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def compare_recovered_ast_many(
expected_results_fname = many_fname + EXPECTED_RESULTS_POSTFIX

got_results = ""
for (code_title, test_body) in self.splitmany_test_cases(many_fname, test_dir):
for code_title, test_body in self.splitmany_test_cases(many_fname, test_dir):
if code_title.startswith("#"):
continue # skip copywrite notice

Expand Down Expand Up @@ -153,7 +153,7 @@ def generator(
) -> Iterator[ErrorRecoveryTestIteratorStep]:
last_few_chars_input = []
in_comment = False
for (character_number, current_character) in enumerate(test_body):
for character_number, current_character in enumerate(test_body):
# we progress char by char
last_few_chars_input.append(current_character)
if len(last_few_chars_input) > 30:
Expand Down Expand Up @@ -279,7 +279,7 @@ def _check_error_recovery(

fail_cases = []

for (code_title, test_body) in sanitized_test_cases:
for code_title, test_body in sanitized_test_cases:
if code_title.startswith("#"):
continue # skip copywrite notice

Expand Down
2 changes: 1 addition & 1 deletion tests/utils/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def check_many_cases_in_file(
# split into individual tests
sanitized_test_cases = self.splitmany_test_cases(many_fname, flavour)

for (code_title, test_body) in sanitized_test_cases:
for code_title, test_body in sanitized_test_cases:
expected_ast = ast_utils.get_cpython_ast(test_body).strip()
(got_ast, errors), _ = ast_utils.run_errpy(test_body)

Expand Down

0 comments on commit 23f41df

Please sign in to comment.