Skip to content

Commit

Permalink
Add Missing Pydantic Cases
Browse files Browse the repository at this point in the history
* Update autogenerated code and fix missing pydantic imports
  • Loading branch information
guarin committed Jul 10, 2024
1 parent 6ebde88 commit bcf6716
Show file tree
Hide file tree
Showing 304 changed files with 141 additions and 883 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, constr, validator

from typing import List

Expand Down
8 changes: 6 additions & 2 deletions lightly/openapi_generated/swagger_client/api/datasets_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator

from typing import List, Optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictStr, conint, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, StrictBool, StrictStr, conint, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, StrictBool, StrictStr, conint, constr, validator

from typing import List, Optional

Expand Down
8 changes: 6 additions & 2 deletions lightly/openapi_generated/swagger_client/api/docker_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator

from typing import List, Optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, constr, validator

from typing import List

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictStr, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, StrictStr, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, StrictStr, constr, validator

from typing import List, Optional

Expand Down
8 changes: 6 additions & 2 deletions lightly/openapi_generated/swagger_client/api/jobs_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictStr
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, StrictStr
except ImportError:
# Pydantic v1
from pydantic import Field, StrictStr

from typing import List

Expand Down
8 changes: 6 additions & 2 deletions lightly/openapi_generated/swagger_client/api/mappings_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictStr, conint, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, StrictStr, conint, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, StrictStr, conint, constr, validator

from typing import List, Optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, constr, validator

from typing import List

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictBool, conint, conlist, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, StrictBool, conint, conlist, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, StrictBool, conint, conlist, constr, validator

from typing import List, Optional

Expand Down
1 change: 0 additions & 1 deletion lightly/openapi_generated/swagger_client/api/quota_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand Down
8 changes: 6 additions & 2 deletions lightly/openapi_generated/swagger_client/api/samples_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictStr, conint, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, StrictBool, StrictStr, conint, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, StrictBool, StrictStr, conint, constr, validator

from typing import List, Optional

Expand Down
8 changes: 6 additions & 2 deletions lightly/openapi_generated/swagger_client/api/samplings_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, constr, validator

from lightly.openapi_generated.swagger_client.models.async_task_data import AsyncTaskData
from lightly.openapi_generated.swagger_client.models.sampling_create_request import SamplingCreateRequest
Expand Down
8 changes: 6 additions & 2 deletions lightly/openapi_generated/swagger_client/api/scores_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, conint, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, conint, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, conint, constr, validator

from typing import List, Optional

Expand Down
8 changes: 6 additions & 2 deletions lightly/openapi_generated/swagger_client/api/tags_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, StrictBool, StrictInt, StrictStr, conint, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, constr, validator

from typing import List, Optional, Union

Expand Down
8 changes: 6 additions & 2 deletions lightly/openapi_generated/swagger_client/api/teams_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictStr, constr, validator
try:
# Pydantic >=v1.10.17
from pydantic.v1 import Field, StrictStr, constr, validator
except ImportError:
# Pydantic v1
from pydantic import Field, StrictStr, constr, validator

from typing import List

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import re # noqa: F401
import io
import warnings

try:
# Pydantic >=v1.10.17
from pydantic.v1 import validate_arguments, ValidationError
Expand All @@ -25,7 +24,12 @@
from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import StrictStr
try:
# Pydantic >=v1.10.17
from pydantic.v1 import StrictStr
except ImportError:
# Pydantic v1
from pydantic import StrictStr

from typing import Optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
try:
# Pydantic >=v1.10.17
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, conlist, constr, validator
pass # Add pass to avoid empty try/except if no imports are generated for this file.
except ImportError:
# Pydantic v1
from pydantic import BaseModel, Field, StrictFloat, StrictInt, conlist, constr, validator
pass # Add pass to avoid empty try/except if no imports are generated for this file.

class ActiveLearningScoreCreateRequest(BaseModel):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
try:
# Pydantic >=v1.10.17
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, conint, conlist, constr, validator
pass # Add pass to avoid empty try/except if no imports are generated for this file.
except ImportError:
# Pydantic v1
from pydantic import BaseModel, Field, StrictFloat, StrictInt, conint, conlist, constr, validator
pass # Add pass to avoid empty try/except if no imports are generated for this file.

class ActiveLearningScoreData(BaseModel):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
try:
# Pydantic >=v1.10.17
from pydantic.v1 import BaseModel, Field, conint, constr, validator
pass # Add pass to avoid empty try/except if no imports are generated for this file.
except ImportError:
# Pydantic v1
from pydantic import BaseModel, Field, conint, constr, validator
pass # Add pass to avoid empty try/except if no imports are generated for this file.

class ActiveLearningScoreTypesV2Data(BaseModel):
"""
Expand Down
Loading

0 comments on commit bcf6716

Please sign in to comment.