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 Oct 28, 2023
1 parent c1c62f6 commit d046dfc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion WFacer/specie_decorators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
PmgGuessChargeDecorator,
)

allowed_decorators = defaultdict(lambda: [])
allowed_decorators = defaultdict(list)
for subclass in get_subclasses(BaseDecorator).values():
prop = subclass.decorated_prop_name
if subclass.required_prop_names is not None:
Expand Down
4 changes: 2 additions & 2 deletions WFacer/specie_decorators/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def group_site_by_species(entries):
defaultdict:
(Entry index, site index) belonging to each species.
"""
groups_by_species = defaultdict(lambda: [])
groups_by_species = defaultdict(list)

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

# Preserve all information.
site_properties = defaultdict(lambda: [])
site_properties = defaultdict(list)
for site in s_undecor:
for p in site.properties:
site_properties[p].append(site.properties[p])
Expand Down
2 changes: 1 addition & 1 deletion tests/test_enumeration.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def test_enumerate_structures(single_expansion):
for occu, mid in zip(occus, mids)
]
# When keeping the ground states, each composition must have at least 1 state.
count_occurences = defaultdict(lambda: 0)
count_occurences = defaultdict(int)
for n in ns:
count_occurences[n] += 1

Expand Down

0 comments on commit d046dfc

Please sign in to comment.