Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 7e5a017

Browse files
committed
Merge remote-tracking branch 'origin/master' into errors-dry
Conflicts: pep257.py
2 parents b41c018 + 7a2c452 commit 7e5a017

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

README.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,19 @@ Run
3535
...
3636
3737
38-
`Read the full documentation here <http://pep257.readthedocs.org>`_.
38+
Links
39+
-----
40+
41+
.. image:: https://travis-ci.org/GreenSteam/pep257.svg?branch=master
42+
:target: https://travis-ci.org/GreenSteam/pep257
43+
44+
.. image:: https://readthedocs.org/projects/pep257/badge/?version=latest
45+
:target: https://readthedocs.org/projects/pep257/?badge=latest
46+
:alt: Documentation Status
47+
48+
* `Read the full documentation here <http://pep257.readthedocs.org>`_.
49+
50+
* `Fork pep257 on GitHub <http://github.com/GreenSteam/pep257>`_.
51+
52+
* `PyPI project page <https://pypi.python.org/pypi/pep257>`_.
3953

pep257.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,8 @@ def collect(names, match=lambda name: True, match_dir=lambda name: True):
584584
for name in names: # map(expanduser, names):
585585
if os.path.isdir(name):
586586
for root, dirs, filenames in os.walk(name):
587-
for dir in dirs:
588-
if not match_dir(dir):
589-
dirs.remove(dir) # do not visit those dirs
587+
# Skip any dirs that do not match match_dir
588+
dirs[:] = [dir for dir in dirs if match_dir(dir)]
590589
for filename in filenames:
591590
if match(filename):
592591
yield os.path.join(root, filename)
@@ -882,8 +881,8 @@ def check_indent(self, definition, docstring):
882881
indents = [leading_space(l) for l in lines if not is_blank(l)]
883882
if set(' \t') == set(''.join(indents) + indent):
884883
yield D206()
885-
if (len(indents) > 1 and min(indents[:-1]) > indent
886-
or indents[-1] > indent):
884+
if (len(indents) > 1 and min(indents[:-1]) > indent or
885+
indents[-1] > indent):
887886
yield D208()
888887
if min(indents) < indent:
889888
yield D207()

0 commit comments

Comments
 (0)