Skip to content

Commit

Permalink
updated dev linting and required config files
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhanson committed Oct 7, 2022
1 parent dec2563 commit 93757a8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
Empty file added .codespellignore
Empty file.
12 changes: 0 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@ repos:
rev: 4.0.1
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.942
hooks:
- id: mypy
args:
- --explicit-package-bases
additional_dependencies:
- click != 8.1.0
- pystac
- types-requests
- types-setuptools
- stactools
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
Expand Down
25 changes: 25 additions & 0 deletions scripts/lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

set -e

if [[ -n "${CI}" ]]; then
set -x
fi

function usage() {
echo -n \
"Usage: $(basename "$0")
Execute project linters.
"
}

if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
if [ "${1:-}" = "--help" ]; then
usage
else
# Lint
pre-commit run flake8 --all-files
# Type checking
# pre-commit run mypy --all-files
fi
fi

0 comments on commit 93757a8

Please sign in to comment.