From 37d4b84eee6e17690fd820f62b2e73fa7ac94f4a Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Fri, 24 Sep 2021 22:47:05 +0200 Subject: [PATCH] DeepSource issue: Unnecessary generator It is unnecessary to use `list`, `set`, `dict` around a generator expression to get object of that type, since there are comprehensions for these types. --- codespell_lib/tests/test_dictionary.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codespell_lib/tests/test_dictionary.py b/codespell_lib/tests/test_dictionary.py index c36316d7f22..21303769549 100644 --- a/codespell_lib/tests/test_dictionary.py +++ b/codespell_lib/tests/test_dictionary.py @@ -41,9 +41,9 @@ def test_dictionaries_exist(): """Test consistency of dictionaries.""" - doc_fnames = set(op.basename(f[0]) for f in _fnames_in_aspell) - got_fnames = set(op.basename(f) - for f in glob.glob(op.join(_data_dir, '*.txt'))) + doc_fnames = {op.basename(f[0]) for f in _fnames_in_aspell} + got_fnames = {op.basename(f) + for f in glob.glob(op.join(_data_dir, '*.txt'))} assert doc_fnames == got_fnames