-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathpyproject.toml
More file actions
127 lines (117 loc) · 3.2 KB
/
Copy pathpyproject.toml
File metadata and controls
127 lines (117 loc) · 3.2 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
[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]
aiohttp = "^3.14.1"
beautifulsoup4 = "^4.12.3"
better-profanity = "^0.7.0"
bleach = "^6.4.0"
boto3 = "^1.35.33"
cryptography = "^48.0.1"
dnspython = "^2.8.0"
email-validator = "^2.2.0"
flask = { extras = ["async"], version = "^3.1.3" }
flask-migrate = "^4.0.7"
flask-sqlalchemy = "^3.1.1"
flask-wtf = "^1.2.1"
gunicorn = "^23.0.0"
markdown = "^3.8"
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.33.0"
ruff = "^0.4.7"
stripe = "^10.9.0"
Unidecode = "^1.3.8"
countrystatecity-countries = "^1.0.0"
[tool.poetry.group.dev.dependencies]
mypy = "^1.10.0"
pytest = ">=9.0.3,<10.0.0"
pytest-asyncio = "^1.3.0"
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"
types-setuptools = "^71.1.0.20240813"
[[tool.poetry.packages]]
include = "hushline"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
pythonpath = "."
asyncio_default_fixture_loop_scope = "function"
filterwarnings = [
# passlib unmaintianed, see: https://github.com/scidsg/hushline/issues/553
"ignore:.*'crypt' is deprecated.*:DeprecationWarning",
]
markers = [
"local_only",
"external_network",
]
[tool.coverage.report]
exclude_also = [
"^\\s*if TYPE_CHECKING:",
"^\\s*if __name__ == [\"']__main__[\"']:",
"^\\s*raise Exception\\(f\"Programming error\\..*",
]
[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)
"RET506", # superfluous-else-raise (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.13"
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