Skip to content

Commit

Permalink
FIX: Don't set default factory?
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwthompson committed Oct 4, 2024
1 parent 3aa0337 commit c205ffc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openff/interchange/common/_nonbonded.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ElectrostaticsCollection(_NonbondedCollection):
nonperiodic_potential: Literal["Coulomb", "cutoff", "no-cutoff"] = Field("Coulomb")
exception_potential: Literal["Coulomb"] = Field("Coulomb")

_charges: dict[Any, _ElementaryChargeQuantity] = PrivateAttr(default_factory=dict)
_charges: dict[Any, _ElementaryChargeQuantity] = PrivateAttr()
_charges_cached: bool = PrivateAttr(default=False)

@computed_field # type: ignore[misc]
Expand Down
2 changes: 1 addition & 1 deletion openff/interchange/foyer/_nonbonded.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class FoyerElectrostaticsHandler(ElectrostaticsCollection):
force_field_key: str = "atoms"
cutoff: _DistanceQuantity = 9.0 * unit.angstrom

_charges: dict[TopologyKey, Quantity] = PrivateAttr(default_factory=dict)
_charges: dict[TopologyKey, Quantity] = PrivateAttr()

def store_charges(
self,
Expand Down
2 changes: 1 addition & 1 deletion openff/interchange/smirnoff/_nonbonded.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class SMIRNOFFElectrostaticsCollection(ElectrostaticsCollection, SMIRNOFFCollect
) # type: ignore[assignment]
exception_potential: Literal["Coulomb"] = Field("Coulomb")

_charges: dict[Any, _ElementaryChargeQuantity] = PrivateAttr(default_factory=dict)
_charges: dict[Any, _ElementaryChargeQuantity] = PrivateAttr()
_charges_cached: bool = PrivateAttr(default=False)

@classmethod
Expand Down

0 comments on commit c205ffc

Please sign in to comment.