199 self.__logger_format = value
200 self.logger_formatter = logging.Formatter(self.__logger_format)
201
202 def get_api_key_with_prefix(self, identifier):203 """Gets API key (with prefix if set).
204
205 :param identifier: The identifier of apiKey.
516
517 return params
518
519 def select_header_accept(self, accepts):520 """Returns `Accept` based on an array of accepts provided.
521
522 :param accepts: List of headers.
According to PEP8, if any return statement returns an expression, any return statements where no value is returned should explicitly state this as return None
, and an explicit return statement should be present at the end of the function (if reachable).
Good:
def foo(x):
if x >= 0:
return math.sqrt(x)
else:
return None
def bar(x):
if x < 0:
return None
return math.sqrt(x)
Bad:
def foo(x):
if x >= 0:
return math.sqrt(x)
def bar(x):
if x < 0:
return
return math.sqrt(x)