Skip to content

Commit 760ac59

Browse files
committed
Initial commit.
Signed-off-by: Pavel Kirilin <[email protected]>
0 parents  commit 760ac59

File tree

13 files changed

+2378
-0
lines changed

13 files changed

+2378
-0
lines changed

.flake8

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
[flake8]
2+
max-complexity = 6
3+
inline-quotes = double
4+
max-line-length = 88
5+
extend-ignore = E203
6+
docstring_style=sphinx
7+
8+
ignore =
9+
; Found a line that starts with a dot
10+
WPS348,
11+
; `noqa` comments overuse ))))
12+
WPS402,
13+
; Found `%` string formatting
14+
WPS323,
15+
; Found block variable overlap.
16+
WPS440,
17+
; Found multi-line function type annotation
18+
WPS320,
19+
; Found statement that has no effect
20+
WPS428,
21+
; Found wrong variable name
22+
WPS110,
23+
; Found unpythonic getter or setter
24+
WPS615,
25+
; Found `f` string
26+
WPS305,
27+
; Missing docstring in public module
28+
D100,
29+
; Missing docstring in magic method
30+
D105,
31+
; Missing docstring in __init__
32+
D107,
33+
; Found class without a base class
34+
WPS306,
35+
; Missing docstring in public nested class
36+
D106,
37+
; First line should be in imperative mood
38+
D401,
39+
; Found `__init__.py` module with logic
40+
WPS412,
41+
; Found implicit string concatenation
42+
WPS326,
43+
; Found string constant over-use
44+
WPS226,
45+
; Found upper-case constant in a class
46+
WPS115,
47+
; Found nested function
48+
WPS430,
49+
; Found using `@staticmethod`
50+
WPS602,
51+
; Found method without arguments
52+
WPS605,
53+
; Found overused expression
54+
WPS204,
55+
; Found too many module members
56+
WPS202,
57+
; Found too high module cognitive complexity
58+
WPS232,
59+
; line break before binary operator
60+
W503,
61+
; Found module with too many imports
62+
WPS201,
63+
; Found vague import that may cause confusion: X
64+
WPS347,
65+
; Inline strong start-string without end-string.
66+
RST210,
67+
; subprocess call with shell=True seems safe, but may be changed in the future.
68+
S602,
69+
; Starting a process with a partial executable path.
70+
S607,
71+
; Consider possible security implications associated with subprocess module.
72+
S404,
73+
; Found nested class
74+
WPS431,
75+
; Found wrong module name
76+
WPS100,
77+
; Found too many methods
78+
WPS214,
79+
; Found too long ``try`` body
80+
WPS229,
81+
; Found function with too much cognitive complexity
82+
WPS231,
83+
; Found too deep nesting
84+
WPS220,
85+
; Found line with high Jones Complexity
86+
WPS221,
87+
; function name should be lowercase
88+
N802,
89+
; Do not perform function calls in argument defaults.
90+
B008,
91+
92+
; all init files
93+
__init__.py:
94+
; ignore not used imports
95+
F401,
96+
; ignore import with wildcard
97+
F403,
98+
; Found wrong metadata variable
99+
WPS410,
100+
101+
per-file-ignores =
102+
; all tests
103+
test_*.py,tests.py,tests_*.py,*/tests/*:
104+
; Use of assert detected
105+
S101,
106+
; Found magic number
107+
WPS432,
108+
; Missing parameter(s) in Docstring
109+
DAR101,
110+
; Found too short name
111+
WPS111,
112+
; Found complex default value
113+
WPS404,
114+
115+
exclude =
116+
./.git,
117+
./venv,
118+
./cached_venv,
119+
./var,

.gitignore

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
coverage.*
9+
10+
# Distribution / packaging
11+
.Python
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
cover/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
db.sqlite3-journal
64+
65+
# Flask stuff:
66+
instance/
67+
.webassets-cache
68+
69+
# Scrapy stuff:
70+
.scrapy
71+
72+
# Sphinx documentation
73+
docs/_build/
74+
75+
# PyBuilder
76+
.pybuilder/
77+
target/
78+
79+
# Jupyter Notebook
80+
.ipynb_checkpoints
81+
82+
# IPython
83+
profile_default/
84+
ipython_config.py
85+
86+
# pyenv
87+
# For a library or package, you might want to ignore these files since the code is
88+
# intended to run in multiple environments; otherwise, check them in:
89+
# .python-version
90+
91+
# pipenv
92+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
94+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
95+
# install all needed dependencies.
96+
#Pipfile.lock
97+
98+
# poetry
99+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
100+
# This is especially recommended for binary packages to ensure reproducibility, and is more
101+
# commonly ignored for libraries.
102+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
103+
#poetry.lock
104+
105+
# pdm
106+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
107+
#pdm.lock
108+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
109+
# in version control.
110+
# https://pdm.fming.dev/#use-with-ide
111+
.pdm.toml
112+
113+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
114+
__pypackages__/
115+
116+
# Celery stuff
117+
celerybeat-schedule
118+
celerybeat.pid
119+
120+
# SageMath parsed files
121+
*.sage.py
122+
123+
# Environments
124+
.env
125+
.venv
126+
env/
127+
venv/
128+
ENV/
129+
env.bak/
130+
venv.bak/
131+
132+
# Spyder project settings
133+
.spyderproject
134+
.spyproject
135+
136+
# Rope project settings
137+
.ropeproject
138+
139+
# mkdocs documentation
140+
/site
141+
142+
# mypy
143+
.mypy_cache/
144+
.dmypy.json
145+
dmypy.json
146+
147+
# Pyre type checker
148+
.pyre/
149+
150+
# pytype static type analyzer
151+
.pytype/
152+
153+
# Cython debug symbols
154+
cython_debug/
155+
156+
# PyCharm
157+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
158+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
159+
# and can be added to the global gitignore or merged into this file. For a more nuclear
160+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
161+
.idea/
162+
.vscode/
163+
164+
## For docs
165+
node_modules
166+
.temp
167+
.cache

.pre-commit-config.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v2.4.0
6+
hooks:
7+
- id: check-ast
8+
- id: trailing-whitespace
9+
- id: check-toml
10+
- id: end-of-file-fixer
11+
12+
- repo: https://github.com/asottile/add-trailing-comma
13+
rev: v2.1.0
14+
hooks:
15+
- id: add-trailing-comma
16+
17+
- repo: local
18+
hooks:
19+
- id: black
20+
name: Format with Black
21+
entry: poetry run black
22+
language: system
23+
types: [python]
24+
25+
- id: autoflake
26+
name: autoflake
27+
entry: poetry run autoflake
28+
language: system
29+
types: [ python ]
30+
args: [ --in-place, --remove-all-unused-imports, --remove-duplicate-keys ]
31+
32+
- id: isort
33+
name: isort
34+
entry: poetry run isort
35+
language: system
36+
types: [ python ]
37+
38+
- id: flake8
39+
name: Check with Flake8
40+
entry: poetry run flake8
41+
language: system
42+
pass_filenames: false
43+
types: [ python ]
44+
args: [--count, taskiq_dependencies]
45+
46+
- id: mypy
47+
name: Validate types with MyPy
48+
entry: poetry run mypy
49+
language: system
50+
types: [ python ]
51+
52+
- id: yesqa
53+
name: Remove usless noqa
54+
entry: poetry run yesqa
55+
language: system
56+
types: [ python ]

0 commit comments

Comments
 (0)