-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
176 lines (163 loc) · 3.68 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
171
172
173
174
175
176
[tool.poetry]
name = "discordbot"
version = "0.1.0"
description = "A discord bot made for Hacker/Maker spaces so that they can be assisted by a locally running LLM on discord."
authors = ["Francis Duvivier <francisduvivier@gmail.com>"]
license = "LICENSE"
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.11"
discord = "^2.3.2"
python-dotenv = "^1.0.0"
langchain = "^0.0.330"
pytest-cov = "^4.1.0"
llama-cpp-python = "^0.2.13"
pytest-asyncio = "^0.21.1"
[tool.poetry.group.dev.dependencies]
pytest = "^7.4.3"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
minversion = "7.3"
testpaths = "tests"
[tool.coverage.run]
branch = true
parallel = true
omit = [
"setup.py",
"discordbot/__init__.py",
"discordbot/version.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"raise AssertionError",
"raise NotImplementedError",
]
[tool.coverage.paths]
source = [
"discordbot/*",
]
[tool.coverage.html]
directory = "reports"
######## Tools
[tool.black]
target-version = ['py39']
line-length = 80
skip-string-normalization = false
skip-magic-trailing-comma = false
extend-exclude = '''
/(
| docs
| setup.py
)/
'''
[tool.isort]
py_version = 311
sections = [
"FUTURE",
"STDLIB",
"THIRDPARTY",
"FIRSTPARTY",
"LOCALFOLDER"
]
default_section = "FIRSTPARTY"
known_third_party = [
"numpy",
"pandas",
"keras",
"tensorflow",
"sklearn",
"matplotlib",
"scipy",
"h5py",
"seaborn",
"numba",
"gym",
"PyQt6",
"PyQt5",
"pyqtgraph",
"torch",
"tqdm"
]
known_first_party = []
known_local_folder = []
multi_line_output = 3
lines_after_imports = 2
force_single_line = true
use_parentheses = true
ensure_newline_before_comments = true
line_length = 80
include_trailing_comma = true
skip_glob = [
"docs/*",
"setup.py"
]
[tool.mypy]
# Platform configuration
python_version = "3.11"
# imports related
ignore_missing_imports = true
follow_imports = "silent"
# None and Optional handling
no_implicit_optional = true
strict_optional = true
# Configuring warnings
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
warn_return_any = false
# Untyped definitions and calls
check_untyped_defs = true
disallow_untyped_calls = false
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = false
# Disallow dynamic typing
disallow_subclassing_any = true
disallow_any_unimported = false
disallow_any_expr = false
disallow_any_decorated = false
disallow_any_explicit = false
disallow_any_generics = false
# Miscellaneous strictness flags
allow_untyped_globals = true
allow_redefinition = false
local_partial_types = false
implicit_reexport = true
strict_equality = true
# Configuring error messages
show_error_context = false
show_column_numbers = false
show_error_codes = true
[tool.ruff]
target-version = "py39"
select = ["F", "E"]
extend-select = ["W", "N", "UP", "B", "A", "C4", "PT", "SIM", "PD", "PLE", "RUF"]
ignore = ["SIM300"]
fixable = ["F", "E", "W", "UP", "B", "A", "C4"]
unfixable = []
line-length = 80
extend-exclude = ["tests", "test"]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.isort]
force-single-line = true
force-sort-within-sections = false
lines-after-imports = 2
[tool.ruff.mccabe]
max-complexity = 10
[tool.ruff.pycodestyle]
ignore-overlong-task-comments = true
[tool.ruff.pydocstyle]
convention = "numpy"
[tool.ruff.flake8-annotations]
allow-star-arg-any = false
ignore-fully-untyped = false