Errors detected in .deepsource.toml
.
18 """
19
20 @wraps(view_func)
21 def inner_view( # noqa22 request, subproject=None, subproject_slug=None, *args, **kwargs
23 ):
24 if subproject is None and subproject_slug:
59 """
60
61 @wraps(view_func)
62 def inner_view( # noqa63 request, project=None, project_slug=None, *args, **kwargs
64 ):
65 if project is None:
68 safe_messages.append(message)
69 return safe_messages, all_ret
70
71 def add(self, level, message, extra_tags='', *args, **kwargs): # noqa 72 user = kwargs.get('user') or self.request.user
73 if not user.is_anonymous:
74 persist_messages = (
On defining a keyword argument before variable positional arguments, one can end up in having multiple values passed for the aforementioned parameter in case the method is called with keyword arguments. It is recommended to define keyword arguments after variable positional arguments.
def create_list(double=False, *args): # first argument will end up in `double`
return list(args)
print(create_list(1, 2, 3)) # prints `[2, 3]`
def create_list(*args, double=False):
return list(args)
print(create_list(1, 2, 3)) # prints `[1, 2, 3]`