-
Notifications
You must be signed in to change notification settings - Fork 9
/
pyproject.toml
126 lines (114 loc) · 3.43 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
[build-system]
requires = ["poetry-core", "wheel", "setuptools-rust"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
line-length = 88
target-version = "py38"
[tool.ruff.lint]
# See https://beta.ruff.rs/docs/rules/#error-e
# for error codes. The ones we ignore are:
# E501: line too long (we don't normally run this check in other projects such as Synapse)
# E731: do not assign a lambda expression, use a def
#
# flake8-bugbear compatible checks. Its error codes are described at
# https://beta.ruff.rs/docs/rules/#flake8-bugbear-b
# B023: Functions defined inside a loop must not use variables redefined in the loop
ignore = [
"B023",
"E501",
"E731",
]
select = [
# pycodestyle
"E",
"W",
# pyflakes
"F",
# isort
"I001",
# flake8-bugbear
"B0",
# flake8-comprehensions
"C4",
# flake8-2020
"YTT",
# flake8-slots
"SLOT",
# flake8-debugger
"T10",
# flake8-pie
"PIE",
# flake8-executable
"EXE",
]
[tool.ruff.lint.isort]
combine-as-imports = true
section-order = ["future", "standard-library", "third-party", "twisted", "first-party", "testing", "local-folder"]
known-first-party = ["matrix_content_scanner"]
[tool.ruff.lint.isort.sections]
twisted = ["twisted", "OpenSSL"]
testing = ["tests"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.maturin]
manifest-path = "rust/Cargo.toml"
module-name = "matrix_content_scanner.mcs_rust"
[tool.poetry]
name = "matrix_content_scanner"
version = "1.2.1"
description = "A web service for scanning media hosted by a Matrix media repository"
authors = ["Element Backend Team <team-backend-synapse@element.io>"]
readme = "README.md"
license = "AGPL-3.0-only OR LicenseRef-Element-Commercial"
# Python version and licence classifiers are set automatically by Poetry
classifiers = []
include = [
{ path = "mypy.ini", format = "sdist" },
{ path = "scripts-dev", format = "sdist" },
{ path = "tests", format = "sdist" },
{ path = "Cargo.toml", format = "sdist" },
{ path = "Cargo.lock", format = "sdist" },
{ path = "rust/Cargo.toml", format = "sdist" },
{ path = "rust/build.rs", format = "sdist" },
{ path = "rust/src/**", format = "sdist" },
]
exclude = [
{ path = "src/*.so", format = "sdist"}
]
[tool.poetry.dependencies]
python = "^3.10.0"
attrs = ">=19.2.0"
aiohttp = ">=3.8.0"
jsonschema = ">=4.23.0"
pyyaml = ">=5.1.1"
# Required for decrypting files"
python-magic = ">=0.4.15,<0.5"
# Required for maintaining the result cache.
cachetools = ">=5.4.0"
# Required for processing user-defined values such as durations or sizes.
humanfriendly = ">=10.0"
# Required for calculating cache keys deterministically. Type annotations aren't
# discoverable in versions older than 1.6.3.
canonicaljson = ">=1.6.3"
setuptools_rust = ">=1.3"
[tool.poetry.dev-dependencies]
# for linting and formatting
ruff = "^0.7.2"
# for type checking
mypy = "*"
types-jsonschema = ">=3.2.0"
types-PyYAML = ">=5.4.10"
types-cachetools = "*"
types-humanfriendly = "*"
[tool.poetry.build]
script = "build_rust.py"
generate-setup-file = true
[tool.poetry.urls]
homepage = "https://github.com/element-hq/matrix-content-scanner"
documentation = "https://github.com/element-hq/matrix-content-scanner/blob/main/README.md"
repository = "https://github.com/element-hq/matrix-content-scanner.git"
[tool.poetry.scripts]
matrix-content-scanner = "matrix_content_scanner.mcs:main"