Skip to content

Commit

Permalink
Flake8 fails build for syntax errors, but prints warnings for style e…
Browse files Browse the repository at this point in the history
…rrors.
  • Loading branch information
dekuenstle committed Feb 24, 2021
1 parent 0651089 commit 96face5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[flake8]
max-line-length = 127
exclude = .git,__pycache__,doc/,docs/,build/,dist/,archive/,setup.py
ignore = E121,E123,E126,E226,E24,E704,W503,W504,C901
ignore = E121,E123,E126,E226,E24,E704,W292,W503,W504,C901
per-file-ignores =
__init__.py:F401
12 changes: 11 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@ jobs:
pip install -e .[r_wrapper,tests,docs]
- name: Lint with flake8
run: |
flake8 . --count --statistics
# stop the build if there are Python syntax errors or undefined names
# E9: Runtime errors (syntax, indentation, io)
# F63: Wrong use of operators and always-true assertion tests
# F7: Wrong position of statements (break, continue, return, ...)
# F82: Undefined (variable) name
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
#
# print warnings if other style errors are found.
# see .flake8 config file for selected/ignored rules.
# warnings can be found in the action logs
flake8 . --count --exit-zero --statistics --show-source
- name: Test with pytest and measure coverage
run: |
pytest cblearn --cov=cblearn --cov-report=xml
Expand Down
1 change: 1 addition & 0 deletions cblearn/embedding/tests/test_sklearn_estimator_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def wrap_triplet_estimator(estimator):
'check_methods_sample_order_invariance',
]


@pytest.mark.sklearn
@parametrize_with_checks(
ALL_TRIPLET_EMBEDDING_ESTIMATORS
Expand Down

0 comments on commit 96face5

Please sign in to comment.