use stricter ruff rules
This commit is contained in:
parent
f01f705af2
commit
4cf17c3993
20 changed files with 160 additions and 144 deletions
|
|
@ -1,19 +1,18 @@
|
|||
from typing import Optional
|
||||
import typer
|
||||
from corrlib import __app_name__
|
||||
|
||||
from .initialization import create
|
||||
from .toml import import_tomls, update_project, reimport_project
|
||||
from .find import find_record, list_projects, list_ensembles, get_stat
|
||||
from .tools import str2list
|
||||
from .main import update_aliases
|
||||
from .meas_io import drop_cache as mio_drop_cache
|
||||
from .integrity import full_integrity_check
|
||||
|
||||
import os
|
||||
from importlib.metadata import version
|
||||
from pathlib import Path
|
||||
|
||||
import typer
|
||||
|
||||
from corrlib import __app_name__
|
||||
|
||||
from .find import find_record, get_stat, list_ensembles, list_projects
|
||||
from .initialization import create
|
||||
from .integrity import full_integrity_check
|
||||
from .main import update_aliases
|
||||
from .meas_io import drop_cache as mio_drop_cache
|
||||
from .toml import import_tomls, reimport_project, update_project
|
||||
from .tools import str2list
|
||||
|
||||
app = typer.Typer()
|
||||
|
||||
|
|
@ -26,7 +25,7 @@ def _version_callback(value: bool) -> None:
|
|||
|
||||
@app.command()
|
||||
def update(
|
||||
path: Path = typer.Option(
|
||||
path: Path = typer.Option( # noqa: B008
|
||||
Path('.'),
|
||||
"--dataset",
|
||||
"-d",
|
||||
|
|
@ -42,7 +41,7 @@ def update(
|
|||
|
||||
@app.command()
|
||||
def lister(
|
||||
path: Path = typer.Option(
|
||||
path: Path = typer.Option( # noqa: B008
|
||||
Path('.'),
|
||||
"--dataset",
|
||||
"-d",
|
||||
|
|
@ -73,7 +72,7 @@ def lister(
|
|||
|
||||
@app.command()
|
||||
def alias_add(
|
||||
path: Path = typer.Option(
|
||||
path: Path = typer.Option( # noqa: B008
|
||||
Path('.'),
|
||||
"--dataset",
|
||||
"-d",
|
||||
|
|
@ -91,7 +90,7 @@ def alias_add(
|
|||
|
||||
@app.command()
|
||||
def find(
|
||||
path: Path = typer.Option(
|
||||
path: Path = typer.Option( # noqa: B008
|
||||
Path('.'),
|
||||
"--dataset",
|
||||
"-d",
|
||||
|
|
@ -100,7 +99,7 @@ def find(
|
|||
corr: str = typer.Argument(),
|
||||
code: str = typer.Argument(),
|
||||
arg: str = typer.Option(
|
||||
str('all'),
|
||||
'all',
|
||||
"--argument",
|
||||
"-a",
|
||||
),
|
||||
|
|
@ -125,7 +124,7 @@ def find(
|
|||
|
||||
@app.command()
|
||||
def stat(
|
||||
path: Path = typer.Option(
|
||||
path: Path = typer.Option( # noqa: B008
|
||||
Path('.'),
|
||||
"--dataset",
|
||||
"-d",
|
||||
|
|
@ -141,7 +140,7 @@ def stat(
|
|||
|
||||
|
||||
@app.command()
|
||||
def check(path: Path = typer.Option(
|
||||
def check(path: Path = typer.Option( # noqa: B008
|
||||
Path('.'),
|
||||
"--dataset",
|
||||
"-d",
|
||||
|
|
@ -155,7 +154,7 @@ def check(path: Path = typer.Option(
|
|||
|
||||
@app.command()
|
||||
def importer(
|
||||
path: Path = typer.Option(
|
||||
path: Path = typer.Option( # noqa: B008
|
||||
Path('.'),
|
||||
"--dataset",
|
||||
"-d",
|
||||
|
|
@ -163,7 +162,7 @@ def importer(
|
|||
files: str = typer.Argument(
|
||||
),
|
||||
copy_file: bool = typer.Option(
|
||||
bool(True),
|
||||
True,
|
||||
"--save",
|
||||
"-s",
|
||||
),
|
||||
|
|
@ -179,7 +178,7 @@ def importer(
|
|||
|
||||
@app.command()
|
||||
def reimporter(
|
||||
path: Path = typer.Option(
|
||||
path: Path = typer.Option( # noqa: B008
|
||||
Path('.'),
|
||||
"--dataset",
|
||||
"-d",
|
||||
|
|
@ -204,13 +203,13 @@ def reimporter(
|
|||
|
||||
@app.command()
|
||||
def init(
|
||||
path: Path = typer.Option(
|
||||
path: Path = typer.Option( # noqa: B008
|
||||
Path('.'),
|
||||
"--dataset",
|
||||
"-d",
|
||||
),
|
||||
tracker: str = typer.Option(
|
||||
str('datalad'),
|
||||
'datalad',
|
||||
"--tracker",
|
||||
"-t",
|
||||
),
|
||||
|
|
@ -224,7 +223,7 @@ def init(
|
|||
|
||||
@app.command()
|
||||
def drop_cache(
|
||||
path: Path = typer.Option(
|
||||
path: Path = typer.Option( # noqa: B008
|
||||
Path('.'),
|
||||
"--dataset",
|
||||
"-d",
|
||||
|
|
@ -239,7 +238,7 @@ def drop_cache(
|
|||
|
||||
@app.callback()
|
||||
def main(
|
||||
version: Optional[bool] = typer.Option(
|
||||
version: bool | None = typer.Option(
|
||||
None,
|
||||
"--version",
|
||||
"-v",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue