Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 5, 2022
1 parent e9bd0c2 commit 447e328
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pymatgen/analysis/diffusion/aimd/rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from collections import Counter
from math import ceil
from multiprocessing import cpu_count
from typing import Dict, List, Tuple, Union
from typing import List, Tuple, Union

import numpy as np
from joblib import Parallel, delayed
Expand Down 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
1 change: 0 additions & 1 deletion pymatgen/analysis/diffusion/aimd/van_hove.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

from pymatgen.core import Structure
from pymatgen.util.plotting import pretty_plot
from pymatgen.util.typing import ArrayLike
from pymatgen.analysis.diffusion.analyzer import DiffusionAnalyzer

from .rdf import RadialDistributionFunction
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
1 change: 0 additions & 1 deletion pymatgen/analysis/diffusion/utils/maggma.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

from maggma.stores import MongoStore
from monty.serialization import MontyDecoder
from pymatgen.entries.computed_entries import ComputedEntry

logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
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 447e328

Please sign in to comment.