Skip to content

Commit 3a2d7b2

Browse files
authored
Merge pull request #10 from container-registry/update_dependencies_black_formatter
updates
2 parents 385664a + 91af570 commit 3a2d7b2

File tree

417 files changed

+25941
-18846
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

417 files changed

+25941
-18846
lines changed

poetry.lock

Lines changed: 457 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ readme = "README.md"
1515
"Bug Tracker" = "https://github.com/container-registry/harbor-api-client/issues"
1616

1717
[tool.poetry.dependencies]
18-
python = ">=3.4"
18+
python = ">=3.8"
1919
certifi = ">=2022.12.7"
2020
six = "^1.10"
2121
python_dateutil = "^2.8.1"
@@ -27,8 +27,18 @@ nose = "^1.3.7"
2727
pluggy = "^0.3.1"
2828
py = "^1.4.31"
2929
randomize = "^0.13"
30+
black = "^23.3.0"
31+
mypy = "^1.1.1"
32+
ruff = "^0.0.261"
3033

3134
[build-system]
3235
requires = ["poetry-core>=1.0.0"]
3336
build-backend = "poetry.core.masonry.api"
3437

38+
[tool.black]
39+
line-length = 100
40+
target-version = ['py38']
41+
42+
[tool.ruff]
43+
line-length = 100
44+

setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/harbor_client/__init__.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
# import ApiClient
5858
from harbor_client.api_client import ApiClient
5959
from harbor_client.configuration import Configuration
60+
6061
# import models into sdk package
6162
from harbor_client.models.access import Access
6263
from harbor_client.models.accessory import Accessory
@@ -77,8 +78,12 @@
7778
from harbor_client.models.component_health_status import ComponentHealthStatus
7879
from harbor_client.models.configurations import Configurations
7980
from harbor_client.models.configurations_response import ConfigurationsResponse
80-
from harbor_client.models.configurations_response_scan_all_policy import ConfigurationsResponseScanAllPolicy
81-
from harbor_client.models.configurations_response_scan_all_policy_parameter import ConfigurationsResponseScanAllPolicyParameter
81+
from harbor_client.models.configurations_response_scan_all_policy import (
82+
ConfigurationsResponseScanAllPolicy,
83+
)
84+
from harbor_client.models.configurations_response_scan_all_policy_parameter import (
85+
ConfigurationsResponseScanAllPolicyParameter,
86+
)
8287
from harbor_client.models.endpoint import Endpoint
8388
from harbor_client.models.error import Error
8489
from harbor_client.models.errors import Errors
@@ -134,7 +139,9 @@
134139
from harbor_client.models.registry_endpoint import RegistryEndpoint
135140
from harbor_client.models.registry_info import RegistryInfo
136141
from harbor_client.models.registry_ping import RegistryPing
137-
from harbor_client.models.registry_provider_credential_pattern import RegistryProviderCredentialPattern
142+
from harbor_client.models.registry_provider_credential_pattern import (
143+
RegistryProviderCredentialPattern,
144+
)
138145
from harbor_client.models.registry_provider_endpoint_pattern import RegistryProviderEndpointPattern
139146
from harbor_client.models.registry_provider_info import RegistryProviderInfo
140147
from harbor_client.models.registry_update import RegistryUpdate

src/harbor_client/api/artifact_api.py

Lines changed: 1037 additions & 653 deletions
Large diffs are not rendered by default.

src/harbor_client/api/auditlog_api.py

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def list_audit_logs(self, **kwargs): # noqa: E501
5252
If the method is called asynchronously,
5353
returns the request thread.
5454
"""
55-
kwargs['_return_http_data_only'] = True
56-
if kwargs.get('async_req'):
55+
kwargs["_return_http_data_only"] = True
56+
if kwargs.get("async_req"):
5757
return self.list_audit_logs_with_http_info(**kwargs) # noqa: E501
5858
else:
5959
(data) = self.list_audit_logs_with_http_info(**kwargs) # noqa: E501
@@ -79,72 +79,82 @@ def list_audit_logs_with_http_info(self, **kwargs): # noqa: E501
7979
returns the request thread.
8080
"""
8181

82-
all_params = ['x_request_id', 'q', 'sort', 'page', 'page_size'] # noqa: E501
83-
all_params.append('async_req')
84-
all_params.append('_return_http_data_only')
85-
all_params.append('_preload_content')
86-
all_params.append('_request_timeout')
82+
all_params = ["x_request_id", "q", "sort", "page", "page_size"] # noqa: E501
83+
all_params.append("async_req")
84+
all_params.append("_return_http_data_only")
85+
all_params.append("_preload_content")
86+
all_params.append("_request_timeout")
8787

