Skip to content

Commit

Permalink
Merge 0ebc768 into 8f88dc8
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Nov 7, 2022
2 parents 8f88dc8 + 0ebc768 commit 17adc6d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 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: v1.7.7
hooks:
- id: autoflake
args:
Expand All @@ -21,7 +21,7 @@ repos:
- --ignore-init-module-imports

- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
rev: v3.2.0
hooks:
- id: pyupgrade
args: [--py38-plus]
Expand All @@ -41,7 +41,7 @@ repos:
# args: ["--profile", "black"]

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

Expand All @@ -51,6 +51,6 @@ repos:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.971
rev: v0.982
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 17adc6d

Please sign in to comment.