mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 05:26:53 +00:00
Clean up some uses of set, list, and dict
* Use set literals instead of set([...]) * Avoid list(sorted(...)) as sorted returns a list * Replace dict() with dict literal
This commit is contained in:
parent
23b1f37ffd
commit
541bac6a82
8 changed files with 41 additions and 41 deletions
|
|
@ -17,7 +17,7 @@ class Statistics(object):
|
|||
:rtype:
|
||||
list(str)
|
||||
"""
|
||||
return list(sorted(set(key.code for key in self._store.keys())))
|
||||
return sorted({key.code for key in self._store.keys()})
|
||||
|
||||
def record(self, error):
|
||||
"""Add the fact that the error was seen in the file.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue