Showing 160 of 183 total issues
Avoid too many return
statements within this function. Open
return(forbidden,403,headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (internal_server_error, 500, headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (conflict, 409, headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (internal_server_error, 500, headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (forbidden, 403, headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (ret,200,headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return(forbidden,403,headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (internal_server_error,500,headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (conflict,409,headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (Sponsor_Schema().dump(ret).data,201,headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (internal_server_error,500,headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return(forbidden,403,headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (forbidden,403,headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (ret,200,headers)
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
return (bad_request,400,headers)
- Create a ticketCreate a ticket
Function post
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def post(self):
"""
Create new user. Required data: email,ID_Token,first_name,last_name
"""
Users = g.Base.classes.users
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get(self):
"""
GET all the rsvps at a time.
"""
user_status, calling_user = has_admin_privileges()
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get(self):
"""
GET all the users at a time.
Application_id and rsvp_id is not gonna be returned when GET is called on all the users.
Because getting the application_id and rsvp_id makes db calls and making calls for application_id and rsvp_id on hundreds of users is costly.
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get(self):
"""
GET all the applications at a time.
"""
user_status, calling_user = has_admin_privileges()
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function check_all_fields
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def check_all_fields(self,data, **kwargs):
errors = {}
try:
validator = validate.Email()
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"