Skip to content

Commit

Permalink
DeepSource issue: Unnecessary generator
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DimitriPapadopoulos committed Sep 27, 2021
1 parent fba52f1 commit 37144c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions codespell_lib/tests/test_dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,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


Expand Down

0 comments on commit 37144c6

Please sign in to comment.