Skip to content

Commit ed644fd

Browse files
authored
Auto-update pre-commit hooks
1 parent 3b4c511 commit ed644fd

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ default_language_version:
22
python: python3
33
repos:
44
- repo: https://github.com/charliermarsh/ruff-pre-commit
5-
rev: v0.1.13
5+
rev: v0.3.0
66
hooks:
77
- id: ruff
88
args: [--fix]

src/atomate2/cli/dev.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Module containing command line scripts for developers."""
22

3-
43
from __future__ import annotations
54

65
from typing import TYPE_CHECKING

src/atomate2/common/schemas/elastic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Schemas for elastic tensor fitting and related properties."""
2+
23
from copy import deepcopy
34
from typing import Optional
45

src/atomate2/cp2k/schemas/task.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Core definition of a CP2K task document."""
2+
23
import logging
34
from collections import OrderedDict
45
from pathlib import Path

src/atomate2/utils/file_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Tools for remote file IO using paramiko."""
22

3-
43
from __future__ import annotations
54

65
import shutil
@@ -403,9 +402,10 @@ def gzip(
403402
)
404403

405404
if host is None:
406-
with open(path, "rb") as f_in, GzipFile(
407-
path_gz, "wb", compresslevel=compresslevel
408-
) as f_out:
405+
with (
406+
open(path, "rb") as f_in,
407+
GzipFile(path_gz, "wb", compresslevel=compresslevel) as f_out,
408+
):
409409
shutil.copyfileobj(f_in, f_out)
410410
shutil.copystat(path, path_gz)
411411
path.unlink()

src/atomate2/vasp/sets/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,9 +597,9 @@ def get_kpoints_updates(
597597
kpoints["zero_weighted_line_density"] = self.line_density
598598

599599
elif self.mode == "uniform_dense":
600-
kpoints[
601-
"zero_weighted_reciprocal_density"
602-
] = self.zero_weighted_reciprocal_density
600+
kpoints["zero_weighted_reciprocal_density"] = (
601+
self.zero_weighted_reciprocal_density
602+
)
603603

604604
added_kpoints = deepcopy(self.added_kpoints)
605605
if vasprun is not None and self.mode == "gap":

tests/common/schemas/test_cclib.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ def test_cclib_taskdoc(test_dir):
7373
# Let's try a volumetric analysis
7474
# We'll gunzip the .cube.gz file because cclib can't read cube.gz files yet.
7575
# Can remove the gzip part when https://github.com/cclib/cclib/issues/108 is closed.
76-
with gzip.open(p / "psi_test.cube.gz", "r") as f_in, open(
77-
p / "psi_test.cube", "wb"
78-
) as f_out:
76+
with (
77+
gzip.open(p / "psi_test.cube.gz", "r") as f_in,
78+
open(p / "psi_test.cube", "wb") as f_out,
79+
):
7980
shutil.copyfileobj(f_in, f_out)
8081
doc = TaskDocument.from_logfile(p, "psi_test.out", analysis=["Bader"]).dict()
8182
os.remove(p / "psi_test.cube")

0 commit comments

Comments
 (0)