Skip to content

Commit dbd241b

Browse files
author
Gonzalo Diaz
committed
[BUGFIX] pycodestyle issues fixes.
E123 closing bracket does not match indentation of opening bracket's line W503 line break before binary operator W504 line break after binary operator
1 parent e1e7bad commit dbd241b

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

src/hackerrank/interview_preparation_kit/recursion_and_backtracking/ctci_recursive_staircase_test.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@
99
FILE_PATH = str(Path(__file__).resolve().parent)
1010

1111
with open(
12-
FILE_PATH +
13-
'/ctci_recursive_staircase.testcases.json',
14-
encoding="utf-8"
15-
) as file1:
12+
FILE_PATH + '/ctci_recursive_staircase.testcases.json',
13+
encoding="utf-8"
14+
) as file1:
1615
TEST_CASES = json.load(file1)
1716

1817
with open(
19-
FILE_PATH +
20-
'/ctci_recursive_staircase_generalized.testcases.json',
21-
encoding="utf-8"
22-
) as file2:
18+
FILE_PATH + '/ctci_recursive_staircase_generalized.testcases.json',
19+
encoding="utf-8"
20+
) as file2:
2321
TEST_CASES_GENERALIZED = json.load(file2)
2422

2523

src/hackerrank/interview_preparation_kit/string_manipulation/sherlock_and_valid_string.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ def is_valid(word: str) -> bool:
2424
if frequencies_size == 2:
2525
frequencies_list = list(frequencies.keys())
2626

27-
if frequencies[frequencies_list[0]] == 1 and \
28-
(frequencies_list[0] - 1 == 0 or
29-
frequencies_list[0] - 1 == frequencies_list[1]):
27+
if frequencies[frequencies_list[0]] == 1 \
28+
and (
29+
frequencies_list[0] - 1 == 0
30+
or frequencies_list[0] - 1 == frequencies_list[1]):
3031
return True
3132

3233
return False

src/projecteuler/problem0004.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def problem0004(_bottom: int, _top: int) -> 'None | int':
2929
LOGGER.debug("FOUND %d x %d = %d is Palindrome",
3030
i, j, found_palindrome)
3131

32-
if (large_found_palindrome is None or
33-
found_palindrome > large_found_palindrome):
32+
if (large_found_palindrome is None
33+
or found_palindrome > large_found_palindrome):
3434
foundi = i
3535
foundj = j
3636
large_found_palindrome = found_palindrome

0 commit comments

Comments
 (0)