-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
122 lines (105 loc) · 2.53 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
[project]
name = "httpie-csrf"
version = "1.0.0"
description = "CSRF plugin for HTTPie."
authors = [
{ name = "Xdynix", email = "Lizard.rar@gmail.com" },
]
dependencies = [
"httpie<4.0.0,>=3.2.0",
"requests<3.0.0,>=2.28.0",
"python-decouple>=3.8",
]
requires-python = ">=3.10"
readme = "README.md"
license = { text = "MIT" }
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project.entry-points."httpie.plugins.transport.v1"]
httpie_csrf = "httpie_csrf.plugin:HttpieCsrfPlugin"
[tool.pdm]
distribution = true
[tool.pdm.dev-dependencies]
lint = [
"pre-commit>=3.7.1",
"mypy>=1.10.1",
"types-requests>=2.32.0.20240622",
]
test = [
"pytest>=8.2.2",
"pytest-cov>=5.0.0",
"pytest-mock>=3.14.0",
]
[tool.pdm.scripts.post_install]
cmd = ["pre-commit", "install"]
help = "install pre-commit hooks"
[tool.pdm.scripts.lint]
cmd = ["pre-commit", "run", "--all-files"]
env = { PYTHONUTF8 = "1" }
help = "execute linters"
[tool.pdm.scripts.test]
cmd = ["pytest", "--cov", "httpie_csrf"]
help = "execute test cases"
[tool.ruff]
cache-dir = ".cache/ruff"
target-version = "py310"
[tool.ruff.lint]
select = [
"F", # Pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"UP", # pyupgrade
"S", # flake8-bandit
"B", # flake8-bugbear
"C", # flake8-comprehensions
"DJ", # flake8-django
"T20", # flake8-print
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"FURB", # refurb
"RUF", # Ruff-specific rules
]
ignore = [
# Suppressed by ruff formatter.
"W191", # tab-indentation
"E111", # indentation-with-invalid-multiple
"E114", # indentation-with-invalid-multiple-comment
"E117", # over-indented
]
[tool.ruff.lint.per-file-ignores]
"test_*.py" = [
"S101", # assert
]
[tool.mypy]
strict = true
cache_dir = ".cache/mypy"
[[tool.mypy.overrides]]
module = "httpie.plugins"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "decouple"
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = "tests"
cache_dir = ".cache/pytest"
addopts = [
"--import-mode", "importlib",
"--cov-config", "pyproject.toml",
"--cov-report", "term",
"--cov-report", "html",
"--cov-fail-under", "100",
]
[tool.coverage.run]
branch = true
data_file = ".cache/coverage/data.db"
disable_warnings = ["no-data-collected"]
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
]
[tool.coverage.html]
directory = ".cache/cov-report"