diff --git a/requirements-dev.txt b/requirements-dev.txt index 4b083b9c8..405265ef2 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,7 +3,7 @@ flake8 isort==5.13.2 nbsphinx pre-commit -pyright==1.1.366 +pyright==1.1.378 pytest pytest-asyncio pytest-cov diff --git a/src/poke_env/environment/observation.py b/src/poke_env/environment/observation.py index ac8b05a83..1fcf8eca4 100644 --- a/src/poke_env/environment/observation.py +++ b/src/poke_env/environment/observation.py @@ -22,10 +22,8 @@ class Observation: weather: Dict[Weather, int] = field(default_factory=dict) fields: Dict[Field, int] = field(default_factory=dict) - active_pokemon: Union[ObservedPokemon, List[Optional[ObservedPokemon]], None] = None - opponent_active_pokemon: Union[ - ObservedPokemon, List[Optional[ObservedPokemon]], None - ] = None + active_pokemon: Union[ObservedPokemon, None, List[ObservedPokemon]] = None + opponent_active_pokemon: Union[ObservedPokemon, List[ObservedPokemon], None] = None # The player's team, so we can track states of mons throughout the battle team: Dict[str, Optional[ObservedPokemon]] = field(default_factory=dict)