Skip to content

Commit c8af733

Browse files
fix(Search: regenerated services with latest API definition
Signed-off-by: Fabrizio Leoni <fabrizio_leoni@it.ibm.com>
1 parent 09d2507 commit c8af733

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

ibm_platform_services/global_search_v2.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ def new_instance(
6161
parameters and external configuration.
6262
"""
6363
authenticator = get_authenticator_from_environment(service_name)
64-
service = cls(
65-
authenticator
66-
)
64+
service = cls(authenticator)
6765
service.configure_service(service_name)
6866
return service
6967

@@ -255,6 +253,7 @@ class IsDeleted(str, Enum):
255253
TRUE = 'true'
256254
FALSE = 'false'
257255
ANY = 'any'
256+
258257
class IsReclaimed(str, Enum):
259258
"""
260259
Determines if reclaimed documents should be included in result set or not.
@@ -266,6 +265,7 @@ class IsReclaimed(str, Enum):
266265
TRUE = 'true'
267266
FALSE = 'false'
268267
ANY = 'any'
268+
269269
class CanTag(str, Enum):
270270
"""
271271
Determines if the result set must return the resources that the user can tag or
@@ -277,6 +277,7 @@ class CanTag(str, Enum):
277277

278278
TRUE = 'true'
279279
FALSE = 'false'
280+
280281
class IsProjectResource(str, Enum):
281282
"""
282283
Determines if documents belonging to Project family should be included in result
@@ -339,9 +340,9 @@ def from_dict(cls, _dict: Dict) -> 'ResultItem':
339340
raise ValueError('Required property \'crn\' not present in ResultItem JSON')
340341
for k, v in _dict.items():
341342
if k not in cls._properties:
342-
if not isinstance(v, object):
343-
raise ValueError('Value for additional property {} must be of type object'.format(k))
344-
args[k] = v
343+
if not isinstance(v, object):
344+
raise ValueError('Value for additional property {} must be of type object'.format(k))
345+
args[k] = v
345346
return cls(**args)
346347

347348
@classmethod

test/unit/test_global_search_v2.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
from ibm_platform_services.global_search_v2 import *
3030

3131

32-
_service = GlobalSearchV2(
33-
authenticator=NoAuthAuthenticator()
34-
)
32+
_service = GlobalSearchV2(authenticator=NoAuthAuthenticator())
3533

3634
_base_url = 'https://api.global-search-tagging.cloud.ibm.com'
3735
_service.set_service_url(_base_url)

0 commit comments

Comments
 (0)