-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
113 lines (98 loc) · 3.13 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
[build-system]
build-backend = "hatchling.build"
requires = [ "hatchling" ]
[project]
name = "html-to-markdown"
version = "1.2.0"
description = "Convert HTML to markdown"
readme = "README.md"
keywords = [ "converter", "html", "markdown", "text-extraction", "text-processing" ]
license = { text = "MIT" }
authors = [ { name = "Na'aman Hirschfeld", email = "[email protected]" } ]
requires-python = ">=3.9"
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Text Processing",
"Topic :: Text Processing :: Markup",
"Topic :: Text Processing :: Markup :: HTML",
"Topic :: Text Processing :: Markup :: Markdown",
"Topic :: Utilities",
"Typing :: Typed",
]
dependencies = [
"beautifulsoup4>=4.12.3",
]
[dependency-groups]
dev = [
"covdefaults>=2.3",
"mypy>=1.14.1",
"pre-commit>=4.1",
"pytest>=8.3.4",
"pytest-cov>=6",
"pytest-mock>=3.14",
"ruff>=0.9.3",
"types-beautifulsoup4>=4.12.0.20241020",
]
[tool.hatch.build]
skip-excluded-dirs = true
[tool.hatch.build.targets.sdist]
only-include = [ "html_to_markdown" ]
[tool.hatch.build.targets.wheel]
only-include = [ "html_to_markdown" ]
[tool.ruff]
target-version = "py39"
line-length = 120
src = [ "html_to_markdown", "tests" ]
format.docstring-code-line-length = 120
format.docstring-code-format = true
lint.select = [ "ALL" ]
lint.ignore = [
"ANN401", # dynamically typed ANY
"COM812", # Conflicts with formatter
"D100", # # pydocstyle - missing docstring in public module
"D104", # pydocstyle - missing docstring in public package
"D107", # pydocstyle - missing docstring in __init__
"D205", # pydocstyle - 1 blank line required between summary line and description
"E501", # pycodestyle line too long, handled by ruff format
"EM", # Exception messages,
"FBT", # Boolean Args
"FIX", # we allow todo and fixme comments
"ISC001", # Conflicts with formatter
"PLR0913", # Pylint - too many arguments.
"PLR2004", # Magic variables, we allow them
"TD", # we allow todo and fixme comments
"TRY", # Try except block, rules are too strict
]
lint.per-file-ignores."tests/**/*.*" = [ "ARG", "D", "PD", "PT006", "PT013", "S" ]
lint.isort.known-first-party = [ "html_to_markdown", "tests" ]
lint.pydocstyle.convention = "google"
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.run]
omit = [ "tests/*" ]
plugins = [ "covdefaults" ]
source = [ "html_to_markdown" ]
[tool.coverage.report]
exclude_lines = [ 'if TYPE_CHECKING:' ]
fail_under = 100
[tool.mypy]
packages = [ "html_to_markdown", "tests" ]
python_version = "3.9"
implicit_reexport = false
show_error_codes = true
strict = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_any_generics = false
disallow_untyped_decorators = false
[tool.uv]
default-groups = [ "dev" ]