generator update

This commit is contained in:
Adam Uhlíř 2024-12-18 14:41:54 +01:00
parent 5961f6a7e1
commit 72dca69356
No known key found for this signature in database
GPG Key ID: 1D17A9E81F76155B
15 changed files with 283 additions and 103 deletions

View File

@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
@ -24,15 +24,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Test with pytest
run: |
pytest
pytest --cov={{packageName}}

View File

@ -1 +1 @@
7.8.0
7.10.0

View File

@ -5,12 +5,12 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
- API version: 0.0.1
- Package version: 0.0.1
- Generator version: 7.8.0
- Generator version: 7.10.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
## Requirements.
Python 3.7+
Python 3.8+
## Installation

View File

@ -17,7 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import Field, StrictBytes, StrictStr
from typing import Optional, Union
from typing import Optional, Tuple, Union
from typing_extensions import Annotated
from codex_api_client.models.data_item import DataItem
from codex_api_client.models.data_list import DataList
@ -262,7 +262,9 @@ class DataApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -526,7 +528,9 @@ class DataApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -790,7 +794,9 @@ class DataApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -1054,7 +1060,9 @@ class DataApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -1308,7 +1316,9 @@ class DataApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -1551,7 +1561,9 @@ class DataApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -1597,7 +1609,7 @@ class DataApi:
self,
content_type: Annotated[Optional[StrictStr], Field(description="The content type of the file. Must be valid.")] = None,
content_disposition: Annotated[Optional[StrictStr], Field(description="The content disposition used to send the filename.")] = None,
body: Optional[Union[StrictBytes, StrictStr]] = None,
body: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@ -1672,7 +1684,7 @@ class DataApi:
self,
content_type: Annotated[Optional[StrictStr], Field(description="The content type of the file. Must be valid.")] = None,
content_disposition: Annotated[Optional[StrictStr], Field(description="The content disposition used to send the filename.")] = None,
body: Optional[Union[StrictBytes, StrictStr]] = None,
body: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@ -1747,7 +1759,7 @@ class DataApi:
self,
content_type: Annotated[Optional[StrictStr], Field(description="The content type of the file. Must be valid.")] = None,
content_disposition: Annotated[Optional[StrictStr], Field(description="The content disposition used to send the filename.")] = None,
body: Optional[Union[StrictBytes, StrictStr]] = None,
body: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
@ -1833,7 +1845,9 @@ class DataApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -1850,6 +1864,9 @@ class DataApi:
if isinstance(body, str):
with open(body, "rb") as _fp:
_body_params = _fp.read()
elif isinstance(body, tuple):
# drop the filename from the tuple
_body_params = body[1]
else:
_body_params = body

View File

@ -236,7 +236,9 @@ class DebugApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -495,7 +497,9 @@ class DebugApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters

View File

@ -280,7 +280,9 @@ class MarketplaceApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -559,7 +561,9 @@ class MarketplaceApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -804,7 +808,9 @@ class MarketplaceApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -1050,7 +1056,9 @@ class MarketplaceApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -1312,7 +1320,9 @@ class MarketplaceApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -1557,7 +1567,9 @@ class MarketplaceApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -1825,7 +1837,9 @@ class MarketplaceApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -2092,7 +2106,9 @@ class MarketplaceApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -2391,7 +2407,9 @@ class MarketplaceApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters

View File

@ -270,7 +270,9 @@ class NodeApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -509,7 +511,9 @@ class NodeApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
@ -753,7 +757,9 @@ class NodeApi:
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[str, Union[str, bytes]] = {}
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters

View File

