Showing 155 of 224 total issues
Avoid too many return
statements within this function. Open
return SAFE_ENTITIES[s]
Avoid too many return
statements within this function. Open
return "&" + s
Avoid too many return
statements within this function. Open
return SAFE_ENTITIES[s[:x]] + s[x:]
Avoid too many return
statements within this function. Open
return self.access_denied(
Avoid too many return
statements within this function. Open
return self.access_denied(
Avoid too many return
statements within this function. Open
return self.access_denied(
Avoid too many return
statements within this function. Open
return self.access_denied(
Avoid too many return
statements within this function. Open
return msg, cmd, args
Function _ensure_sys_path_contains
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _ensure_sys_path_contains(paths):
"""Ensure that os.path contains paths
:param paths:
a list of base paths to walk from
elements can be a string or a list/tuple of strings
- 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 cnf_filter
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def cnf_filter(self, msg, cmd, args, dry_run, emptycmd=False):
"""
Check if command exists. If not, signal plugins. This plugin
will be called twice: once as a command filter and then again
as a "command not found" filter. See the emptycmd parameter.
- 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_auth
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_auth():
"""Get auth creds from Github Token
token is generated from the personal tokens in github
"""
- 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 poller
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def poller(
self,
interval: float,
method: Callable[..., None],
times: int = None,
- 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 repos
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def repos(self, _, args):
"""list the current active plugin repositories"""
installed_repos = self._bot.repo_manager.get_installed_plugin_repos()
- 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 callback_connect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def callback_connect(self):
self.log.info("Connecting bot chatrooms")
if not self.connected:
self.connected = True
for room in self.bot_config.CHATROOM_PRESENCE:
- 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 __str__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __str__(self):
response = ""
if self._reactor:
response += f'reactor: "{self._reactor}" '
if self._reaction_name:
- 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"