-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathnoxfile.py
More file actions
31 lines (21 loc) · 735 Bytes
/
Copy pathnoxfile.py
File metadata and controls
31 lines (21 loc) · 735 Bytes
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
"""Configure nox."""
import nox
NOX_SESSION = nox.session(python=False)
@NOX_SESSION
def fix(session: nox.Session) -> None:
"""Fix files inplace."""
session.run("ruff", "format", "-s", ".")
session.run("ruff", "check", "-se", "--fix", ".")
@NOX_SESSION
def lint(session: nox.Session) -> None:
"""Check file formatting that only have to do with formatting."""
session.run("ruff", "format", "--check", ".")
session.run("ruff", "check", ".")
@NOX_SESSION
def typecheck(session: nox.Session) -> None:
session.run("ty", "check", "jedi_language_server")
@NOX_SESSION
def tests(session: nox.Session) -> None:
session.run(
"slipcover", "--source", "jedi_language_server", "-m", "pytest"
)