Skip to content

Commit 86617ac

Browse files
dependabot[bot]Ahmed TAHRI
andauthored
⬆️ Bump black from 22.12.0 to 23.1.0 (#265)
* ⬆️ Bump black from 22.12.0 to 23.1.0 Bumps [black](https://github.com/psf/black) from 22.12.0 to 23.1.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](psf/black@22.12.0...23.1.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * 🎨 reformat files using latest `black` --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ahmed TAHRI <[email protected]>
1 parent 5730a34 commit 86617ac

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

charset_normalizer/api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ def from_bytes(
175175
prioritized_encodings.append("utf_8")
176176

177177
for encoding_iana in prioritized_encodings + IANA_SUPPORTED:
178-
179178
if cp_isolation and encoding_iana not in cp_isolation:
180179
continue
181180

@@ -318,7 +317,9 @@ def from_bytes(
318317
bom_or_sig_available and strip_sig_or_bom is False
319318
):
320319
break
321-
except UnicodeDecodeError as e: # Lazy str loading may have missed something there
320+
except (
321+
UnicodeDecodeError
322+
) as e: # Lazy str loading may have missed something there
322323
logger.log(
323324
TRACE,
324325
"LazyStr Loading: After MD chunk decode, code page %s does not fit given bytes sequence at ALL. %s",

charset_normalizer/cd.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ def alphabet_languages(
140140
source_have_accents = any(is_accentuated(character) for character in characters)
141141

142142
for language, language_characters in FREQUENCIES.items():
143-
144143
target_have_accents, target_pure_latin = get_target_features(language)
145144

146145
if ignore_non_latin and target_pure_latin is False:

charset_normalizer/cli/normalizer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ def cli_detect(argv: Optional[List[str]] = None) -> int:
147147
x_ = []
148148

149149
for my_file in args.files:
150-
151150
matches = from_fp(my_file, threshold=args.threshold, explain=args.verbose)
152151

153152
best_guess = matches.best()
@@ -222,7 +221,6 @@ def cli_detect(argv: Optional[List[str]] = None) -> int:
222221
)
223222

224223
if args.normalize is True:
225-
226224
if best_guess.encoding.startswith("utf") is True:
227225
print(
228226
'"{}" file does not need to be normalized, as it already came from unicode.'.format(

charset_normalizer/utils.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ def range_scan(decoded_sequence: str) -> List[str]:
311311

312312

313313
def cp_similarity(iana_name_a: str, iana_name_b: str) -> float:
314-
315314
if is_multi_byte_encoding(iana_name_a) or is_multi_byte_encoding(iana_name_b):
316315
return 0.0
317316

@@ -351,7 +350,6 @@ def set_logging_handler(
351350
level: int = logging.INFO,
352351
format_string: str = "%(asctime)s | %(levelname)s | %(message)s",
353352
) -> None:
354-
355353
logger = logging.getLogger(name)
356354
logger.setLevel(level)
357355

@@ -371,7 +369,6 @@ def cut_sequence_chunks(
371369
is_multi_byte_decoder: bool,
372370
decoded_payload: Optional[str] = None,
373371
) -> Generator[str, None, None]:
374-
375372
if decoded_payload and is_multi_byte_decoder is False:
376373
for i in offsets:
377374
chunk = decoded_payload[i : i + chunk_size]
@@ -397,7 +394,6 @@ def cut_sequence_chunks(
397394
# multi-byte bad cutting detector and adjustment
398395
# not the cleanest way to perform that fix but clever enough for now.
399396
if is_multi_byte_decoder and i > 0:
400-
401397
chunk_partial_size_chk: int = min(chunk_size, 16)
402398

403399
if (

dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pytest-cov==4.0.0
66
build==0.10.0
77
wheel==0.38.4
88

9-
black==22.12.0
9+
black==23.1.0
1010
mypy==1.0.1
1111
Flask==2.2.3
1212
pytest==7.2.1

0 commit comments

Comments
 (0)