diff options
author | Seth M Morton <seth.m.morton@gmail.com> | 2016-05-01 13:34:14 -0700 |
---|---|---|
committer | Seth M Morton <seth.m.morton@gmail.com> | 2016-05-01 13:34:14 -0700 |
commit | 707866c768a464d28a9a2242e63618e1289ec60b (patch) | |
tree | aae40b7d1870050cb38f0983c2c970b40028855e | |
parent | 48fcf867d6c60302c1ddc2817367b8fce36206fc (diff) | |
download | natsort-707866c768a464d28a9a2242e63618e1289ec60b.tar.gz |
Solved some testing errors.
-rw-r--r-- | natsort/ns_enum.py | 22 | ||||
-rw-r--r-- | natsort/utils.py | 3 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | setup.py | 8 | ||||
-rw-r--r-- | test_natsort/compat/hypothesis.py | 2 |
5 files changed, 18 insertions, 19 deletions
diff --git a/natsort/ns_enum.py b/natsort/ns_enum.py index 927c5e1..aa884be 100644 --- a/natsort/ns_enum.py +++ b/natsort/ns_enum.py @@ -142,20 +142,20 @@ class ns(object): # The below are options. The values are stored as powers of two # so bitmasks can be used to extract the user's requested options. - FLOAT = F = 1<<0 - SIGNED = S = 1<<1 + FLOAT = F = 1 << 0 + SIGNED = S = 1 << 1 REAL = R = FLOAT | SIGNED - NOEXP = N = 1<<2 - PATH = P = 1<<3 - LOCALE = L = 1<<4 - IGNORECASE = IC = 1<<5 - LOWERCASEFIRST = LF = 1<<6 - GROUPLETTERS = G = 1<<7 - UNGROUPLETTERS = UG = 1<<8 + NOEXP = N = 1 << 2 + PATH = P = 1 << 3 + LOCALE = L = 1 << 4 + IGNORECASE = IC = 1 << 5 + LOWERCASEFIRST = LF = 1 << 6 + GROUPLETTERS = G = 1 << 7 + UNGROUPLETTERS = UG = 1 << 8 CAPITALFIRST = C = UNGROUPLETTERS - NANLAST = NL = 1<<9 + NANLAST = NL = 1 << 9 # The below are private options for internal use only. _NUMERIC_ONLY = REAL | NOEXP _ALL_BUT_PATH = _NUMERIC_ONLY | L | IC | LF | G | UG | C | NL - _DUMB = 1<<31 + _DUMB = 1 << 31 diff --git a/natsort/utils.py b/natsort/utils.py index 03968c2..1647aa3 100644 --- a/natsort/utils.py +++ b/natsort/utils.py @@ -16,7 +16,7 @@ import re from warnings import warn from os import curdir as os_curdir, pardir as os_pardir from os.path import split as path_split, splitext as path_splitext -from itertools import islice, chain as ichain +from itertools import chain as ichain from locale import localeconv from collections import deque from functools import partial @@ -29,7 +29,6 @@ from natsort.locale_help import locale_convert, groupletters from natsort.compat.pathlib import PurePath, has_pathlib from natsort.compat.py23 import ( py23_str, - py23_zip, py23_map, py23_filter, PY_VERSION, @@ -15,7 +15,7 @@ flakes-ignore = test_natsort/compat/* UnusedImport pep8ignore = - natsort/ns_enum.py E126 E241 E123 + natsort/ns_enum.py E126 E241 E123 E221 test_natsort/test_natsort.py E501 E241 E221 test_natsort/test_utils.py E501 E241 E221 test_natsort/test_locale_help.py E501 E241 E221 @@ -28,10 +28,10 @@ class PyTest(TestCommand): # '-s', # '--failed', # '-v', - 'test_natsort', - 'README.rst', - 'docs/source/intro.rst', - 'docs/source/examples.rst', + # 'test_natsort', + # 'README.rst', + # 'docs/source/intro.rst', + # 'docs/source/examples.rst', ]) diff --git a/test_natsort/compat/hypothesis.py b/test_natsort/compat/hypothesis.py index 198cbe7..9e007da 100644 --- a/test_natsort/compat/hypothesis.py +++ b/test_natsort/compat/hypothesis.py @@ -27,5 +27,5 @@ if major_minor != (2, 6): # is incompatible with python 2.6. else: example = sampled_from = assume = given = floats = integers = \ - tuples = lists = text = compat.mock.MagicMock() + tuples = lists = text = binary = compat.mock.MagicMock() use_hypothesis = False |