-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathpyproject.toml
170 lines (154 loc) · 4.14 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
[build-system]
requires = [
"setuptools>=61.0",
"wheel",
]
build-backend = "setuptools.build_meta"
[project]
name = "mqpy"
authors = [
{email = "[email protected]", name = "Joao Euko"},
]
version = "0.6.11"
description = "I developed this library to simplify the process of creating an Expert Advisor in MQL5. While developing in MQL5 can be complex, the same task is more streamlined in Python."
requires-python = ">=3.8"
dependencies = []
readme = "README.md"
license = {text = "MIT"}
[project.scripts]
mqpy = "mqpy.__main__:main"
[project.optional-dependencies]
dev = [
"pre-commit>=4.0.1",
"pylint>=3.3.3",
"pytest>=8.3.4",
"pytest-cov>=6.0.0",
]
docs = [
"mkdocs>=1.6.1",
"mkdocs-gen-files>=0.5.0",
"mkdocs-jupyter>=0.25.1",
"mkdocs-literate-nav>=0.6.2",
"mkdocs-material>=9.6.12",
"mkdocs-section-index>=0.3.10",
"mkdocstrings[python]>=0.29.1",
]
[tool.setuptools]
packages = ["mqpy"]
[tool.semantic_release]
version_variable = [
"mqpy/version.py:__version__",
]
version_toml = [
"pyproject.toml:project.version",
]
commit_message = "chore(release): v{version}"
[tool.semantic_release.changelog]
retain_old_entries = true
# pre-commit
[tool.pytest.ini_options]
markers = []
[tool.mypy]
warn_unused_configs = true
ignore_missing_imports = true
disable_error_code = [
"attr-defined",
"name-defined",
"assignment",
"return-value",
"arg-type",
"index",
"misc",
"operator"
]
files = "**/*.py"
exclude = [
"venv",
"mt5",
"site-packages",
"^build/",
"^dist/"
]
[[tool.mypy.overrides]]
module = "MetaTrader5.*"
ignore_errors = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_decorators = false
disallow_any_generics = false
disallow_untyped_calls = false
check_untyped_defs = false
[[tool.mypy.overrides]]
module = "_virtualenv"
ignore_errors = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_decorators = false
disallow_any_generics = false
disallow_untyped_calls = false
check_untyped_defs = false
[tool.ruff]
line-length = 120
# Enable Pyflakes `E` and `F` codes by default.
lint.select = ["ALL"]
lint.ignore = [
"COM812", # Missing trailing comma, conflicting with the formatter
"ISC001", # Single line string concatenation, conflicting with the formatter that does it automatically
"ANN002", # MissingTypeArgs
"ANN003", # MissingTypeKwargs
"ANN101", # MissingTypeSelf
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"RET504", # Unnecessary variable assignment before `return` statement
"S301", # `pickle` and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
"PLE0605", # Invalid format for `__all__`, must be `tuple` or `list`
"PLR0912", # Too many branches
"G004", # Logging statement uses an f-string
"TD002", # Missing author in TODO
"TD003", # Missing issue link on the line following this TODO
"TRY003", # Long messages outside exception class
"FIX", # Not allowed to use TODO
"DTZ007", # Naive datetime constructed without %z
]
# Exclude a variety of commonly ignored directories.
lint.exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
lint.fixable = ["ALL"]
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
"conftest.py" = ["S101", "D100", "D103", "D417", "FBT001", "INP001"]
"test_*.py" = ["S101", "D100", "D103", "D417", "FBT001", "INP001", "SLF001", "FBT003"]
"mqpy/utilities.py" = ["FBT001"]
"docs/examples/*.py" = ["C901"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
allow-magic-value-types = [
"int",
"str",
]