Skip to content

Commit

Permalink
Merge pull request #10 from container-registry/update_dependencies_bl…
Browse files Browse the repository at this point in the history
…ack_formatter

updates
  • Loading branch information
alexandre-k committed Jul 28, 2023
2 parents 385664a + 91af570 commit 3a2d7b2
Show file tree
Hide file tree
Showing 417 changed files with 25,941 additions and 18,846 deletions.
457 changes: 457 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ readme = "README.md"
"Bug Tracker" = "https://github.com/container-registry/harbor-api-client/issues"

[tool.poetry.dependencies]
python = ">=3.4"
python = ">=3.8"
certifi = ">=2022.12.7"
six = "^1.10"
python_dateutil = "^2.8.1"
Expand All @@ -27,8 +27,18 @@ nose = "^1.3.7"
pluggy = "^0.3.1"
py = "^1.4.31"
randomize = "^0.13"
black = "^23.3.0"
mypy = "^1.1.1"
ruff = "^0.0.261"

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

[tool.black]
line-length = 100
target-version = ['py38']

[tool.ruff]
line-length = 100

2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

13 changes: 10 additions & 3 deletions src/harbor_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
# import ApiClient
from harbor_client.api_client import ApiClient
from harbor_client.configuration import Configuration

# import models into sdk package
from harbor_client.models.access import Access
from harbor_client.models.accessory import Accessory
Expand All @@ -77,8 +78,12 @@
from harbor_client.models.component_health_status import ComponentHealthStatus
from harbor_client.models.configurations import Configurations
from harbor_client.models.configurations_response import ConfigurationsResponse
from harbor_client.models.configurations_response_scan_all_policy import ConfigurationsResponseScanAllPolicy
from harbor_client.models.configurations_response_scan_all_policy_parameter import ConfigurationsResponseScanAllPolicyParameter
from harbor_client.models.configurations_response_scan_all_policy import (
ConfigurationsResponseScanAllPolicy,
)
from harbor_client.models.configurations_response_scan_all_policy_parameter import (
ConfigurationsResponseScanAllPolicyParameter,
)
from harbor_client.models.endpoint import Endpoint
from harbor_client.models.error import Error
from harbor_client.models.errors import Errors
Expand Down Expand Up @@ -134,7 +139,9 @@
from harbor_client.models.registry_endpoint import RegistryEndpoint
from harbor_client.models.registry_info import RegistryInfo
from harbor_client.models.registry_ping import RegistryPing
from harbor_client.models.registry_provider_credential_pattern import RegistryProviderCredentialPattern
from harbor_client.models.registry_provider_credential_pattern import (
RegistryProviderCredentialPattern,
)
from harbor_client.models.registry_provider_endpoint_pattern import RegistryProviderEndpointPattern
from harbor_client.models.registry_provider_info import RegistryProviderInfo
from harbor_client.models.registry_update import RegistryUpdate
Expand Down
1,690 changes: 1,037 additions & 653 deletions src/harbor_client/api/artifact_api.py

Large diffs are not rendered by default.

88 changes: 49 additions & 39 deletions src/harbor_client/api/auditlog_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def list_audit_logs(self, **kwargs): # noqa: E501
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
kwargs["_return_http_data_only"] = True
if kwargs.get("async_req"):
return self.list_audit_logs_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.list_audit_logs_with_http_info(**kwargs) # noqa: E501
Expand All @@ -79,72 +79,82 @@ def list_audit_logs_with_http_info(self, **kwargs): # noqa: E501
returns the request thread.
"""

all_params = ['x_request_id', 'q', 'sort', 'page', 'page_size'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
all_params = ["x_request_id", "q", "sort", "page", "page_size"] # noqa: E501
all_params.append("async_req")
all_params.append("_return_http_data_only")
all_params.append("_preload_content")
all_params.append("_request_timeout")

params = locals()
for key, val in six.iteritems(params['kwargs']):
for key, val in six.iteritems(params["kwargs"]):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method list_audit_logs" % key
"Got an unexpected keyword argument '%s'" " to method list_audit_logs" % key
)
params[key] = val
del params['kwargs']

if self.api_client.client_side_validation and ('x_request_id' in params and
len(params['x_request_id']) < 1):
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
if self.api_client.client_side_validation and ('page_size' in params and params['page_size'] > 100): # noqa: E501
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
del params["kwargs"]

if self.api_client.client_side_validation and (
"x_request_id" in params and len(params["x_request_id"]) < 1
):
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
if self.api_client.client_side_validation and (
"page_size" in params and params["page_size"] > 100
): # noqa: E501
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
collection_formats = {}

path_params = {}

query_params = []
if 'q' in params:
query_params.append(('q', params['q'])) # noqa: E501
if 'sort' in params:
query_params.append(('sort', params['sort'])) # noqa: E501
if 'page' in params:
query_params.append(('page', params['page'])) # noqa: E501
if 'page_size' in params:
query_params.append(('page_size', params['page_size'])) # noqa: E501
if "q" in params:
query_params.append(("q", params["q"])) # noqa: E501
if "sort" in params:
query_params.append(("sort", params["sort"])) # noqa: E501
if "page" in params:
query_params.append(("page", params["page"])) # noqa: E501
if "page_size" in params:
query_params.append(("page_size", params["page_size"])) # noqa: E501

header_params = {}
if 'x_request_id' in params:
header_params['X-Request-Id'] = params['x_request_id'] # noqa: E501
if "x_request_id" in params:
header_params["X-Request-Id"] = params["x_request_id"] # noqa: E501

form_params = []
local_var_files = {}

body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
header_params["Accept"] = self.api_client.select_header_accept(
["application/json"]
) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501
header_params["Content-Type"] = self.api_client.select_header_content_type( # noqa: E501
["application/json"]
) # noqa: E501

# Authentication setting
auth_settings = ['basic'] # noqa: E501
auth_settings = ["basic"] # noqa: E501

return self.api_client.call_api(
'/audit-logs', 'GET',
"/audit-logs",
"GET",
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[AuditLog]', # noqa: E501
response_type="list[AuditLog]", # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
async_req=params.get("async_req"),
_return_http_data_only=params.get("_return_http_data_only"),
_preload_content=params.get("_preload_content", True),
_request_timeout=params.get("_request_timeout"),
collection_formats=collection_formats,
)
Loading

0 comments on commit 3a2d7b2

Please sign in to comment.