@@ -24,6 +24,7 @@ def report_cov(ctx: Context, *, html: bool = False):
2424 """report coverage"""
2525 ctx .run ("coverage combine" , warn = True , pty = use_pty )
2626 ctx .run ("coverage report --show-missing" , pty = use_pty )
27+ ctx .run ("coverage xml" , pty = use_pty )
2728 if html :
2829 ctx .run ("coverage html" , pty = use_pty )
2930
@@ -41,13 +42,6 @@ def coverage(ctx: Context, args: str = "", *, html: bool = False):
4142 report_cov (ctx , html = html )
4243
4344
44- @task (optional = ["args" ], help = {"args" : "black additional arguments" })
45- def lint_black (ctx : Context , args : str = "." ):
46- args = args or "." # needed for hatch script
47- ctx .run ("black --version" , pty = use_pty )
48- ctx .run (f"black --check --diff { args } " , pty = use_pty )
49-
50-
5145@task (optional = ["args" ], help = {"args" : "ruff additional arguments" })
5246def lint_ruff (ctx : Context , args : str = "." ):
5347 args = args or "." # needed for hatch script
@@ -58,13 +52,12 @@ def lint_ruff(ctx: Context, args: str = "."):
5852@task (
5953 optional = ["args" ],
6054 help = {
61- "args" : "linting tools (black, ruff) additional arguments, typically a path" ,
55+ "args" : "linting tools (ruff) additional arguments, typically a path" ,
6256 },
6357)
6458def lintall (ctx : Context , args : str = "." ):
6559 """Check linting"""
6660 args = args or "." # needed for hatch script
67- lint_black (ctx , args )
6861 lint_ruff (ctx , args )
6962
7063
@@ -81,13 +74,6 @@ def checkall(ctx: Context, args: str = ""):
8174 check_pyright (ctx , args )
8275
8376
84- @task (optional = ["args" ], help = {"args" : "black additional arguments" })
85- def fix_black (ctx : Context , args : str = "." ):
86- """fix black formatting"""
87- args = args or "." # needed for hatch script
88- ctx .run (f"black { args } " , pty = use_pty )
89-
90-
9177@task (optional = ["args" ], help = {"args" : "ruff additional arguments" })
9278def fix_ruff (ctx : Context , args : str = "." ):
9379 """fix all ruff rules"""
@@ -98,12 +84,11 @@ def fix_ruff(ctx: Context, args: str = "."):
9884@task (
9985 optional = ["args" ],
10086 help = {
101- "args" : "linting tools (black, ruff) additional arguments, typically a path" ,
87+ "args" : "linting tools (ruff) additional arguments, typically a path" ,
10288 },
10389)
10490def fixall (ctx : Context , args : str = "." ):
10591 """Fix everything automatically"""
10692 args = args or "." # needed for hatch script
107- fix_black (ctx , args )
10893 fix_ruff (ctx , args )
10994 lintall (ctx , args )
0 commit comments