stackit-git 0.5.0__tar.gz → 0.5.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {stackit_git-0.5.0 → stackit_git-0.5.1}/PKG-INFO +1 -1
  2. {stackit_git-0.5.0 → stackit_git-0.5.1}/pyproject.toml +1 -1
  3. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/instance.py +14 -0
  4. {stackit_git-0.5.0 → stackit_git-0.5.1}/LICENSE.md +0 -0
  5. {stackit_git-0.5.0 → stackit_git-0.5.1}/NOTICE.txt +0 -0
  6. {stackit_git-0.5.0 → stackit_git-0.5.1}/README.md +0 -0
  7. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/__init__.py +0 -0
  8. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/api/__init__.py +0 -0
  9. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/api/default_api.py +0 -0
  10. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/api_client.py +0 -0
  11. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/api_response.py +0 -0
  12. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/configuration.py +0 -0
  13. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/exceptions.py +0 -0
  14. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/__init__.py +0 -0
  15. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/create_instance_payload.py +0 -0
  16. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/flavor.py +0 -0
  17. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/generic_error_response.py +0 -0
  18. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/internal_server_error_response.py +0 -0
  19. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/list_flavors.py +0 -0
  20. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/list_instances.py +0 -0
  21. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/patch_operation.py +0 -0
  22. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/models/unauthorized_response.py +0 -0
  23. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/py.typed +0 -0
  24. {stackit_git-0.5.0 → stackit_git-0.5.1}/src/stackit/git/rest.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackit-git
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: STACKIT Git API
5
5
  License-File: LICENSE.md
6
6
  License-File: NOTICE.txt
@@ -3,7 +3,7 @@ name = "stackit-git"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "stackit-git"
6
- version = "v0.5.0"
6
+ version = "v0.5.1"
7
7
  authors = [
8
8
  "STACKIT Developer Tools <developer-tools@stackit.cloud>",
9
9
  ]
@@ -16,6 +16,7 @@ from __future__ import annotations
16
16
 
17
17
  import json
18
18
  import pprint
19
+ import re # noqa: F401
19
20
  from datetime import datetime
20
21
  from typing import Any, ClassVar, Dict, List, Optional, Set
21
22
 
@@ -61,6 +62,19 @@ class Instance(BaseModel):
61
62
  "version",
62
63
  ]
63
64
 
65
+ @field_validator("created", mode="before")
66
+ def created_change_year_zero_to_one(cls, value):
67
+ """Workaround which prevents year 0 issue"""
68
+ if isinstance(value, str):
69
+ # Check for year "0000" at the beginning of the string
70
+ # This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
71
+ if value.startswith("0000-01-01T") and re.match(
72
+ r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
73
+ ):
74
+ # Workaround: Replace "0000" with "0001"
75
+ return "0001" + value[4:] # Take "0001" and append the rest of the string
76
+ return value
77
+
64
78
  @field_validator("state")
65
79
  def state_validate_enum(cls, value):
66
80
  """Validates the enum"""
File without changes
File without changes
File without changes