diff options
| -rw-r--r-- | pyramid/path.py | 2 | ||||
| -rw-r--r-- | pyramid/scaffolds/copydir.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pyramid/path.py b/pyramid/path.py index ab39a85d9..eb92ea62b 100644 --- a/pyramid/path.py +++ b/pyramid/path.py @@ -324,7 +324,7 @@ class DottedNameResolver(Resolver): 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,) diff --git a/pyramid/scaffolds/copydir.py b/pyramid/scaffolds/copydir.py index 7864dd1a1..3b871dc19 100644 --- a/pyramid/scaffolds/copydir.py +++ b/pyramid/scaffolds/copydir.py @@ -156,9 +156,9 @@ def should_skip_file(name): """ 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' |
