summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Morton <seth.m.morton@gmail.com>2021-10-29 12:55:49 -0700
committerSeth Morton <seth.m.morton@gmail.com>2021-10-30 21:00:48 -0700
commit14f72a4293765570fb8b8700a8225d1eab03dd38 (patch)
tree1e7a68755ca89f2895527c1ba87608baa6eeed1b
parent13a76157bee9a3b2475ee1c99c7b1818bb7c7d9e (diff)
downloadnatsort-14f72a4293765570fb8b8700a8225d1eab03dd38.tar.gz
Eliminate unneeded cast in __main__.py
-rw-r--r--natsort/__main__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/natsort/__main__.py b/natsort/__main__.py
index d29ab14..4dffc4b 100644
--- a/natsort/__main__.py
+++ b/natsort/__main__.py
@@ -171,8 +171,8 @@ def main(*arguments: str) -> None:
args = parser.parse_args(arguments or None, namespace=TypedArgs())
# Make sure the filter range is given properly. Does nothing if no filter
- args.filter = check_filters(cast(NumPairIter, args.filter))
- args.reverse_filter = check_filters(cast(NumPairIter, args.reverse_filter))
+ args.filter = check_filters(args.filter)
+ args.reverse_filter = check_filters(args.reverse_filter)
# Remove trailing whitespace from all the entries
entries = [e.strip() for e in args.entries]
@@ -206,7 +206,7 @@ def range_check(low: Num, high: Num) -> NumPair:
return low, high
-def check_filters(filters: NumPairIter) -> Optional[List[NumPair]]:
+def check_filters(filters: Optional[NumPairIter]) -> Optional[List[NumPair]]:
"""
Execute range_check for every element of an iterable.