Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pylint and mypy linting #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ matrix:
# and prints a coverage report at the end.
- env: PYTHON_VERSION="3.6" COVERAGE="true"
# This environment doesn't run tests, but does check for lint violations.
# - env: PYTHON_VERSION="3.6" RUN_LINT="true" SKIP_TESTS="true"
- env: PYTHON_VERSION="3.6" RUN_LINT="true" SKIP_TESTS="true"

notifications:
email: false
Expand Down
2 changes: 1 addition & 1 deletion build_tools/travis/test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ run_tests() {

if [[ "$RUN_LINT" == "true" ]]; then
echo "Running linter and mypy"
pylint --disable-warnings kglm
pylint kglm
mypy --ignore-missing-imports --no-strict-optional kglm
fi

Expand Down
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
git+git://github.com/rloganiv/allennlp.git@pytorch-grad-clip

# Linting
# Checks style, syntax, and other useful errors.
pylint==1.8.1
# Static type checking
mypy==0.521

# Coverage reports
pytest-cov
codecov