forked from scidsg/hushline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
111 lines (102 loc) · 2.41 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[tool.poetry]
name = "hushline"
version = "0.0.1"
description = "A lightweight, secure, and anonymous tip line for organizations and individuals."
authors = ["Science & Design, Inc. <hello@scidsg.org>"]
license = "AGPL 3.0"
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.11"
aiohttp = "^3.10.5"
cryptography = "^43.0.1"
email-validator = "^2.2.0"
flask = {extras = ["async"], version = "^3.0.3"}
flask-migrate = "^4.0.7"
flask-sqlalchemy = "^3.1.1"
flask-wtf = "^1.2.1"
gunicorn = "^22.0.0"
passlib = "^1.7.4"
psycopg = { extras = ["binary", "pool"], version = "^3.1.19" }
pyotp = "^2.9.0"
pysequoia = "^0.1.23"
qrcode = "^7.4.2"
requests = "^2.32.3"
ruff = "^0.4.7"
[tool.poetry.group.dev.dependencies]
beautifulsoup4 = "^4.12.3"
mypy = "^1.10.0"
pytest = "^8.1.1"
pytest-cov = "^5.0.0"
pytest-mock = "^3.12.0"
types-flask-migrate = "^4.0.0.20240311"
types-requests = "^2.32.0.20240712"
[[tool.poetry.packages]]
include = "hushline"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
pythonpath = "."
[tool.ruff]
line-length = 100
indent-width = 4
[tool.ruff.lint]
select = [
# pycodestyle errors
"E",
# pyflakes
"F",
# isort
"I",
# flake8-gettext
"INT",
# flake8-pie
"PIE",
# pylint
"PL",
# flake8-pytest-style
"PT",
# flake8-pyi
"PYI",
# flake8-return
"RET",
# flake8-bandit
"S",
# flake8-simplify
"SIM",
# pyupgrade
"UP",
# pycodestyle warnings
"W",
# Unused noqa directive
"RUF100",
]
ignore = [
# https://docs.astral.sh/ruff/rules/too-many-statements/
"PLR0915",
# https://docs.astral.sh/ruff/rules/too-many-return-statements/
"PLR0911",
# https://docs.astral.sh/ruff/rules/too-many-branches/
"PLR0912",
]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
# https://docs.astral.sh/ruff/rules/assert/
"S101",
"S105", # hardcoded password
# https://docs.astral.sh/ruff/rules/magic-value-comparison/
"PLR2004",
]
"migrations/versions/*.py" = [
# https://docs.astral.sh/ruff/rules/unsorted-imports/
"I001",
"S608", # sql injection via string-based query construction
]
[tool.mypy]
python_version = "3.12"
ignore_missing_imports = true
no_implicit_optional = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
warn_unused_configs = true
exclude = '^migrations/env\.py$|^migrations/versions/.*\.py$'