Skip to content

Commit ae18836

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 132abbc commit ae18836

29 files changed

Lines changed: 31 additions & 4 deletions

WFacer/convergence.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Convergence checks."""
2+
23
import numpy as np
34
from pymatgen.analysis.structure_matcher import StructureMatcher
45
from smol.cofe import ClusterExpansion

WFacer/fit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Fit ECIs from Wrangler."""
2+
23
from warnings import warn
34

45
import numpy as np

WFacer/jobs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Unitary jobs used by an atomate2 workflow."""
2+
23
import importlib
34
import logging
45
from copy import deepcopy

WFacer/maker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Automatic cluster expansion workflow maker."""
2+
23
from dataclasses import dataclass, field
34
from warnings import warn
45

WFacer/sample_generators/mc_generators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Monte-carlo to estimate ground states and sample structures."""
2+
23
import itertools
34
from abc import ABCMeta, abstractmethod
45
from warnings import warn

WFacer/schema.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Defines the standard output schema for automated cluster expansion workflows."""
2+
23
from typing import Any, Dict, List, Union
34

45
from pydantic import BaseModel, Field

WFacer/specie_decorators/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
PmgGuessChargeDecorator,
1212
)
1313

14-
allowed_decorators = defaultdict(lambda: [])
14+
allowed_decorators = defaultdict(list)
1515
for subclass in get_subclasses(BaseDecorator).values():
1616
prop = subclass.decorated_prop_name
1717
if subclass.required_prop_names is not None:

WFacer/specie_decorators/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def group_site_by_species(entries):
116116
defaultdict:
117117
(Entry index, site index) belonging to each species.
118118
"""
119-
groups_by_species = defaultdict(lambda: [])
119+
groups_by_species = defaultdict(list)
120120

121121
# These entries should not contain Vacancy.
122122
for e_id, entry in enumerate(entries):
@@ -249,7 +249,7 @@ def _process(self, entries, decorate_rules):
249249
species_decor.append(sp)
250250

251251
# Preserve all information.
252-
site_properties = defaultdict(lambda: [])
252+
site_properties = defaultdict(list)
253253
for site in s_undecor:
254254
for p in site.properties:
255255
site_properties[p].append(site.properties[p])

WFacer/utils/convex_hull.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Utilities to obtain minimum energies per composition and the convex hull."""
2+
23
from collections import defaultdict
34

45
import numpy as np

WFacer/utils/duplicacy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Check duplicacy between structures."""
2+
23
import numpy as np
34
from pymatgen.analysis.structure_matcher import StructureMatcher
45
from pymatgen.core import DummySpecies, Element, Species, Structure

0 commit comments

Comments
 (0)