@ -404,12 +404,12 @@ class ApiClient:
data = json.loads(response_text)
except ValueError:
data = response_text
elif content_type.startswith("application/json"):
elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
if response_text == "":
data = ""
else:
data = json.loads(response_text)
elif content_type.startswith("text/plain"):
elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE):
data = response_text
else:
raise ApiException(
@ -535,7 +535,10 @@ class ApiClient:
return "&".join(["=".join(map(str, item)) for item in new_params])
def files_parameters(self, files: Dict[str, Union[str, bytes]]):
def files_parameters(
self,
files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]],
):
"""Builds form parameters.
:param files: File parameters.
@ -550,6 +553,12 @@ class ApiClient:
elif isinstance(v, bytes):
filename = k
filedata = v
elif isinstance(v, tuple):
filename, filedata = v
elif isinstance(v, list):
for file_param in v:
params.extend(self.files_parameters({k: file_param}))
continue
else:
raise ValueError("Unsupported file value")
mimetype = (

View File

@ -13,14 +13,16 @@
import copy
import http.client as httplib
import logging
from logging import FileHandler
import multiprocessing
import sys
from typing import Optional
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict
from typing_extensions import NotRequired, Self
import urllib3
import http.client as httplib
JSON_SCHEMA_VALIDATION_KEYWORDS = {
'multipleOf', 'maximum', 'exclusiveMaximum',
@ -28,6 +30,106 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = {
'minLength', 'pattern', 'maxItems', 'minItems'
}
ServerVariablesT = Dict[str, str]
GenericAuthSetting = TypedDict(
"GenericAuthSetting",
{
"type": str,
"in": str,
"key": str,
"value": str,
},
)
OAuth2AuthSetting = TypedDict(
"OAuth2AuthSetting",
{
"type": Literal["oauth2"],
"in": Literal["header"],
"key": Literal["Authorization"],
"value": str,
},
)
APIKeyAuthSetting = TypedDict(
"APIKeyAuthSetting",
{
"type": Literal["api_key"],
"in": str,
"key": str,
"value": Optional[str],
},
)
BasicAuthSetting = TypedDict(
"BasicAuthSetting",
{
"type": Literal["basic"],
"in": Literal["header"],
"key": Literal["Authorization"],
"value": Optional[str],
},
)
BearerFormatAuthSetting = TypedDict(
"BearerFormatAuthSetting",
{
"type": Literal["bearer"],
"in": Literal["header"],
"format": Literal["JWT"],
"key": Literal["Authorization"],
"value": str,
},
)
BearerAuthSetting = TypedDict(
"BearerAuthSetting",
{
"type": Literal["bearer"],
"in": Literal["header"],
"key": Literal["Authorization"],
"value": str,
},
)
HTTPSignatureAuthSetting = TypedDict(
"HTTPSignatureAuthSetting",
{
"type": Literal["http-signature"],
"in": Literal["header"],
"key": Literal["Authorization"],
"value": None,
},
)
AuthSettings = TypedDict(
"AuthSettings",
{
},
total=False,
)
class HostSettingVariable(TypedDict):
description: str
default_value: str
enum_values: List[str]
class HostSetting(TypedDict):
url: str
description: str
variables: NotRequired[Dict[str, HostSettingVariable]]
class Configuration:
"""This class contains various settings of the API client.
@ -61,19 +163,25 @@ class Configuration:
"""
_default = None
_default: ClassVar[Optional[Self]] = None
def __init__(self, host=None,
api_key=None, api_key_prefix=None,
username=None, password=None,
access_token=None,
server_index=None, server_variables=None,
server_operation_index=None, server_operation_variables=None,
ignore_operation_servers=False,
ssl_ca_cert=None,
retries=None,
def __init__(
self,
host: Optional[str]=None,
api_key: Optional[Dict[str, str]]=None,
api_key_prefix: Optional[Dict[str, str]]=None,
username: Optional[str]=None,
password: Optional[str]=None,
access_token: Optional[str]=None,
server_index: Optional[int]=None,
server_variables: Optional[ServerVariablesT]=None,
server_operation_index: Optional[Dict[int, int]]=None,
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
ignore_operation_servers: bool=False,
ssl_ca_cert: Optional[str]=None,
retries: Optional[int] = None,
*,
debug: Optional[bool] = None
debug: Optional[bool] = None,
) -> None:
"""Constructor
"""
@ -198,7 +306,7 @@ class Configuration:
"""date format
"""
def __deepcopy__(self, memo):
def __deepcopy__(self, memo: Dict[int, Any]) -> Self:
cls = self.__class__
result = cls.__new__(cls)
memo[id(self)] = result
@ -212,11 +320,11 @@ class Configuration:
result.debug = self.debug
return result
def __setattr__(self, name, value):
def __setattr__(self, name: str, value: Any) -> None:
object.__setattr__(self, name, value)
@classmethod
def set_default(cls, default):
def set_default(cls, default: Optional[Self]) -> None:
"""Set default instance of configuration.
It stores default configuration, which can be
@ -227,7 +335,7 @@ class Configuration:
cls._default = default
@classmethod
def get_default_copy(cls):
def get_default_copy(cls) -> Self:
"""Deprecated. Please use `get_default` instead.
Deprecated. Please use `get_default` instead.
@ -237,7 +345,7 @@ class Configuration:
return cls.get_default()
@classmethod
def get_default(cls):
def get_default(cls) -> Self:
"""Return the default configuration.
This method returns newly created, based on default constructor,
@ -247,11 +355,11 @@ class Configuration:
:return: The configuration object.
"""
if cls._default is None:
cls._default = Configuration()
cls._default = cls()
return cls._default
@property
def logger_file(self):
def logger_file(self) -> Optional[str]:
"""The logger file.
If the logger_file is None, then add stream handler and remove file
@ -263,7 +371,7 @@ class Configuration:
return self.__logger_file
@logger_file.setter
def logger_file(self, value):
def logger_file(self, value: Optional[str]) -> None:
"""The logger file.
If the logger_file is None, then add stream handler and remove file
@ -282,7 +390,7 @@ class Configuration:
logger.addHandler(self.logger_file_handler)
@property
def debug(self):
def debug(self) -> bool:
"""Debug status
:param value: The debug status, True or False.
@ -291,7 +399,7 @@ class Configuration:
return self.__debug
@debug.setter
def debug(self, value):
def debug(self, value: bool) -> None:
"""Debug status
:param value: The debug status, True or False.
@ -313,7 +421,7 @@ class Configuration:
httplib.HTTPConnection.debuglevel = 0
@property
def logger_format(self):
def logger_format(self) -> str:
"""The logger format.
The logger_formatter will be updated when sets logger_format.
@ -324,7 +432,7 @@ class Configuration:
return self.__logger_format
@logger_format.setter
def logger_format(self, value):
def logger_format(self, value: str) -> None:
"""The logger format.
The logger_formatter will be updated when sets logger_format.
@ -335,7 +443,7 @@ class Configuration:
self.__logger_format = value
self.logger_formatter = logging.Formatter(self.__logger_format)
def get_api_key_with_prefix(self, identifier, alias=None):
def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]:
"""Gets API key (with prefix if set).
:param identifier: The identifier of apiKey.
@ -352,7 +460,9 @@ class Configuration:
else:
return key
def get_basic_auth_token(self):
return None
def get_basic_auth_token(self) -> Optional[str]:
"""Gets HTTP basic authentication header (string).
:return: The token for basic HTTP authentication.
@ -367,15 +477,15 @@ class Configuration:
basic_auth=username + ':' + password
).get('authorization')
def auth_settings(self):
def auth_settings(self)-> AuthSettings:
"""Gets Auth Settings dict for api client.
:return: The Auth Settings information dict.
"""
auth = {}
auth: AuthSettings = {}
return auth
def to_debug_report(self):
def to_debug_report(self) -> str:
"""Gets the essential information for debugging.
:return: The report for debugging.
@ -387,7 +497,7 @@ class Configuration:
"SDK Package Version: 0.0.1".\
format(env=sys.platform, pyversion=sys.version)
def get_host_settings(self):
def get_host_settings(self) -> List[HostSetting]:
"""Gets an array of host settings
:return: An array of host settings
@ -399,7 +509,12 @@ class Configuration:
}
]
def get_host_from_settings(self, index, variables=None, servers=None):
def get_host_from_settings(
self,
index: Optional[int],
variables: Optional[ServerVariablesT]=None,
servers: Optional[List[HostSetting]]=None,
) -> str:
"""Gets host URL based on the index and variables
:param index: array index of the host settings
:param variables: hash of variable and the corresponding value
@ -439,12 +554,12 @@ class Configuration:
return url
@property
def host(self):
def host(self) -> str:
"""Return generated host."""
return self.get_host_from_settings(self.server_index, variables=self.server_variables)
@host.setter
def host(self, value):
def host(self, value: str) -> None:
"""Fix base path."""
self._base_path = value
self.server_index = None

