-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
160 lines (139 loc) · 3.77 KB
/
pyproject.toml
File metadata and controls
160 lines (139 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
[project]
name = "amplifier-bundle-python-dev"
version = "0.1.0"
description = "Comprehensive Python development tools for Amplifier - code quality, LSP, and expert agent"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11"
authors = [
{ name = "Microsoft", email = "amplifier@microsoft.com" }
]
keywords = [
"amplifier",
"python",
"linting",
"type-checking",
"code-quality",
"ruff",
"pyright",
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing",
]
dependencies = [
"ruff>=0.8.0",
"pyright>=1.1.390",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.23.0",
]
# No CLI entry point - this is a library + bundle, not a standalone tool
# Tool functionality is provided via modules/tool-python-check/
[project.urls]
Homepage = "https://github.com/microsoft/amplifier-bundle-python-dev"
Documentation = "https://github.com/microsoft/amplifier-bundle-python-dev#readme"
Repository = "https://github.com/microsoft/amplifier-bundle-python-dev"
Issues = "https://github.com/microsoft/amplifier-bundle-python-dev/issues"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/amplifier_bundle_python_dev"]
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/modules",
"/behaviors",
"/agents",
"/context",
"/docs",
"/bundle.yaml",
"/README.md",
"/LICENSE",
]
# =============================================================================
# Tool Configurations (dogfooding our own standards)
# =============================================================================
[tool.ruff]
target-version = "py311"
line-length = 120
src = ["src", "modules"]
exclude = [
".git",
".venv",
"__pycache__",
"*.egg-info",
"build",
"dist",
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"SIM", # flake8-simplify
]
ignore = [
"E501", # Line too long (formatter handles this)
"B008", # Function call in default argument
]
[tool.ruff.lint.isort]
known-first-party = ["amplifier_bundle_python_dev"]
force-single-line = true
combine-as-imports = true
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Allow unused imports in __init__
"tests/**/*.py" = ["S101"] # Allow assert in tests
[tool.pyright]
pythonVersion = "3.11"
typeCheckingMode = "basic"
reportMissingImports = true
reportMissingTypeStubs = false
exclude = [
"**/.venv",
"**/node_modules",
"**/__pycache__",
"**/build",
"**/dist",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
addopts = "--import-mode=importlib"
# =============================================================================
# Our own configuration (used by the checker)
# =============================================================================
[tool.amplifier-python-dev]
enable_ruff_format = true
enable_ruff_lint = true
enable_pyright = true
enable_stub_check = true
exclude_patterns = [
".venv/**",
"__pycache__/**",
"build/**",
"dist/**",
]
[tool.amplifier-python-dev.hook]
enabled = true
file_patterns = ["*.py"]
report_level = "warning"
auto_inject = true