From 68355f34d5a8ce6dbbafa49085990a0007e8c301 Mon Sep 17 00:00:00 2001 From: Seth Morton Date: Sun, 26 Feb 2023 20:50:37 -0800 Subject: Run with newest black --- natsort/natsort.py | 2 -- natsort/utils.py | 1 - tests/test_unicode_numbers.py | 4 +++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/natsort/natsort.py b/natsort/natsort.py index 3904ec5..ea83e48 100644 --- a/natsort/natsort.py +++ b/natsort/natsort.py @@ -677,7 +677,6 @@ def _split_apply( # Choose the implementation based on the host OS if platform.system() == "Windows": - from ctypes import wintypes, windll # type: ignore from functools import cmp_to_key @@ -695,7 +694,6 @@ if platform.system() == "Windows": ) else: - # For UNIX-based platforms, ICU performs MUCH better than locale # at replicating the file explorer's sort order. We will use # ICU's ability to do basic natural sorting as it also better diff --git a/natsort/utils.py b/natsort/utils.py index 1e38bec..36cb436 100644 --- a/natsort/utils.py +++ b/natsort/utils.py @@ -341,7 +341,6 @@ def natsort_key( try: return string_func(cast(str, val)) except (TypeError, AttributeError): - # If bytes type, use the bytes_func if type(val) in (bytes,): return bytes_func(cast(bytes, val)) diff --git a/tests/test_unicode_numbers.py b/tests/test_unicode_numbers.py index eb71125..bd5a7fb 100644 --- a/tests/test_unicode_numbers.py +++ b/tests/test_unicode_numbers.py @@ -34,7 +34,9 @@ def test_decimal_chars_contains_only_valid_unicode_decimal_characters() -> None: assert unicodedata.decimal(a, None) is not None -def test_numeric_chars_contains_all_valid_unicode_numeric_and_digit_characters() -> None: +def test_numeric_chars_contains_all_valid_unicode_numeric_and_digit_characters() -> ( + None +): set_numeric_chars = set(numeric_chars) set_digit_chars = set(digit_chars) set_decimal_chars = set(decimal_chars) -- cgit v1.2.1