View File

@ -225,7 +225,7 @@ class RESTClientObject:
headers=headers,
preload_content=False
)
elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool):
elif headers['Content-Type'].startswith('text/') and isinstance(body, bool):
request_body = "true" if body else "false"
r = self.pool_manager.request(
method,

View File

@ -2,6 +2,6 @@
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.8.0"
"version": "7.10.0"
}
}

View File

@ -10,19 +10,20 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Codex API"]
include = ["codex_api_client/py.typed"]
[tool.poetry.dependencies]
python = "^3.7"
python = "^3.8"
urllib3 = ">= 1.25.3"
python-dateutil = ">=2.8.2"
pydantic = ">=2"
typing-extensions = ">=4.7.1"
urllib3 = ">= 1.25.3 < 3.0.0"
python-dateutil = ">= 2.8.2"
pydantic = ">= 2"
typing-extensions = ">= 4.7.1"
[tool.poetry.dev-dependencies]
pytest = ">=7.2.1"
tox = ">=3.9.0"
flake8 = ">=4.0.0"
types-python-dateutil = ">=2.8.19.14"
mypy = "1.4.1"
pytest = ">= 7.2.1"
pytest-cov = ">= 2.8.1"
tox = ">= 3.9.0"
flake8 = ">= 4.0.0"
types-python-dateutil = ">= 2.8.19.14"
mypy = ">= 1.5"
[build-system]
@ -48,7 +49,7 @@ warn_unused_ignores = true
## Getting these passing should be easy
strict_equality = true
strict_concatenate = true
extra_checks = true
## Strongly recommend enabling this one as soon as you can
check_untyped_defs = true
@ -69,3 +70,20 @@ disallow_any_generics = true
#
### This one can be tricky to get passing if you use a lot of untyped libraries
#warn_return_any = true
[[tool.mypy.overrides]]
module = [
"codex_api_client.configuration",
]
warn_unused_ignores = true
strict_equality = true
extra_checks = true
check_untyped_defs = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_any_generics = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_reexport = true
warn_return_any = true

