Skip to content

Commit 7235c1a

Browse files
committed
Linting.
1 parent ed98779 commit 7235c1a

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

domdf_python_tools/words.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,8 @@ def get_words_list(min_length: int = 0, max_length: int = -1) -> List[str]:
112112
:return: The list of words meeting the above specifiers.
113113
""" # noqa D400
114114

115-
# this package
116-
from domdf_python_tools.paths import PathPlus
117-
118-
with importlib_resources.path(domdf_python_tools, "google-10000-english-no-swears.txt") as words_file_:
119-
words_file = PathPlus(words_file_)
120-
121-
words_list: List[str] = words_file.read_text().splitlines()
115+
words: str = importlib_resources.read_text("domdf_python_tools", "google-10000-english-no-swears.txt")
116+
words_list: List[str] = words.splitlines()
122117

123118
if min_length > 0 or max_length != -1:
124119
if max_length == -1:

tests/test_import_tools.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,16 @@ def test_discover_entry_points_by_name_name_match_func(data_regression: DataRegr
150150
)
151151
@pytest.mark.parametrize(
152152
"module",
153-
["collections", "importlib", "domdf_python_tools", "consolekit", "asyncio", "json", "cRQefleMvm", "reprlib"],
153+
[
154+
"collections",
155+
"importlib",
156+
"domdf_python_tools",
157+
"consolekit",
158+
"asyncio",
159+
"json",
160+
"cRQefleMvm",
161+
"reprlib"
162+
],
154163
)
155164
def test_iter_submodules(version, module: str, data_regression: DataRegressionFixture):
156165
data_regression.check(list(iter_submodules(module)))

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ count = True
154154
setenv = PYTHONDEVMODE = 1
155155
deps = -r{toxinidir}/tests/requirements.txt
156156
extras = all
157+
ignore_errors = True
157158
commands =
158159
python --version
159160
python -m pip install pytz>=2019.1

0 commit comments

Comments
 (0)