-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
135 lines (127 loc) · 3.02 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
[project]
name = "persica"
version = "0.1.0a5"
authors = [
{name = "luoshuijs", email = "[email protected]"},
]
description = "Automatic framework for Pythone"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"networkx>=3.3",
]
[tool.uv]
dev-dependencies = [
"black>=24.8.0",
"pytest-asyncio>=0.24.0",
"pytest-cov>=5.0.0",
"pytest>=8.3.3",
"ruff>=0.6.4",
]
[tool.hatch.build]
packages = ["persica"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
line-length = 120
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"PL", # pylint
"UP", # pyupgrade
"PERF", # Perflint
"FLY", # flynt
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"SIM", # flake8-simplify
"RET", # flake8-return
"RSE", # flake8-raise
"G", # flake8-logging-format
"ISC", # flake8-implicit-str-concat
"PT", # flake8-pytest-style
"ASYNC", # flake8-async
"TCH", # flake8-type-checking
"SLOT", # flake8-slots-slot
"PYI", # flake8-pyi
"Q", # flake8-quotes
"INP", # flake8-no-pep420
"YTT", # flake8-2020
"DTZ", # flake8-datetimez
"ARG", # flake8-unused-arguments
"S", # flake8-bandit
"ARG" , # flake8-print
"FURB", # refurb
"AIR", # Airflow
"TRY", # tryceratops
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"W191", # indentation contains tabs
"PLR0913", # Too many arguments in function definition
"PLR0917", # Too many positional arguments
"TRY003", # Avoid specifying long messages outside the exception class
"TRY400", # Use logging.exception instead of logging.xxxx
"ISC001", # The following rule may cause conflicts when used with the formatter: ISC001
]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["B018"] # Found useless expression. Either assign it to a variable or remove it.
"tests/**.py" = [
"ASYNC230", # Async functions should not open files with blocking methods like open
"DTZ",
"ARG",
"ASYNC109", # Async function definition with a timeout parameter
"D",
"S",
"TRY"
]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
log_format = "%(funcName)s - Line %(lineno)d - %(message)s"
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.run]
source = ["persica"]
omit = [
"tests/",
]
[tool.coverage.report]
exclude_also = [
"@overload",
"@abstractmethod",
"if TYPE_CHECKING:"
]