Showing 154 of 154 total issues
Function updatestats
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def updatestats(type=False, id=0, name=False, date=False, memberid=None):
Function getstats
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def getstats(type=False, id=0, name=False, date=False, count=0):
Function remove_from_memberid
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def remove_from_memberid(type=False, id=0, name=False, date=False, memberid=None):
Function whois
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def whois(chat_id=False, user_id=False):
"""
Use API call to retrieve userid
:param chat_id: chat id to locate user into
:param user_id: user id to kick out of chat
- Read upRead up
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 autokarmawords
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def autokarmawords(message):
"""
Finds commands affecting autokarma in messages
:param message: message to process
:return:
- Read upRead up
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 helpcommands
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def helpcommands(message):
"""
Searches for commands related to help
:param message: nessage to process
:return:
- Read upRead up
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
Avoid too many return
statements within this function. Open
return
Function unban
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def unban(chat_id=False, user_id=False):
"""
Use API call to have the bot unban user
:param chat_id: Channel ID to unban user on
:param user_id: User ID to unban
- Read upRead up
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 getstats
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def getstats(type=False, id=0, name=False, date=False, count=0):
"""
Gets statistics for specified element
:param type: chat or user type to query
:param id: identifier for user or chat
- Read upRead up
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 rank
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def rank(word=False, gid=0):
"""
Outputs rank for word or top 10
:param gid: Group ID to filter
:param word: word to return rank for
- Read upRead up
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 showstats
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def showstats(type=False, name=None, key="name"):
"""
Shows stats for defined type or all if missing
:param name: name to search in the stats database
:param type: user or chat or empy for combined
- Read upRead up
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_currency_rate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_currency_rate(currency, rate_in):
"""
Get currency rate
:param currency: Original Currency
:param rate_in: Destination Currency
- Read upRead up
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
TODO found Open
# TODO
- Exclude checks
TODO found Open
If you're looking around to see what to contribute, please check 'TODO.md' as it contains information on the already identified missing features.
- Exclude checks