-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathpyproject.toml
175 lines (164 loc) · 3.69 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
[project]
name = "homeassistant.sensor.feedparser"
version = "0.1.11"
description = "Home Assistant custom integration to parse RSS feeds"
maintainers = [
{name = "Ian Richardson", email = "[email protected]"},
{name = "Ondrej Gajdusek", email = "[email protected]"}
]
keywords = [
"homeassistant",
"rss",
"feedparser",
"feed",
"parser",
"custom-component",
"custom-integration"
]
classifiers = [
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.11"
]
requires-python = ">=3.11.0"
dependencies = [
"feedparser==6.0.11",
"homeassistant",
"python-dateutil",
"requests-file",
"requests"
]
[project.optional-dependencies]
dev = [
"black",
"homeassistant-stubs",
"pytest==8.0.0",
"mypy",
"ruff",
"types-python-dateutil",
"types-PyYAML",
"types-requests",
"voluptuous-stubs",
"pyyaml",
"bumpver"
]
[project.urls]
"Source Code" = "https://github.com/custom-components/feedparser"
"Bug Reports" = "https://github.com/custom-components/feedparser/issues"
[tool.setuptools]
py-modules = ["custom_components.feedparser"]
[tool.black]
line-length = 88
# skip-string-normalization = true
target-version = ["py311"]
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.mypy_cache
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
[tool.ruff]
# Enable the pycodestyle (`E`) and Pyflakes (`F`) rules by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = [
"ANN",
"ARG",
"ARG",
"B",
"C",
"COM",
"D",
"D",
"DTZ",
"E",
"EM",
"F",
"FBT",
"FBT",
"I",
"PGH",
"PL",
"PLR",
"PT",
"RET",
"RUF",
"SIM",
"SLF",
"TCH",
"TRY",
"UP"
]
# Q000,ANN,PT009,D,E501,
ignore = [
"D107", # Missing docstring in __init__
"FBT001", # Boolean positional arg in function definition
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the first line
"FBT001" # Boolean positional argument in function definition
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".pytype",
".ruff_cache",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"venv"
]
# Same as Black.
line-length = 88
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.11.
target-version = "py311"
[tool.ruff.per-file-ignores]
"tests/**" = ["S101"]
[tool.ruff.pylint]
max-args = 10
[[tool.mypy.overrides]]
module = "feedparser.*"
# Workaround till https://github.com/kurtmckee/feedparser/pull/282 gets merged to the main branch
disable_error_code = ["attr-defined", "import"]
[tool.pytest.ini_options]
pythonpath = [".", "tests"]
filterwarnings = [
"ignore:Inheritance class HomeAssistantApplication from web.Application is discouraged:DeprecationWarning"
]
[tool.bumpver]
current_version = "0.1.11"
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
commit_message = "bump version {old_version} -> {new_version}"
tag_message = "{new_version}"
tag_scope = "default"
pre_commit_hook = ""
post_commit_hook = ""
commit = true
tag = true
push = true
[tool.bumpver.file_patterns]
"pyproject.toml" = ['current_version = "{version}"', 'version = "{version}"']
"custom_components/feedparser/manifest.json" = ['version": "{version}"']
"custom_components/feedparser/sensor.py" = ['__version__ = "{version}"']