Mercurial > public > mercurial-scm > hg-stable
comparison tests/check-perf-code.py @ 32331:bd872f64a8ba
cleanup: use set literals
We no longer support Python 2.6, so we can now use set literals.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 10 Feb 2017 16:56:29 -0800 |
parents | d8a2c536dd96 |
children | eb8a8af4cbd0 |
comparison
equal
deleted
inserted
replaced
32330:2959c3e986e0 | 32331:bd872f64a8ba |
---|---|
24 | 24 |
25 def modulewhitelist(names): | 25 def modulewhitelist(names): |
26 replacement = [('.py', ''), ('.c', ''), # trim suffix | 26 replacement = [('.py', ''), ('.c', ''), # trim suffix |
27 ('mercurial%s' % (os.sep), ''), # trim "mercurial/" path | 27 ('mercurial%s' % (os.sep), ''), # trim "mercurial/" path |
28 ] | 28 ] |
29 ignored = set(['__init__']) | 29 ignored = {'__init__'} |
30 modules = {} | 30 modules = {} |
31 | 31 |
32 # convert from file name to module name, and count # of appearances | 32 # convert from file name to module name, and count # of appearances |
33 for name in names: | 33 for name in names: |
34 name = name.strip() | 34 name = name.strip() |