-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from jamescooke/linting
Add pylint and fix convention messages
- Loading branch information
Showing
15 changed files
with
610 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from .checker import Checker | ||
|
||
__all__ = [ | ||
Checker, | ||
'Checker', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import ast | ||
|
||
|
||
class ArrangeBlock: | ||
class ArrangeBlock(object): | ||
""" | ||
Attributes: | ||
nodes (list (ast Node)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
class AssertBlock: | ||
class AssertBlock(object): | ||
""" | ||
Attributes: | ||
nodes (list (ast Node)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from enum import Enum | ||
|
||
ActBlockType = Enum('ActBlockType', 'marked_act pytest_raises result_assignment') | ||
ActBlockType = Enum('ActBlockType', 'marked_act pytest_raises result_assignment') # pylint: disable=invalid-name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ Sphinx | |
flake8 | ||
isort | ||
pygments | ||
pylint | ||
pytest | ||
pytest-flake8dir | ||
restructuredtext-lint | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
# ERROR CODES | ||
# NO_ERROR=0 | ||
FATAL_MESSAGE=1 | ||
ERROR_MESSAGE=2 | ||
# WARNING_MESSAGE=4 | ||
# REFACTOR_MESSAGE=8 | ||
CONVENTION_MESSAGE=16 | ||
USAGE_ERROR=32 | ||
|
||
set +e | ||
pylint flake8_aaa | ||
lint_code=$? | ||
set -e | ||
|
||
(((lint_code&FATAL_MESSAGE)>0 || (lint_code&ERROR_MESSAGE)>0 || (lint_code&USAGE_ERROR)>0 || (lint_code&CONVENTION_MESSAGE)>0)) && exit $lint_code | ||
|
||
echo "Ignoring WARNING_MESSAGE, REFACTOR_MESSAGE" | ||
|
||
exit 0 |