Showing 9,525 of 13,510 total issues
Function what
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def what(file, h=None):
if h is None:
if isinstance(file, basestring):
f = open(file, 'rb')
h = f.read(32)
- 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 retrlines
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def retrlines(self, cmd, callback = None):
"""Retrieve data in line mode. A new port is created for you.
Args:
cmd: A RETR, LIST, NLST, or MLSD command.
- 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 parse257
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def parse257(resp):
'''Parse the '257' response for a MKD or PWD request.
This is a response to a MKD or PWD request: a directory name.
Returns the directoryname in the 257 reply.'''
- 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 InsertSectionItemsIntoDatabase
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def InsertSectionItemsIntoDatabase(self, FileID, Filename, CurrentSection, SectionItemList, ArchList, ThirdList, IfDefList):
Function ValidFile3
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def ValidFile3(AllFiles, File, Workspace='', EfiSource='', EdkSource='', Dir='.', OverrideDir=''):
Function error
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def error(ToolName, ErrorCode, Message=None, File=None, Line=None, ExtraData=None, RaiseError=IsRaiseError):
Function GenBinaryData
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def GenBinaryData(BinaryData, BinaryObj, BinariesDict, AsBuildIns, BinaryFileObjectList, SupArchList, BinaryModule):
Function Error
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def Error(ToolName, ErrorCode, Message=None, File=None, Line=None, \
Function ObjectFactory
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def ObjectFactory(self, ItemType, TSCName, CName, DValue, FFE, Usage, Str):
Function GetPackageList
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def GetPackageList(DistPkg, Dep, WorkspaceDir, Options, ContentZipFile, ModuleList, PackageList):
Function ParseDefine
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def ParseDefine(LineValue, StartLine, Table, FileID, SectionName, \
Function AddToBuffer
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def AddToBuffer(self, Buffer, BaseAddress, BlockSizeList, ErasePolarity, ImageBinDict, vtfDict = None, MacroDict = {}):
Function GenerateFfs
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def GenerateFfs(Output, Input, Type, Guid, Fixed=False, CheckSum=False, Align=None,
Function GenerateOptionRom
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def GenerateOptionRom(Output, EfiInput, BinaryInput, Compress=False, ClassCode=None,
Function AddToBuffer
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def AddToBuffer (self, Buffer, BaseAddress=None, BlockSize= None, BlockNum=None, ErasePloarity='1', VtfDict=None, MacroDict = {}) :
Function __new__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __new__(Class, Workspace, MetaFile, Target, Toolchain, Arch, *args, **kwargs):
Function AddStringToList
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def AddStringToList(self, Name, Language, Value, Token = None, Referenced = False, UseOtherLangDef = '', Index = -1):
Function docother
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def docother(self, object, name=None, mod=None, parent=None, maxlen=None, doc=None):
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, dir, name, topname, title, next, prev, up):
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, name, prefix = None,