Skip to content

Commit a2cbeae

Browse files
committed
Add pre-commit and linter configs
1 parent f4eade2 commit a2cbeae

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.pre-commit-config.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.5.0
4+
hooks:
5+
- id: check-merge-conflict
6+
- id: check-toml
7+
- id: check-yaml
8+
- id: end-of-file-fixer
9+
- id: trailing-whitespace
10+
args: [--markdown-linebreak-ext=md]
11+
- repo: https://github.com/pre-commit/pygrep-hooks
12+
rev: v1.5.1
13+
hooks:
14+
- id: python-check-blanket-noqa
15+
- repo: local
16+
hooks:
17+
- id: flake8
18+
name: Flake8
19+
description: This hook runs flake8 within our project's environment.
20+
entry: poetry run flake8
21+
language: system
22+
types: [python]
23+
require_serial: true

tox.ini

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[flake8]
2+
max-line-length=120
3+
docstring-convention=all
4+
import-order-style=pycharm
5+
application_import_names=bot,core
6+
exclude=.cache,.venv,.git
7+
ignore=
8+
B311,W503,E226,S311,T000
9+
# Missing Docstrings
10+
D100,D104,D105,D107,
11+
# Docstring Whitespace
12+
D203,D212,D214,D215,
13+
# Docstring Quotes
14+
D301,D302,
15+
# Docstring Content
16+
D400,D401,D402,D404,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414,D416,D417
17+
# Type Annotations
18+
ANN002,ANN003,ANN101,ANN102,ANN204,ANN206

0 commit comments

Comments
 (0)