Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tune pre-commit config file #5178

Merged
merged 2 commits into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
repos:
- repo: local
hooks:
- id: check-changes
name: Check CHANGES
language: system
entry: ./tools/check_changes.py
pass_filenames: false
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v3.3.0'
hooks:
Expand All @@ -19,39 +26,32 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v3.3.0'
hooks:
- id: end-of-file-fixer
exclude: >-
^docs/[^/]*\.svg$
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: file-contents-sorter
files: |
CONTRIBUTORS.txt|
docs/spelling_wordlist.txt|
.gitignore|
.gitattributes
- id: check-case-conflict
- id: check-json
- id: check-xml
- id: check-executables-have-shebangs
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: check-added-large-files
- id: end-of-file-fixer
exclude: >-
^docs/[^/]*\.svg$
- id: requirements-txt-fixer
- id: trailing-whitespace
- id: check-symlinks
- id: file-contents-sorter
files: CONTRIBUTORS.txt
- id: debug-statements
# Another entry is required to apply file-contents-sorter to another file
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v3.3.0'
hooks:
- id: file-contents-sorter
files: docs/spelling_wordlist.txt
# Another entry is required to apply file-contents-sorter to another file
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v3.3.0'
hooks:
- id: file-contents-sorter
files: .gitignore
# Another entry is required to apply file-contents-sorter to another file
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v3.3.0'
hooks:
- id: file-contents-sorter
files: .gitattributes
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
exclude: ^examples/
- repo: https://github.com/asottile/pyupgrade
rev: 'v2.7.3'
hooks:
Expand Down
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,13 @@ cythonize: .install-cython $(PYXS:.pyx=.c)
lint: fmt mypy

.PHONY: fmt format
fmt format: check_changes
fmt format:
python -m pre_commit run --all-files --show-diff-on-failure

.PHONY: mypy
mypy:
mypy aiohttp

.PHONY: check_changes
check_changes:
./tools/check_changes.py


.develop: .install-deps $(call to-md5,$(PYS) $(CYS) $(CS))
pip install -e .
@touch .develop
Expand Down
1 change: 1 addition & 0 deletions examples/cli_app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
"""
Example of serving an Application using the `aiohttp.web` CLI.

Expand Down
1 change: 1 addition & 0 deletions examples/client_auth.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import asyncio

import aiohttp
Expand Down
1 change: 1 addition & 0 deletions examples/client_json.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import asyncio

import aiohttp
Expand Down
1 change: 1 addition & 0 deletions examples/fake_server.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import asyncio
import pathlib
import socket
Expand Down
1 change: 1 addition & 0 deletions examples/static_files.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import pathlib

from aiohttp import web
Expand Down