-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
120 lines (109 loc) · 3.47 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
[project]
name = "rss-to-webhook"
version = "0.0.4"
authors = [{ name = "mymoomin" }]
description = "Posts RSS updates to Discord webhooks"
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"aiohttp>=3.10.10",
"feedparser>=6.0.11",
"mmh3>=5.0.1",
"requests>=2.32.3",
"python-dotenv>=1.0.1",
"pymongo>=4.10.1",
"typer>=0.12.5",
]
[project.scripts]
rss-to-webhook = "rss_to_webhook.main:app"
[project.optional-dependencies]
lint = ["ruff>=0.6.9", "black>=24.10.0"]
test = [
"pytest>=8.3.3",
"pytest-cov>=5.0.0",
"pytest-codspeed>=2.2.1",
"mongomock>=4.2.0.post1 ",
"aioresponses>=0.7.6",
"responses>=0.25.3",
]
type = [
"rss_to_webhook[test]",
"mypy>=1.12.0",
"pyright>=1.1.384",
"types-requests>=2.32.0.20240914",
"types-urllib3>=1.26.25.14",
]
dev = [
"rss_to_webhook[lint,test,type]",
"tox>=4.21.2",
"tox-gh-actions>=3.2.0",
"tox-uv>=1.16.0",
]
[project.urls]
"Homepage" = "https://github.com/mymoomin/RSStoWebhook/"
"Bug Tracker" = "https://github.com/mymoomin/RSStoWebhook/issues"
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
# "--cov=rss_to_webhook", disabled because it breaks CodSpeed CI
]
testpaths = ["tests"]
[tool.coverage.run]
source = ["rss-to-webhook"]
omit = ["*/scripts/*", "__main__.py"]
branch = true
[tool.coverage.report]
fail_under = 95
show_missing = true
skip_covered = true
[tool.mypy]
exclude = ["src/rss_to_webhook/scripts"]
mypy_path = "$MYPY_CONFIG_FILE_DIR/typings"
check_untyped_defs = true
disallow_any_generics = true
ignore_missing_imports = false
no_implicit_optional = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
no_implicit_reexport = true
[tool.pyright]
include = ["src", "tests"]
exclude = ["src/rss_to_webhook/scripts"]
[tool.ruff]
line-length = 88
preview = true
exclude = ["__init__.py"]
src = ["src"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"T20", # Detects use of `print` rather than logging. One day I'll add it
"TRY300", # Forbids returning at the end of a try statement, but I think that looks better
"EM101", # Forbids putting short string literals in exception constructors, but this is normal.
"TRY003", # Forbids putting medium string literals in exception constructors, which gives errors on some code from the Python docs.
"COM", # Has trailing comma rules that conflict with black
"CPY", # Requires copyright notices. I simply do not care
"TD",
"FIX", # These disallow "# Todo" comments unless you jump through hoops, so I'm disabling them for now
"DOC402",
"DOC201",
"DOC501", # These require every function to document its return value, yield value, and exceptions raised. I don't think this is necessary
]
per-file-ignores = { "tests/*" = [
"D1", # Forbids public functions without docstrings, but also thinks that tests are part of the public api for some reason
"PLC2701", # Forbids importing private functions, but I want to do that in my tests bc I hate best practices
"S101", # Forbids use of `assert`, which pytest uses constantly
] }
pydocstyle = { convention = "google" }
flake8-bugbear = { extend-immutable-calls = ["typer.Argument"] }