Skip to content

Commit

Permalink
Merge pull request constverum#4 from afunTW/master
Browse files Browse the repository at this point in the history
WIP: ADD: using pre-commit for code quality
  • Loading branch information
bluet authored Jul 2, 2020
2 parents 15b69b0 + 8ce5c33 commit 3f26fed
Show file tree
Hide file tree
Showing 30 changed files with 848 additions and 289 deletions.
2 changes: 2 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
known_third_party = aiodns,aiohttp,alabaster,cachetools,maxminddb,pytest,setuptools
47 changes: 47 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.6
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args:
- environment.yml
- .pre-commit-config.yaml
- readthedocs.yml
- .travis.yml
- id: check-merge-conflict
- id: flake8
args: [--config=setup.cfg, --ignore=E501]
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
name: black
language_version: python3.6
description: "Black: The uncompromising Python code formatter"
entry: black
require_serial: true
args:
- -v
- -l 88
- repo: https://github.com/asottile/seed-isort-config
rev: v2.1.0
hooks:
- id: seed-isort-config
- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.21
hooks:
- id: isort
args:
- -rc
- repo: https://github.com/PyCQA/pydocstyle
rev: 5.0.2
hooks:
- id: pydocstyle
args: [--select=D105]
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ matrix:
- python3 -m venv env
- source env/bin/activate
allow_failures:
- name: "3.5"
- name: "3.8-dev"
- name: "osx-py3.7"
install:
Expand Down
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,3 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

26 changes: 26 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
aiohttp = ">=3.5.4"
aiodns = ">=2.0.0"
attrs = "==19.1.0"
maxminddb = ">=1.4.1"
pre-commit = "*"
black = "*"
"flake8" = ">=3.7"
isort = ">=4.3"
pytest = ">=4.3"
pytest-asyncio = ">=0.10"
pytest-runner = ">=4.4"
pytest-isort = ">=0.3"
"pytest-flake8" = ">=1.0"
pytest-mock = ">=1.10.1"
cachetools = "*"

[dev-packages]

[requires]
python_version = "3.6"
Loading

0 comments on commit 3f26fed

Please sign in to comment.