-
Notifications
You must be signed in to change notification settings - Fork 10
/
pyproject.toml
157 lines (145 loc) · 3.61 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
[tool.poetry]
name = "FeedForBot"
version = "0.1.0"
description = "Forward links from RSS/Atom feeds to messengers"
authors = ["Aleksandr Shpak <shpaker@gmail.com>"]
readme = "README.md"
homepage = "https://github.com/shpaker/feedforbot"
repository = "https://github.com/shpaker/feedforbot"
[tool.poetry.scripts]
feedforbot = 'feedforbot.cli:main'
[tool.poetry.dependencies]
python = ">=3.10"
aiocron = "^1.8"
aiofiles = "^23.2.1"
beautifulsoup4 = "^4.12.2"
click = "^8.1.7"
feedparser = "^6.0.10"
httpx = "^0.26.0"
jinja2 = "^3.1.2"
orjson = "^3.9.10"
pydantic = "^2.6.0"
pyyaml = "^6.0.1"
sentry-sdk = "^1.40.0"
[tool.poetry.group.dev.dependencies]
pre-commit = "^3.5.0"
[tool.poetry.group.linters.dependencies]
bandit = "^1.7"
black = "^24.2"
isort = {extras = ["colors"], version = "^5.13"}
mypy = "^1.8"
ruff = "^0.2"
safety = "^2.0"
types-aiofiles = "^23.2.0"
types-beautifulsoup4 = "^4.12.0.7"
types-pyyaml = "^6.0.12"
[tool.poetry.group.tests.dependencies]
freezegun = "^1.2.2"
pytest = "^7.4.3"
pytest-asyncio = "^0.21.1"
respx = "^0.20.2"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 79
src_paths = ["feedforbot", "tests"]
skip = [".mypy_cache", ".pytest_cache", "venv"]
[tool.mypy]
python_version = 3.10
plugins = [
"pydantic.mypy"
]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[[tool.mypy.overrides]]
module = ["feedparser.*", "aiocron"]
ignore_missing_imports = true
[tool.black]
line-length = 79
verbose = 1
color = true
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.mypy_cache
| \.pytest_cache
| \.venv
)/
)
'''
[tool.ruff]
target-version = "py310"
line-length = 120
exclude = [
".venv",
]
lint.ignore = [
"PLR0913", # Too many arguments to function call
"PTH123", # PTH123 `open("foo")` should be replaced by `Path("foo").open()`
"RUF001", # Docstring contains ambiguous chars
"RUF002", # Docstring contains ambiguous chars
"RUF003", # Docstring contains ambiguous chars
]
lint.flake8-tidy-imports.ban-relative-imports = "all"
lint.mccabe.max-complexity = 20
lint.select = [
"F", # Pyflakes
"E", # pycodestyle
"C90", # mccabe
# "I", # isort
# "N", # pep8-naming
# "D", # pydocstyle
"UP", # pyupgrade
"YTT", # flake8-2020
# "ANN", # flake8-annotations
# "S", # flake8-bandit
"BLE", # flake8-blind-except
# "FBT", # flake8-boolean-trap
"B", # flake8-bugbear
# "A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
# "EM", # flake8-errmsg
"EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
# "ICN", # flake8-import-conventions
"G", # flake8-logging-format
"INP", # flake8-no-pep420
# "PIE", # flake8-pie
"T20", # flake8-print
# "PT", # flake8-pytest-style
# "Q", # flake8-quotes
"RET", # flake8-return
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
# "PD", # pandas-vet
# "PGH", # pygrep-hooks
"PL", # Pylint
"TRY", # tryceratops
"RSE", # flake8-raise
"SLF", # flake8-self
"RUF", # Ruff-specific rules
]