container-registry / harbor-api-client

Consider using f-strings PYL-C0209
Performance
Minor
10 months agoa year old
Formatting a regular string which could be a f-string
 82        params = locals()
 83        for key, val in six.iteritems(params["kwargs"]):
 84            if key not in all_params:
 85                raise TypeError("Got an unexpected keyword argument '%s'" " to method search" % key) 86            params[key] = val
 87        del params["kwargs"]
 88        # verify the required parameter 'q' is set
Formatting a regular string which could be a f-string
197        params = locals()
198        for key, val in six.iteritems(params["kwargs"]):
199            if key not in all_params:
200                raise TypeError("Got an unexpected keyword argument '%s'" " to method get_gc" % key)201            params[key] = val
202        del params["kwargs"]
203        # verify the required parameter 'gc_id' is set
Formatting a regular string which could be a f-string
246        :return: The report for debugging.
247        """
248        return (
249            "Python SDK Debug Report:\n"250            "OS: {env}\n"
251            "Python Version: {pyversion}\n"
252            "Version of the API: 2.0\n"
Formatting a regular string which could be a f-string
648            return string
649        except ValueError:
650            raise rest.ApiException(
651                status=0, reason=("Failed to parse `{0}` as datetime object".format(string))652            )
653
654    def __hasattr(self, object, name):
Formatting a regular string which could be a f-string
629            return string
630        except ValueError:
631            raise rest.ApiException(
632                status=0, reason="Failed to parse `{0}` as date object".format(string)633            )
634
635    def __deserialize_datatime(self, string):