summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth M Morton <seth.m.morton@gmail.com>2018-09-02 22:58:19 -0700
committerSeth M Morton <seth.m.morton@gmail.com>2018-09-02 22:58:19 -0700
commitb63a08d11915fb9e627bf14ca5b8efad08f5d3d5 (patch)
tree52806edaa23095ced7225ef86afa5a17df85850c
parent0c3ae8bc48e56c346ee86cd8cf96cf79163272c9 (diff)
downloadnatsort-b63a08d11915fb9e627bf14ca5b8efad08f5d3d5.tar.gz
Small typos and clarifications.
-rw-r--r--natsort/ns_enum.py4
-rw-r--r--natsort/utils.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/natsort/ns_enum.py b/natsort/ns_enum.py
index b2015c9..fee7cc4 100644
--- a/natsort/ns_enum.py
+++ b/natsort/ns_enum.py
@@ -59,7 +59,7 @@ enum_aliases = [
("NA", "NUMAFTER"),
]
-# Construct the list of enums with their fields.
+# Construct the list of bitwise distinct enums with their fields.
enum_fields = [(name, 1 << i) for i, name in enumerate(enum_options)]
enum_fields.extend((name, 0) for name in enum_do_nothing)
@@ -73,7 +73,7 @@ for name, combo in enum_combos:
current_mapping = dict(enum_fields)
enum_fields.extend((alias, current_mapping[name]) for alias, name in enum_aliases)
-# Finally, extract out the enum field names and thier values.
+# Finally, extract out the enum field names and their values.
enum_field_names, enum_field_values = zip(*enum_fields)
diff --git a/natsort/utils.py b/natsort/utils.py
index b064edc..ec0c1b0 100644
--- a/natsort/utils.py
+++ b/natsort/utils.py
@@ -239,7 +239,7 @@ def natsort_key(val, key, string_func, bytes_func, num_func):
if type(val) in (bytes,):
return bytes_func(val)
- # Otherwise, assume it is an iterable that must be parses recursively.
+ # Otherwise, assume it is an iterable that must be parsed recursively.
# Do not apply the key recursively.
try:
return tuple(
@@ -731,7 +731,7 @@ def path_splitter(s, _d_match=re.compile(r"\.\d").match):
Parameters
----------
- s : str, pathlib.Path
+ s : str | pathlib.Path
Returns
-------