Skip to content

Commit

Permalink
cruft: update template (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop authored Nov 22, 2023
1 parent 7d5c088 commit f39c7e2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/iterative/py-template",
"commit": "efb0a22625c1d83e687f2bd284f3e96a20d16711",
"commit": "15ee26df315020399731c6291d61bef81a3fc5d3",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
13 changes: 3 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
24 changes: 1 addition & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies = [
"ruamel.yaml",
"scmrepo",
]

[project.optional-dependencies]
image = ["numpy", "pillow"]
sklearn = ["scikit-learn"]
Expand Down Expand Up @@ -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 = """
Expand Down
7 changes: 3 additions & 4 deletions tests/frameworks/test_lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit f39c7e2

Please sign in to comment.