diff --git a/.cruft.json b/.cruft.json index 7badedd0..79e3a17d 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/iterative/py-template", - "commit": "efb0a22625c1d83e687f2bd284f3e96a20d16711", + "commit": "15ee26df315020399731c6291d61bef81a3fc5d3", "checkout": null, "context": { "cookiecutter": { diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 84cc5664..c9ae93ee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,6 @@ default_language_version: python: python3 repos: - - repo: https://github.com/psf/black - rev: 23.10.1 - hooks: - - id: black - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: @@ -32,12 +28,9 @@ repos: (?x)^( .*\.ipynb )$ - - repo: https://github.com/PyCQA/isort - rev: 5.12.0 - hooks: - - id: isort - repo: https://github.com/astral-sh/ruff-pre-commit - # Ruff version. - rev: "v0.1.4" + rev: "v0.1.5" hooks: - id: ruff + args: [--fix, --exit-non-zero-on-fix] + - id: ruff-format diff --git a/pyproject.toml b/pyproject.toml index 1d003e7a..605eb5cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,7 @@ dependencies = [ "ruamel.yaml", "scmrepo", ] + [project.optional-dependencies] image = ["numpy", "pillow"] sklearn = ["scikit-learn"] @@ -89,29 +90,6 @@ platforms = ["any"] [tool.setuptools_scm] write_to = "src/dvclive/_dvclive_version.py" -[tool.black] -line-length = 88 -include = '\.pyi?$' -exclude = ''' -/( - \.eggs - | \.git - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | _build - | buck-out - | build - | dist -)/ -''' - -[tool.isort] -profile = "black" -known_first_party = ["dvclive"] -line_length = 88 - [tool.pytest.ini_options] addopts = "-ra" markers = """ diff --git a/tests/frameworks/test_lightning.py b/tests/frameworks/test_lightning.py index 2151c78d..8a75e1d5 100644 --- a/tests/frameworks/test_lightning.py +++ b/tests/frameworks/test_lightning.py @@ -320,12 +320,11 @@ def _test_logger_init_args(logger_name, init, unresolved={}): # noqa: B006 out = StringIO() with mock.patch( - "sys.argv", ["any.py"] + cli_args # noqa: RUF005 + "sys.argv", + ["any.py"] + cli_args, # noqa: RUF005 ), redirect_stdout( # noqa: RUF100 out - ), pytest.raises( - SystemExit - ): + ), pytest.raises(SystemExit): LightningCLI(TestModel, run=False) data = yaml.safe_load(out.getvalue())["trainer"]["logger"]