Skip to content

Commit

Permalink
Fix metaclass conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoH2O1999 committed Jul 25, 2022
1 parent 62cac5f commit 0bca7f8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/poke_env/player/openai_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import numpy as np # pyre-ignore
import time

from abc import ABC, abstractmethod
from abc import ABC, abstractmethod, ABCMeta
from logging import Logger
from typing import Union, Awaitable, Optional, Tuple, TypeVar, Callable, Dict, List
from gym.core import Env # pyre-ignore
Expand Down Expand Up @@ -93,7 +93,11 @@ def _battle_finished_callback(
asyncio.run_coroutine_threadsafe(self.observations.async_put(to_put), POKE_LOOP)


class OpenAIGymEnv(Env, ABC): # pyre-ignore
class _CombinedMetaclass(type(Env), ABCMeta): # pyre-ignore
pass


class OpenAIGymEnv(Env, ABC, metaclass=_CombinedMetaclass): # pyre-ignore

_INIT_RETRIES = 100
_TIME_BETWEEN_RETRIES = 0.5
Expand Down

0 comments on commit 0bca7f8

Please sign in to comment.