Showing 9,525 of 13,510 total issues
Function readfp
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def readfp(self, fp, strict=True):
"""
Read a single mime.types-format file.
If strict is true, information will be added to
- 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 move
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def move(src, dst):
"""Recursively move a file or directory to another location. This is
similar to the Unix "mv" command.
If the destination is a directory or a symlink to a directory, the source
- 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 _add_container_actions
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _add_container_actions(self, container):
# collect groups by titles
title_group_map = {}
for group in self._action_groups:
if group.title in title_group_map:
- 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 make_archive
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def make_archive(base_name, format, root_dir=None, base_dir=None, verbose=0,
dry_run=0, owner=None, group=None, logger=None):
"""Create an archive file (eg. zip or tar).
'base_name' is the name of the file to create, minus any format-specific
- 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 test
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def test(args = None):
import sys
if args is None:
args = sys.argv[1:]
- 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_tagged_response
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _get_tagged_response(self, tag):
while 1:
result = self.tagged_commands[tag]
if result is not 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 _get_default_tempdir
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _get_default_tempdir():
"""Calculate the default directory to use for temporary files.
This routine should be called exactly once.
We determine whether or not a candidate temp dir is usable by
- 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
Method ParseSwitch
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
boolean ParseSwitch(String s)
{
if (s.startsWith("d"))
{
DictionarySize = 1 << Integer.parseInt(s.substring(1));
Function ToXml
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def ToXml(self, Module):
if self.Package:
pass
#
# Create root node of module surface area
Function InitDatabase
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def InitDatabase(self, NewDatabase = True):
EdkLogger.verbose("\nInitialize EOT database started ...")
#
# Drop all old existing tables
#
Function __init__
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(self, CommandLineOption=True, IsInit=True, SourceFileList=None, \
IncludeDirList=None, DecFileList=None, GuidList=None, LogFile=None,
FvFileList="", MapFileList="", Report='Report.html', Dispatch=None):
# Version and Copyright
self.VersionNumber = ("0.02" + " " + gBUILD_VERSION)
Function __init__
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(self, master):
self.master = master
self.promptdisplay = Label(self.master, anchor=W,
text="Enter a Perl-style regular expression:")
Function _test
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def _test():
l = [None, 1, 2L, 3.14, 'xyzzy', (1, 2L), [3.14, 'abc'],
{'abc': 'ABC'}, (), [], {}]
l1 = copy(l)
print l1==l
Function _test
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def _test():
l = [None, 1, 2L, 3.14, 'xyzzy', (1, 2L), [3.14, 'abc'],
{'abc': 'ABC'}, (), [], {}]
l1 = copy(l)
print l1==l
Function GenerateFirmwareImage
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def GenerateFirmwareImage(Output, Input, Type="efi", SubType=None, Zero=False,
Function Insert
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def Insert(self, CName, TokenSpaceGuidCName, Token, DatumType, Model, BelongsToFile, BelongsToFunction, StartLine, StartColumn, EndLine, EndColumn):
Function GetStringFiles
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetStringFiles(UniFilList, SourceFileList, IncludeList, IncludePathList, SkipList, BaseName, IsCompatibleMode = False, ShellMode = False, UniGenCFlag = True, UniGenBinBuffer = None, FilterInfo = [True, []]):
Function Insert
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def Insert(self, Modifier, Type, Name, Value, Model, BelongsToFile, BelongsToFunction, StartLine, StartColumn, EndLine, EndColumn):
Function __init__
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, CommandLineOption=True, IsInit=True, SourceFileList=None, \
Function __init__
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, db, name, x, y, w, h, attr, title, first, default, cancel):