Showing 155 of 224 total issues
Function _start
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
}, _start: function (a) {
var d = {}, e, c;
a = l(a);
e = b.group[a] || null;
if (!e)return!1;
Function __init__
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function send_card
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def send_card(
Function beforeShow
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
beforeShow: function (opts) {
var current = F.current,
text = current.title,
type = opts.type,
title,
Function play
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
play: function (action) {
var clear = function () {
clearTimeout(F.player.timer);
},
set = function () {
Function fancybox
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.fancybox = function (options) {
var index,
that = $(this),
selector = this.selector || '',
run = function (e) {
Function which
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def which(program: str) -> Optional[str]:
if ON_WINDOWS:
program += ".exe"
def is_exe(file_path):
- 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 build_identifier
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def build_identifier(
self, txtrep: str
) -> Union[XMPPRoomOccupant, XMPPRoom, XMPPPerson]:
log.debug("build identifier for %s", txtrep)
try:
- 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 status_plugins
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def status_plugins(self, _, args):
"""shows the plugin status"""
pm = self._bot.plugin_manager
all_blacklisted = pm.get_blacklisted_plugin()
all_loaded = pm.get_all_active_plugin_names()
- 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 arg_botcmd
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def arg_botcmd(
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function botcmd
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def botcmd(
Function send_message
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def send_message(self, msg: Message) -> None:
if self.demo_mode:
print(self.md_ansi.convert(msg.body))
else:
bar = "\n╌╌[{mode}]" + ("╌" * 60)
- 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 index_update
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def index_update(self) -> None:
index = {LAST_UPDATE: datetime.now().timestamp()}
for source in reversed(self.plugin_indexes):
try:
if urlparse(source).scheme in ("http", "https"):
- 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 route
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def route(obj):
"""Check for functions to route in obj and route them."""
flask_app = errbot.core_plugins.flask_app
classname = obj.__class__.__name__
log.info("Checking %s for webhooks", classname)
- 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 check_inflight_flow_triggered
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def check_inflight_flow_triggered(
self, cmd: str, user: Identifier
) -> Tuple[Optional[Flow], Optional[FlowNode]]:
"""
Check if a command from a specific user was expected in one of the running flow.
- 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_install
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def repos_install(self, _, args):
"""install a plugin repository from the given source or a known public repo (see !repos to find those).
for example from a known repo: !install err-codebot
for example a git url: git@github.com:gbin/plugin.git
or an url towards an archive: https://github.com/errbotio/err-helloworld/archive/refs/heads/master.zip
- 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 room_topic
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def room_topic(self, message, args):
"""
Get or set the topic for a room.
Usage:
- 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 changeIn
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
changeIn: function () {
var current = F.current,
effect = current.nextEffect,
startPos = current.pos,
endPos = { opacity: 1 },
Function bot_config_defaults
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def bot_config_defaults(config: object) -> None:
if not hasattr(config, "ACCESS_CONTROLS_DEFAULT"):
config.ACCESS_CONTROLS_DEFAULT = {}
if not hasattr(config, "ACCESS_CONTROLS"):
config.ACCESS_CONTROLS = {}