8888
params = locals()
89-
for key, val in six.iteritems(params['kwargs']):
89+
for key, val in six.iteritems(params["kwargs"]):
9090
if key not in all_params:
9191
raise TypeError(
92-
"Got an unexpected keyword argument '%s'"
93-
" to method list_audit_logs" % key
92+
"Got an unexpected keyword argument '%s'" " to method list_audit_logs" % key
9493
)
9594
params[key] = val
96-
del params['kwargs']
97-
98-
if self.api_client.client_side_validation and ('x_request_id' in params and
99-
len(params['x_request_id']) < 1):
100-
raise ValueError("Invalid value for parameter `x_request_id` when calling `list_audit_logs`, length must be greater than or equal to `1`") # noqa: E501
101-
if self.api_client.client_side_validation and ('page_size' in params and params['page_size'] > 100): # noqa: E501
102-
raise ValueError("Invalid value for parameter `page_size` when calling `list_audit_logs`, must be a value less than or equal to `100`") # noqa: E501
95+
del params["kwargs"]
96+
97+
if self.api_client.client_side_validation and (
98+
"x_request_id" in params and len(params["x_request_id"]) < 1
99+
):
100+
raise ValueError(
101+
"Invalid value for parameter `x_request_id` when calling `list_audit_logs`, length must be greater than or equal to `1`"
102+
) # noqa: E501
103+
if self.api_client.client_side_validation and (
104+
"page_size" in params and params["page_size"] > 100
105+
): # noqa: E501
106+
raise ValueError(
107+
"Invalid value for parameter `page_size` when calling `list_audit_logs`, must be a value less than or equal to `100`"
108+
) # noqa: E501
103109
collection_formats = {}
104110

105111
path_params = {}
106112

107113
query_params = []
108-
if 'q' in params:
109-
query_params.append(('q', params['q'])) # noqa: E501
110-
if 'sort' in params:
111-
query_params.append(('sort', params['sort'])) # noqa: E501
112-
if 'page' in params:
113-
query_params.append(('page', params['page'])) # noqa: E501
114-
if 'page_size' in params:
115-
query_params.append(('page_size', params['page_size'])) # noqa: E501
114+
if "q" in params:
115+
query_params.append(("q", params["q"])) # noqa: E501
116+
if "sort" in params:
117+
query_params.append(("sort", params["sort"])) # noqa: E501
118+
if "page" in params:
119+
query_params.append(("page", params["page"])) # noqa: E501
120+
if "page_size" in params:
121+
query_params.append(("page_size", params["page_size"])) # noqa: E501
116122

117123
header_params = {}
118-
if 'x_request_id' in params:
119-
header_params['X-Request-Id'] = params['x_request_id'] # noqa: E501
124+
if "x_request_id" in params:
125+
header_params["X-Request-Id"] = params["x_request_id"] # noqa: E501
120126

121127
form_params = []
122128
local_var_files = {}
123129

124130
body_params = None
125131
# HTTP header `Accept`
126-
header_params['Accept'] = self.api_client.select_header_accept(
127-
['application/json']) # noqa: E501
132+
header_params["Accept"] = self.api_client.select_header_accept(
133+
["application/json"]
134+
) # noqa: E501
128135

129136
# HTTP header `Content-Type`
130-
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
131-
['application/json']) # noqa: E501
137+
header_params["Content-Type"] = self.api_client.select_header_content_type( # noqa: E501
138+
["application/json"]
139+
) # noqa: E501
132140

133141
# Authentication setting
134-
auth_settings = ['basic'] # noqa: E501
142+
auth_settings = ["basic"] # noqa: E501
135143

136144
return self.api_client.call_api(
137-
'/audit-logs', 'GET',
145+
"/audit-logs",
146+
"GET",
138147
path_params,
139148
query_params,
140149
header_params,
141150
body=body_params,
142151
post_params=form_params,
143152
files=local_var_files,
144-
response_type='list[AuditLog]', # noqa: E501
153+
response_type="list[AuditLog]", # noqa: E501
145154
auth_settings=auth_settings,
146-
async_req=params.get('async_req'),
147-
_return_http_data_only=params.get('_return_http_data_only'),
148-
_preload_content=params.get('_preload_content', True),
149-
_request_timeout=params.get('_request_timeout'),
150-
collection_formats=collection_formats)
155+
async_req=params.get("async_req"),
156+
_return_http_data_only=params.get("_return_http_data_only"),
157+
_preload_content=params.get("_preload_content", True),
158+
_request_timeout=params.get("_request_timeout"),
159+
collection_formats=collection_formats,
160+
)

0 commit comments

Comments
 (0)