diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2023-11-12 10:12:05 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2023-11-12 10:12:05 +0100 |
commit | 745ea57c63bd852b138fe40c030938bc8b2b64ba (patch) | |
tree | 6ebaed4ccdd981c9c74ac1eaec3c18084a008138 /etc/testing/_providers.py | |
parent | Merge pull request #1239 from hlohaus/pi (diff) | |
download | gpt4free-745ea57c63bd852b138fe40c030938bc8b2b64ba.tar gpt4free-745ea57c63bd852b138fe40c030938bc8b2b64ba.tar.gz gpt4free-745ea57c63bd852b138fe40c030938bc8b2b64ba.tar.bz2 gpt4free-745ea57c63bd852b138fe40c030938bc8b2b64ba.tar.lz gpt4free-745ea57c63bd852b138fe40c030938bc8b2b64ba.tar.xz gpt4free-745ea57c63bd852b138fe40c030938bc8b2b64ba.tar.zst gpt4free-745ea57c63bd852b138fe40c030938bc8b2b64ba.zip |
Diffstat (limited to 'etc/testing/_providers.py')
-rw-r--r-- | etc/testing/_providers.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/testing/_providers.py b/etc/testing/_providers.py index ec0e0271..0194318c 100644 --- a/etc/testing/_providers.py +++ b/etc/testing/_providers.py @@ -35,8 +35,14 @@ def main(): def get_providers() -> list[type[BaseProvider]]: providers = dir(Provider) providers = [getattr(Provider, provider) for provider in providers if provider != "RetryProvider"] - providers = [provider for provider in providers if isinstance(provider, type)] - return [provider for provider in providers if issubclass(provider, BaseProvider)] + providers = [provider for provider in providers if isinstance(provider, type) and hasattr(provider, "url")] + return [ + provider + for provider in providers + if issubclass(provider, BaseProvider) + and provider.__name__ not in dir(Provider.deprecated) + and provider.__name__ not in dir(Provider.unfinished) + ] def create_response(_provider: type[BaseProvider]) -> str: |