Fix ruff rules ISC flake8-implicit-str-concat (#8892) · leether/Python@dbaff34 · GitHub
Skip to content

Commit dbaff34

Browse files
authored
Fix ruff rules ISC flake8-implicit-str-concat (TheAlgorithms#8892)
1 parent b77e6ad commit dbaff34

6 files changed

Lines changed: 128 additions & 133 deletions

File tree

ciphers/diffie_hellman.py

Lines changed: 122 additions & 122 deletions

compression/burrows_wheeler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def reverse_bwt(bwt_string: str, idx_original_string: int) -> str:
150150
raise ValueError("The parameter idx_original_string must not be lower than 0.")
151151
if idx_original_string >= len(bwt_string):
152152
raise ValueError(
153-
"The parameter idx_original_string must be lower than" " len(bwt_string)."
153+
"The parameter idx_original_string must be lower than len(bwt_string)."
154154
)
155155

156156
ordered_rotations = [""] * len(bwt_string)

neural_network/input_data.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,7 @@ def _maybe_download(filename, work_directory, source_url):
263263
return filepath
264264

265265

266-
@deprecated(
267-
None, "Please use alternatives such as:" " tensorflow_datasets.load('mnist')"
268-
)
266+
@deprecated(None, "Please use alternatives such as: tensorflow_datasets.load('mnist')")
269267
def read_data_sets(
270268
train_dir,
271269
fake_data=False,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ select = [ # https://beta.ruff.rs/docs/rules
4949
"ICN", # flake8-import-conventions
5050
"INP", # flake8-no-pep420
5151
"INT", # flake8-gettext
52+
"ISC", # flake8-implicit-str-concat
5253
"N", # pep8-naming
5354
"NPY", # NumPy-specific rules
5455
"PGH", # pygrep-hooks
@@ -72,7 +73,6 @@ select = [ # https://beta.ruff.rs/docs/rules
7273
# "DJ", # flake8-django
7374
# "ERA", # eradicate -- DO NOT FIX
7475
# "FBT", # flake8-boolean-trap # FIX ME
75-
# "ISC", # flake8-implicit-str-concat # FIX ME
7676
# "PD", # pandas-vet
7777
# "PT", # flake8-pytest-style
7878
# "PTH", # flake8-use-pathlib # FIX ME

strings/is_srilankan_phone_number.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ def is_sri_lankan_phone_number(phone: str) -> bool:
2222
False
2323
"""
2424

25-
pattern = re.compile(
26-
r"^(?:0|94|\+94|0{2}94)" r"7(0|1|2|4|5|6|7|8)" r"(-| |)" r"\d{7}$"
27-
)
25+
pattern = re.compile(r"^(?:0|94|\+94|0{2}94)7(0|1|2|4|5|6|7|8)(-| |)\d{7}$")
2826

2927
return bool(re.search(pattern, phone))
3028

web_programming/world_covid19_stats.py

Lines changed: 2 additions & 3 deletions

0 commit comments

Comments
 (0)