|
1 | | -""" Module with default objects """ |
| 1 | +"""Module with default objects""" |
2 | 2 |
|
3 | 3 | import logging |
4 | 4 | import copy |
@@ -88,7 +88,7 @@ def read_by_name(self, name: str, **kwargs) -> "DefaultResourceCRD": |
88 | 88 | """ |
89 | 89 | return self.fetch_crd_entity(name) or super().read_by_name(name, **kwargs) |
90 | 90 |
|
91 | | - def read(self, entity_id: int = None, **kwargs) -> 'DefaultResourceCRD': |
| 91 | + def read(self, entity_id: int = None, **kwargs) -> "DefaultResourceCRD": |
92 | 92 | """Read the instance, read will just create empty resource and lazyloads only if needed |
93 | 93 | Args: |
94 | 94 | entity_id(int): Entity id |
@@ -146,7 +146,7 @@ def exists(self, entity_id=None, **kwargs) -> bool: |
146 | 146 | ) |
147 | 147 | return self.fetch(entity_id, **kwargs) |
148 | 148 |
|
149 | | - def _list(self, **kwargs) -> List["DefaultResourceCRD"]: |
| 149 | + def _list(self, **kwargs) -> list["DefaultResourceCRD"]: |
150 | 150 | """Internal list implementation used in list or `select` methods |
151 | 151 | Args: |
152 | 152 | **kwargs: Optional parameters |
@@ -232,7 +232,7 @@ def create(self, params: dict = None, **kwargs) -> "DefaultResourceCRD": |
232 | 232 | # timeout = 1000 |
233 | 233 |
|
234 | 234 | with ocp.timeout(timeout): |
235 | | - (success, created_objects, _) = result.until_all( |
| 235 | + success, created_objects, _ = result.until_all( |
236 | 236 | success_func=lambda obj: self._is_ready(obj) |
237 | 237 | ) |
238 | 238 | assert created_objects |
@@ -411,7 +411,7 @@ def get_id_from_crd(self): |
411 | 411 | return None |
412 | 412 |
|
413 | 413 | # flake8: noqa C901 |
414 | | - def _extract_resource_crd(self, response, collection, klass) -> Union[List, Dict]: |
| 414 | + def _extract_resource_crd(self, response, collection, klass) -> list | dict: |
415 | 415 | extract_params = {"response": response, "entity": self._entity_name} |
416 | 416 | if collection: |
417 | 417 | extract_params["collection"] = self._entity_collection |
|
0 commit comments