Skip to content

Commit

Permalink
pre-commit autoupdate, and associated linting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Oct 30, 2024
1 parent d3383bf commit 666e5a5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ exclude: "scripts|src/optimade_launch"

repos:
- repo: https://github.com/ambv/black
rev: 23.3.0
rev: 24.10.0
hooks:
- id: black
name: Blacken

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: check-symlinks
- id: check-yaml
Expand All @@ -26,13 +26,13 @@ repos:
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.270'
rev: 'v0.7.1'
hooks:
- id: ruff
args: [--fix]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.13.0
hooks:
- id: mypy
name: "MyPy"
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ tests = ["pytest~=7.4", "pytest-cov~=4.0"]
dev = ["black", "ruff", "pre-commit", "mypy", "isort"]

[tool.ruff]
target-version = "py311"

[tool.ruff.lint]
select = ["E", "F", "I", "W", "Q"]
ignore = ["E501", "E402"]
fixable = ["A", "B", "C", "D", "E", "F", "I"]
unfixable = []
target-version = "py311"
per-file-ignores = {}
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
Expand Down
1 change: 1 addition & 0 deletions src/optimade_maker/archive/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Get file URLs from Materials Cloud records"""

from __future__ import print_function

import json
Expand Down
3 changes: 1 addition & 2 deletions src/optimade_maker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
from pydantic import BaseModel, Field


class UnsupportedConfigVersion(RuntimeError):
...
class UnsupportedConfigVersion(RuntimeError): ...


class PropertyDefinition(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import numpy as np
import pytest
from optimade.models import EntryInfoResource

from optimade_maker.convert import convert_archive

EXAMPLE_ARCHIVES = (Path(__file__).parent.parent / "examples").glob("*")
Expand Down
1 change: 1 addition & 0 deletions tests/test_yaml.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pathlib import Path

import pytest

from optimade_maker.config import Config

EXAMPLE_YAMLS = (Path(__file__).parent.parent / "examples").glob("*/optimade.yaml")
Expand Down

0 comments on commit 666e5a5

Please sign in to comment.