View File

@ -1,5 +1,4 @@
python_dateutil >= 2.5.3
setuptools >= 21.0.0
urllib3 >= 1.25.3, < 2.1.0
urllib3 >= 1.25.3, < 3.0.0
python_dateutil >= 2.8.2
pydantic >= 2
typing-extensions >= 4.7.1

View File

@ -22,10 +22,10 @@ from setuptools import setup, find_packages # noqa: H301
# http://pypi.python.org/pypi/setuptools
NAME = "Codex API Client"
VERSION = "0.0.1"
PYTHON_REQUIRES = ">=3.7"
PYTHON_REQUIRES = ">= 3.8"
REQUIRES = [
"urllib3 >= 1.25.3, < 2.1.0",
"python-dateutil",
"urllib3 >= 1.25.3, < 3.0.0",
"python-dateutil >= 2.8.2",
"pydantic >= 2",
"typing-extensions >= 4.7.1",
]

View File

@ -1,5 +1,6 @@
pytest~=7.1.3
pytest-cov>=2.8.1
pytest-randomly>=3.12.0
mypy>=1.4.1
types-python-dateutil>=2.8.19
pytest >= 7.2.1
pytest-cov >= 2.8.1
tox >= 3.9.0
flake8 >= 4.0.0
types-python-dateutil >= 2.8.19.14
mypy >= 1.5