Showing 44 of 99 total issues
Function remove_ffmpeg_log_files
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def remove_ffmpeg_log_files(self):
"""Remove any log files."""
path = self.get_target_path()
dir = os.path.dirname(path.rstrip(os.pathsep))
if os.path.isdir(dir):
- 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 updatetask
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
updatetask = function ( taskid, data ) {
if ( data ) {
io.in( taskid ).emit( 'update', taskid, data );
} else {
// Do nothing if room is empty
- 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 _loadi18nfiles
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _loadi18nfiles(fallbacklist):
datafiles = {}
for code in fallbacklist:
if code not in datafiles:
path = _d + '/i18n/' + code + '.json'
- 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 upload_pwb
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def upload_pwb(
filename, wikifilename, sourceurl, filedesc, username,
size, statuscallback, errorcallback
):
"""Upload with pywikibot."""
- 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"