Showing 9,525 of 13,510 total issues
Function putrequest
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0):
"""Send a request to the server.
`method' specifies an HTTP request method, e.g. 'GET'.
`url' specifies the object being requested, e.g. '/index.html'.
- 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 __init__
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, fp=None, headers=None, outerboundary="",
environ=os.environ, keep_blank_values=0, strict_parsing=0):
"""Constructor. Read multipart/* until last part.
Arguments, all optional:
- 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 include
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def include(elem, loader=None):
if loader is None:
loader = default_loader
# look for xinclude elements
i = 0
- 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_extensions_list
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def check_extensions_list(self, extensions):
"""Ensure that the list of extensions (presumably provided as a
command option 'extensions') is valid, i.e. it is a list of
Extension objects. We also support the old-style list of 2-tuples,
where the tuples are (ext_name, build_info), which are converted 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 putrequest
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0):
"""Send a request to the server.
`method' specifies an HTTP request method, e.g. 'GET'.
`url' specifies the object being requested, e.g. '/index.html'.
- 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 __init__
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, fp=None, headers=None, outerboundary="",
environ=os.environ, keep_blank_values=0, strict_parsing=0):
"""Constructor. Read multipart/* until last part.
Arguments, all optional:
- 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 include
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def include(elem, loader=None):
if loader is None:
loader = default_loader
# look for xinclude elements
i = 0
- 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_extensions_list
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
def check_extensions_list(self, extensions):
"""Ensure that the list of extensions (presumably provided as a
command option 'extensions') is valid, i.e. it is a list of
Extension objects. We also support the old-style list of 2-tuples,
where the tuples are (ext_name, build_info), which are converted 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 BuildExDataBase
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
def BuildExDataBase(Dict):
# init Db items
InitValueUint64 = Dict['INIT_DB_VALUE_UINT64']
DbInitValueUint64 = DbComItemList(8, RawDataList = InitValueUint64)
VardefValueUint64 = Dict['VARDEF_DB_VALUE_UINT64']
File CodeFragmentCollector.py
has 376 lines of code (exceeds 250 allowed). Consider refactoring. Open
## @file
# preprocess source file
#
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
Consider simplifying this complex logical expression. Open
if LA90 == IDENTIFIER:
LA90_233 = self.input.LA(3)
if (self.synpred182()) :
alt90 = 1
Consider simplifying this complex logical expression. Open
if LA95 == IDENTIFIER:
LA95_235 = self.input.LA(3)
if (self.synpred188()) :
alt95 = 1
Consider simplifying this complex logical expression. Open
if LA95 == IDENTIFIER:
LA95_235 = self.input.LA(3)
if (self.synpred188()) :
alt95 = 1
Consider simplifying this complex logical expression. Open
if LA90 == IDENTIFIER:
LA90_233 = self.input.LA(3)
if (self.synpred182()) :
alt90 = 1
OptionParser
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
class OptionParser (OptionContainer):
"""
Class attributes:
standard_option_list : [Option]
FTP
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
class FTP:
'''An FTP client class.
To create a connection, call the class using these arguments:
File chipsec_main.py
has 375 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/local/bin/python
#CHIPSEC: Platform Security Assessment Framework
#Copyright (c) 2010-2014, Intel Corporation
#
#This program is free software; you can redistribute it and/or
OptionParser
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
class OptionParser (OptionContainer):
"""
Class attributes:
standard_option_list : [Option]
FTP
has 38 functions (exceeds 20 allowed). Consider refactoring. Open
class FTP:
'''An FTP client class.
To create a connection, call the class using these arguments:
File plistlib.py
has 374 lines of code (exceeds 250 allowed). Consider refactoring. Open
r"""plistlib.py -- a tool to generate and parse MacOSX .plist files.
The PropertyList (.plist) file format is a simple XML pickle supporting
basic object types, like dictionaries, lists, numbers and strings.
Usually the top level object is a dictionary.