Skip to content

Instantly share code, notes, and snippets.

@khyurri
Created October 25, 2021 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save khyurri/356427cbb7abdf8d6b85e24f12c52c23 to your computer and use it in GitHub Desktop.
Save khyurri/356427cbb7abdf8d6b85e24f12c52c23 to your computer and use it in GitHub Desktop.
Python project configuration
# .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 19.3b0
hooks:
- id: black
language_version: python3
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
args:
[
"-sn",
"--rcfile=pylintrc"
]
language: system
types: [ python ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.910"
hooks:
- id: mypy
# pylintrc
[FORMAT]
max-line-length = 79
[MESSAGE CONTROL]
disable = missing-module-docstring,
missing-class-docstring,
missing-function-docstring,
import-error,
wrong-import-order
# mypy.ini
[mypy]
python_version = 3.9
strict = True
plugins = pydantic.mypy
[mypy-uvicorn.*]
ignore_missing_imports = True
# pyproject.toml
[tool.black]
line-length = 79
# requiremets.txt
# requirements_dev.txt
-r requirements.txt
# setup.py
from setuptools import setup
packages = ["indigo_service"]
package_data = {"": ["*"]}
install_requires = [
"fastapi>=0.63.0",
"uvicorn[standard]>=0.13.3",
]
entry_points = {
"console_scripts": [
"indigo_service = indigo_service.indigo_http:run_debug"
]
}
setup_kwargs = {
"name": "i",
"version": "0.0.1",
"description": "",
"long_description": None,
"author": "Ruslan Khyurri",
"author_email": "ruslan_khyurri@epam.com",
"maintainer": None,
"maintainer_email": None,
"url": None,
"packages": packages,
"package_data": package_data,
"install_requires": install_requires,
"entry_points": entry_points,
"python_requires": ">=3.7",
}
setup(**setup_kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment