-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathpyproject.toml
More file actions
145 lines (130 loc) · 3.77 KB
/
pyproject.toml
File metadata and controls
145 lines (130 loc) · 3.77 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
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
[project]
name = "nautilus_data"
version = "0.18.0"
description = "Example data for use with NautilusTrader"
authors = [{ name = "Nautech Systems", email = "info@nautechsystems.io" }]
requires-python = ">=3.13"
dependencies = ["nautilus_trader>=1.220.0", "requests>=2.32.5,<3.0.0"]
[dependency-groups]
dev = [
"pre-commit>=4.0.0",
"pytest>=8.0.0",
"ruff>=0.14.0",
"mypy>=1.18.2",
"zizmor>=1.14.2",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.uv.sources]
nautilus_trader = { index = "nautechsystems" }
[[tool.uv.index]]
name = "nautechsystems"
url = "https://packages.nautechsystems.io/simple"
##########################################################
# Formatter configs #
##########################################################
[tool.docformatter]
make-summary-multi-line = true
pre-summary-new-line = true
blank = true
recursive = true
in-place = true
##########################################################
# Linter configs #
##########################################################
[tool.ruff]
target-version = "py313"
line-length = 100
exclude = [
".benchmarks",
".eggs",
".git",
".mypy_cache",
".pytest_cache",
".ruff_cache",
".venv",
"dist",
"venv",
]
[tool.ruff.lint]
select = [
"C4",
"E",
"F",
"W",
"C90",
"D",
# "DTZ",
"UP",
"S",
"T10",
"ICN",
"PIE",
# "PT",
"PYI",
"Q",
"I",
"RSE",
"TID",
# "SIM",
# "ARG",
# "ERA",
"PD",
# "PGH",
# "PLW",
"NPY",
"RUF",
]
ignore = [
"D100", # Missing docstring in public module **fix**
"D101",
"D102", # Missing docstring in public method **fix**
"D103", # Missing docstring in public function **fix**
"D104", # Missing docstring in public package **fix**
"D107",
"D105",
"D200", # One-line docstring should fit on one line with quotes (optional style)
"D203", # 1 blank line required before class docstring (optional style)
"D205", # 1 blank line required between summary line and description (optional style)
"D212", # Multi-line docstring summary should start at the first line (optional style)
"D400", # First line should end with a period (not always a first line)
"D413", # Missing blank line after last section ('Parameters')
"D415", # First line should end with a period, question mark, or exclamation point (not always a first line)
"D416", # Section name should end with a colon ('Warnings:', not 'Warnings') (incorrect?)
"E741", # Ambiguous variable name (single char)
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"S101", # Use of assert detected (OK in test suite)
"S105", # Use of hard-coded password (spurious)
"S106", # Use of hard-coded password (spurious)
"S113", # Probable use of requests call without timeout **fix**
"S603", # `subprocess` call: check for execution of untrusted input **fix**
]
# Allow autofix for all enabled rules (when `--fix`) is provided
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.isort]
combine-as-imports = true
force-single-line = true
single-line-exclusions = ["typing"]
lines-after-imports = 2
split-on-trailing-comma = true
[tool.ruff.lint.mccabe]
max-complexity = 10
##########################################################
# Static analysis configs #
##########################################################
[tool.mypy]
python_version = "3.13"
allow_incomplete_defs = true
explicit_package_bases = true
ignore_missing_imports = true
namespace_packages = true
no_strict_optional = true
warn_no_return = true
warn_unused_configs = true
warn_unused_ignores = true