Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
DimitriPapadopoulos committed Oct 17, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 1493f9e commit 97ecce2
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
@@ -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


0 comments on commit 97ecce2

Please sign in to comment.