Skip to content

Commit

Permalink
Fix mutable default argument
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewcarbone committed Nov 5, 2023
1 parent 07741b2 commit 6125b70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lightshow/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def from_files_molecule(
cls,
root,
filename="*.xyz",
lattice=[20.0, 20.0, 20.0],
lattice=None,
pbar=True,
):
"""Searches for files matching the provided ``filename``, and assumes
Expand All @@ -58,6 +58,9 @@ def from_files_molecule(
Database
"""

if lattice is None:
lattice = [20.0, 20.0, 20.0]

structures = {}
metadata = {}
for key, path in enumerate(
Expand Down

0 comments on commit 6125b70

Please sign in to comment.