Skip to content

Commit

Permalink
Fix linting problems with black (by pinning click) and flake8 (#39)
Browse files Browse the repository at this point in the history
* Pin click to 8.0.1 in .pre-commit-config.yaml as well.

* Remove click from requirements.txt.

* Fix flake8 docstring errors (RST399, RST499) by minor docstring format improvements.
  • Loading branch information
msmdev authored Jul 28, 2022
1 parent b09fa66 commit ec4b04e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
rev: 20.8b1
hooks:
- id: black
additional_dependencies: [toml]
additional_dependencies: ['click==8.0.1', toml]
- repo: https://github.com/timothycrosley/isort
rev: 5.7.0
hooks:
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# pin click to fix "ImportError: cannot import name '_unicodefun' from 'click'" error from black during linting
click==8.0.1
docrep>=0.3.1
# pin jinja2 to fix "module 'jinja2.utils' has no attribute 'escape'" error during linting
jinja2==3.0.3
Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3831,6 +3831,8 @@ def test_matrix_2_eigenvectors() -> np.ndarray:
@pytest.fixture(scope="session")
def test_matrix_3() -> np.ndarray:
"""
Definition of test_matrix_3.
Parameters
----------
Expand Down
2 changes: 2 additions & 0 deletions tests/test_gpcca.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def _assert_schur(

def _find_permutation(expected: np.ndarray, actual: np.ndarray) -> np.ndarray:
"""
Find a permutation of a matrix.
Parameters
----------
expected
Expand Down

0 comments on commit ec4b04e

Please sign in to comment.