Skip to content

Commit

Permalink
remove flake8 from githook (#109)
Browse files Browse the repository at this point in the history
* remove flake8 from githook

* Update CONTRIBUTING.md

* Update dev_setup.sh
  • Loading branch information
geoalgo authored Jun 14, 2019
1 parent 04c4735 commit a52a9d2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
12 changes: 1 addition & 11 deletions .devtools/githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ import textwrap
from pathlib import Path
from subprocess import CalledProcessError, check_output

# Third-party imports
import flake8.main.git


def type_check() -> int:
mypy_opts = ['--follow-imports=silent', '--ignore-missing-imports']
Expand Down Expand Up @@ -91,12 +88,5 @@ def style_check() -> int:
return e.returncode


def flake8_check() -> int:
return flake8.main.git.hook(
strict=flake8.main.git.config_for('strict'),
lazy=flake8.main.git.config_for('lazy'),
)


if __name__ == '__main__':
sys.exit(type_check() | style_check() | flake8_check())
sys.exit(type_check() | style_check())
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ GitHub provides additional document on [forking a repository](https://help.githu

For development you need the requirements listed in all `requirements...txt` files.

We use flake8, mypy, and [black](https://github.com/python/black) for style and
We use [black](https://github.com/python/black) and mypy for style and
type checking. Any code changes that you contribute should pass these checks.

The easiest way to get set up for development is to run the following script:
Expand Down
2 changes: 0 additions & 2 deletions dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ fi

# update location of Git hooks from default (.git/hooks) to the versioned folder .devtools/githooks
git config core.hooksPath ".devtools/githooks"
# use the flake8 Git pre-commit hook in strict mode (i.e., fail the commit on error)
git config --bool flake8.strict true

# install project requirements
python -m pip install -r requirements-setup.txt
Expand Down

0 comments on commit a52a9d2

Please sign in to comment.