We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab48053 commit 783ea2eCopy full SHA for 783ea2e
pyproject.toml
@@ -33,6 +33,10 @@ dependencies = [
33
"opentelemetry-api>=1.28.2",
34
]
35
36
+[project.scripts]
37
+lint = "lint:main"
38
+format = "lint:main"
39
+
40
[tool.uv]
41
dev-dependencies = [
42
"deptry>=0.14.0",
src/lint.py
@@ -0,0 +1,17 @@
1
+#!/usr/bin/env python
2
3
+import os
4
+import sys
5
6
7
+def raise_err(code: int) -> None:
8
+ if code > 0:
9
+ sys.exit(1)
10
11
12
+def main() -> None:
13
+ fix = ["--fix"] if "--fix" in sys.argv else []
14
+ raise_err(os.system(" ".join(["ruff", "check", "src"] + fix)))
15
+ raise_err(os.system("ruff format src"))
16
+ raise_err(os.system("mypy src"))
17
+ raise_err(os.system("pyright src"))
0 commit comments