From d841969e096159d242a1b832049cff6b67a1e02b Mon Sep 17 00:00:00 2001 From: hackish Date: Wed, 13 Sep 2023 13:02:02 -0700 Subject: [PATCH] * chore: add .flake8 configuration file * chore: add .pre-commit-config.yaml file with pre-commit hooks configuration * chore: add mxroute_relay/__init__.py file * chore: add pyproject.toml file with project metadata and dependencies configuration --- .flake8 | 3 +++ .pre-commit-config.yaml | 29 +++++++++++++++++++++++++++++ mxroute_relay/__init__.py | 0 pyproject.toml | 30 ++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 .flake8 create mode 100644 .pre-commit-config.yaml create mode 100644 mxroute_relay/__init__.py create mode 100644 pyproject.toml diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..dd0767d --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 160 +exclude = docs/*, .git, __pycache__, build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c094448 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,29 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + args: ['--maxkb=1024'] +- repo: https://github.com/asottile/reorder_python_imports + rev: v3.10.0 + hooks: + - id: reorder-python-imports + args: [--application-directories, '.:bronzeburner', --py39-plus] +- repo: https://github.com/psf/black + rev: 23.9.1 + hooks: + - id: black + language_version: python3.10 +- repo: https://github.com/PyCQA/bandit + rev: 1.7.5 + hooks: + - id: bandit + args: ["-c", "pyproject.toml"] + additional_dependencies: ["bandit[toml]"] +- repo: https://github.com/pycqa/flake8 + rev: 6.1.0 + hooks: + - id: flake8 diff --git a/mxroute_relay/__init__.py b/mxroute_relay/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1594585 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[tool.poetry] +name = "mxroute-relay" +version = "0.0.1" +description = "Firefox Relay clone for MXRoute forwarders" +authors = ["Darryl Nixon "] +license = "MIT" +readme = "README.md" +packages = [{ include = "mxroute_relay" }] + +[tool.poetry.dependencies] +python = "^3.10" +starlette-admin = "^0.11.2" +starlette = "^0.31.1" +SQLAlchemy = "^2.0.20" +flake8 = "^6.1.0" + +[tool.poetry.group.dev.dependencies] +black = "^23.9.1" +isort = "^5.12.0" +bandit = "^1.7.5" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + +[tool.bandit] +exclude_dirs = ["/docs"] + +[tool.black] +line-length = 160