Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiefl committed Sep 11, 2024
1 parent cfcf445 commit 4ef4621
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pooltool/system/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from __future__ import annotations

from collections.abc import Sequence
from typing import Dict, Iterator, List, Optional
from typing import Any, Dict, Iterator, List, Optional

import numpy as np
from attrs import define, field
Expand All @@ -19,7 +18,7 @@
from pooltool.serialize.serializers import Pathish


def _convert_balls(balls: Sequence) -> Dict[str, Ball]:
def _convert_balls(balls: Any) -> Dict[str, Ball]:
if isinstance(balls, dict):
return balls

Expand Down Expand Up @@ -57,6 +56,10 @@ class System:
Warning:
Each key must match each value's ``id`` (`e.g.` ``{"2": Ball(id="1")}``
is invalid).
Note:
If, during construction, a sequence (`e.g.` list, tuple, etc.) of balls
is passed instead of a dictionary, it will be converted to a dictionary.
t:
The elapsed simulation time. If the system is in the process of being
simulated, ``t`` is updated to be the number of seconds the system has
Expand Down

0 comments on commit 4ef4621

Please sign in to comment.