-
-
Notifications
You must be signed in to change notification settings - Fork 427
Expand file tree
/
Copy pathpyproject.toml
More file actions
103 lines (90 loc) · 2.21 KB
/
Copy pathpyproject.toml
File metadata and controls
103 lines (90 loc) · 2.21 KB
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
[project]
name = "blocklist-project"
version = "2.0.0"
description = "DNS blocklists for various categories - complete rewrite"
readme = "README.md"
license = { text = "Unlicense" }
requires-python = ">=3.10"
dependencies = [
"pyyaml>=6.0",
"tldextract>=5.0",
"click>=8.0",
"requests>=2.31.0",
"PyGithub>=2.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov>=4.0",
"ruff>=0.8.0",
"mypy>=1.0",
"pre-commit>=3.0",
]
[project.scripts]
blocklist = "src.build:main"
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["src*"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
addopts = "-v --tb=short --cov=src --cov-report=html --cov-report=term-missing"
[tool.coverage.run]
source = ["src"]
omit = ["tests/*", "scripts/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"RET", # flake8-return
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"RUF", # ruff-specific rules
]
ignore = [
"E501", # line too long (handled by formatter)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403"]
"tests/**" = ["S101", "PLR2004", "ARG001"]
"scripts/**" = ["T201"] # Allow print in scripts
[tool.ruff.lint.isort]
known-first-party = ["src"]
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
check_untyped_defs = true
no_implicit_optional = true
strict_equality = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false