Philip Jenvey
2013-08-28 0f98233875282c3cde49e946a06820dbb922cd55
utilize the tuple form of starts/endswith
2 files modified
6 ■■■■ changed files
pyramid/path.py 2 ●●● patch | view | raw | blame | history
pyramid/scaffolds/copydir.py 4 ●●●● patch | view | raw | blame | history
pyramid/path.py
@@ -324,7 +324,7 @@
    def _pkg_resources_style(self, value, package):
        """ package.module:attr style """
        if value.startswith('.') or value.startswith(':'):
        if value.startswith(('.', ':')):
            if not package:
                raise ValueError(
                    'relative name %r irresolveable without package' % (value,)
pyramid/scaffolds/copydir.py
@@ -156,9 +156,9 @@
    """
    if name.startswith('.'):
        return 'Skipping hidden file %(filename)s'
    if name.endswith('~') or name.endswith('.bak'):
    if name.endswith(('~', '.bak')):
        return 'Skipping backup file %(filename)s'
    if name.endswith('.pyc') or name.endswith('.pyo'):
    if name.endswith(('.pyc', '.pyo')):
        return 'Skipping %s file ' % os.path.splitext(name)[1] + '%(filename)s'
    if name.endswith('$py.class'):
        return 'Skipping $py.class file %(filename)s'