Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Mac/Extras.install.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def isclean(name):
if name == 'CVS': return 0
if name == '.cvsignore': return 0
if name == '.DS_store': return 0
if name == '.DS_Store': return 0
if name == '.svn': return 0
Comment on lines 12 to 16
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if name == 'CVS': return 0
if name == '.cvsignore': return 0
if name == '.DS_store': return 0
if name == '.DS_Store': return 0
if name == '.svn': return 0
if name in ('CVS', '.cvsignore', '.DS_store', '.DS_Store', '.svn')`:
return 0

A proof-of-concept:

>>> def test(name):
...    return name in ('CVS', '.cvsignore', '.DS_store', '.DS_Store', '.svn')
...
>>> test('fooCVS')
False
>>> test('foo')
False
>>> test('CVS')
True

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simple and better performance

if name.endswith('~'): return 0
if name.endswith('.BAK'): return 0
Expand Down