-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathpyproject.toml
112 lines (103 loc) · 2.83 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
112
[tool.poetry]
name = "hushline"
version = "0.0.1"
description = "A lightweight, secure, and anonymous tip line for organizations and individuals."
authors = ["Science & Design, Inc. <[email protected]>"]
license = "AGPL 3.0"
readme = "README.md"
[tool.poetry.dependencies]
aiohttp = "^3.10.11"
bleach = "^6.2.0"
boto3 = "^1.35.33"
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"
markdown = "^3.7"
passlib = "^1.7.4"
psycopg = { extras = ["binary", "pool"], version = "^3.1.19" }
pyotp = "^2.9.0"
pysequoia = "^0.1.23"
python = "^3.11"
qrcode = "^7.4.2"
requests = "^2.32.3"
ruff = "^0.4.7"
stripe = "^10.9.0"
types-bleach = "^6.2.0.20241123"
types-markdown = "^3.7.0.20241204"
types-requests = "^2.32.0.20240712"
types-setuptools = "^71.1.0.20240813"
[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-bleach = "^6.2.0.20241123"
types-flask-migrate = "^4.0.0.20240311"
types-markdown = "^3.7.0.20240822"
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 = "."
filterwarnings = [
# passlib unmaintianed, see: https://github.com/scidsg/hushline/issues/553
"ignore:.*'crypt' is deprecated.*:DeprecationWarning",
]
[tool.ruff]
line-length = 100
indent-width = 4
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"INT", # flake8-gettext
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"RET", # flake8-return
"S", # flake8-bandit
"SIM", # flake8-simplify
"UP", # pyupgrade
"W", # pycodestyle warnings
"RUF100", # Unused noqa directive
]
ignore = [
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0915", # too-many-statements
"RET505", # superfluous-else-return (can too easily lead to bugs)
]
[tool.ruff.lint.per-file-ignores]
"migrations/versions/*.py" = [
"I001", # unsorted-imports
"S608", # hardcoded-sql-expression
]
"tests/*.py" = [
"PLR2004", # magic-value-comparison
"S101", # assert
"S105", # hardcoded-password-string
"S311", # suspicious-non-cryptographic-random-usage
]
"tests/migrations/*.py" = [
"S608", # hardcoded-sql-expression
]
[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$"
explicit_package_bases = false
no_namespace_packages = true