Skip to content

Commit

Permalink
Merge pull request #330 from materialsvirtuallab/pre-commit-ci-update…
Browse files Browse the repository at this point in the history
…-config

[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
shyuep committed Dec 14, 2022
2 parents 318f1bb + 447e328 commit 5923fb5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ ci:

repos:

- repo: https://github.com/myint/autoflake
rev: v1.5.3
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.0
hooks:
- id: autoflake
args:
Expand All @@ -21,13 +21,13 @@ repos:
- --ignore-init-module-imports

- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
rev: v3.3.0
hooks:
- id: pyupgrade
args: [--py38-plus]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-yaml
exclude: pymatgen/analysis/vesta_cutoffs.yaml
Expand All @@ -41,16 +41,16 @@ repos:
# args: ["--profile", "black"]

- repo: https://github.com/psf/black
rev: 22.8.0
rev: 22.10.0
hooks:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
rev: v0.991
hooks:
- id: mypy
2 changes: 1 addition & 1 deletion pymatgen/analysis/diffusion/aimd/rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def export_rdf(self, filename: str):
"""
fmt = "csv" if filename.lower().endswith(".csv") else "dat"
delimiter = ", " if fmt == "csv" else " "
with open(filename, "wt") as f:
with open(filename, "w") as f:
if fmt == "dat":
f.write("# ")
f.write(delimiter.join(["r", "g(r)"]))
Expand Down
2 changes: 1 addition & 1 deletion pymatgen/analysis/diffusion/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ def export_msdt(self, filename):
"""
fmt = "csv" if filename.lower().endswith(".csv") else "dat"
delimiter = ", " if fmt == "csv" else " "
with open(filename, "wt") as f:
with open(filename, "w") as f:
if fmt == "dat":
f.write("# ")
f.write(delimiter.join(["t", "MSD", "MSD_a", "MSD_b", "MSD_c", "MSCD"]))
Expand Down
4 changes: 2 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ def set_ver(ctx):
lines.append('__version__ = "%s"' % NEW_VER)
else:
lines.append(l.rstrip())
with open("pymatgen/analysis/diffusion/__init__.py", "wt") as f:
with open("pymatgen/analysis/diffusion/__init__.py", "w") as f:
f.write("\n".join(lines))

lines = []
with open("setup.py") as f:
for l in f:
lines.append(re.sub(r"version=([^,]+),", 'version="%s",' % NEW_VER, l.rstrip()))
with open("setup.py", "wt") as f:
with open("setup.py", "w") as f:
f.write("\n".join(lines))
ctx.run("black pymatgen")
ctx.run("black setup.py")
Expand Down

0 comments on commit 5923fb5

Please sign in to comment.