Skip to content

Commit

Permalink
Check (but don’t enforce) PEP 257 docstring style
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <[email protected]>
  • Loading branch information
Kwpolska committed Jul 28, 2015
1 parent 81066e4 commit 0aae245
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ install:
- "if [[ $NMODE == 'nikola' ]]; then pip install -r requirements-tests.txt; if [[ \"$?\" == '1' ]]; then cat /home/travis/.pip/pip.log; false; fi; fi"
- "if [[ $NMODE == 'nikola' ]]; then pip install .; fi"
- "if [[ $NMODE == 'nikola' ]]; then scripts/getbaseline.sh $(scripts/getpyver.py short); fi"
- "if [[ $NMODE == 'flake8' ]]; then pip install flake8; fi"
- "if [[ $NMODE == 'flake8' ]]; then pip install flake8 pep257; fi"
# We run tests and nikola (to see if the command is executable) OR flake8.
# We run `nikola` and `nikola help` because things may break due to human
# errors in argument parsing (cf. 96e78dd)
Expand All @@ -34,6 +34,7 @@ script:
- "if [[ $NMODE == 'nikola' ]]; then nikola; fi"
- "if [[ $NMODE == 'nikola' ]]; then nikola help; fi"
- "if [[ $NMODE == 'flake8' ]]; then flake8 nikola/; fi"
- "if [[ $NMODE == 'flake8' ]]; then pep257 --count --match-dir='(?!^\.)(?!data).*' nikola/ || true; fi"
after_success:
- "if [[ $NMODE == 'nikola' ]]; then coveralls; fi"
notifications:
Expand Down
9 changes: 8 additions & 1 deletion dodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ def task_flake8():
"""flake8 - static check for python files"""
yield {
'name': os.path.join(os.getcwd(), 'nikola'),
'actions': ['flake8 --ignore=E501 nikola/'],
'actions': ['flake8 nikola/'],
}

def task_pep257():
"""pep257 -- static check for docstring style"""
yield {
'name': os.path.join(os.getcwd(), 'nikola'),
'actions': ["pep257 --count --match-dir='(?!^\.)(?!data).*' nikola/"],
}


Expand Down

0 comments on commit 0aae245

Please sign in to comment.