Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Missing Pydantic Cases #1578

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
Loading