plugins/PS3/__init__.py
File __init__.py
has 521 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
README = """\
<u><b>1) Bluetooth</b></u>
Tested succesfully working with Bluetooth Software :
WIDCOMM Bluetooth Software 5.1.0.1100.
Function RawCallback
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
Open
def RawCallback(self, data):
#hexdata= binascii.hexlify(data).upper()
#eg.PrintNotice( hexdata )
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 Configure
has 26 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def Configure(self,
Function GetLabel
has 21 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def GetLabel(self,
Function __start__
has 21 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __start__(self,
Function Configure
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def Configure(self,
eventName = "",
enduringEvents = True,
rawDataEvents = False, # no longer used
ps3DataEvents = False, # no longer used
Function Configure
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
def Configure(self,
eventName = "",
enduringEvents = True,
rawDataEvents = False, # no longer used
ps3DataEvents = False, # no longer used
- 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
Avoid deeply nested control flow statements. Open
Open
if( bit not in self.PS3Remote.maskbit ):
PS3ParseError( 'Mask', 'various', bin(mask) )
btnPressed.append( self.PS3Remote.maskbit[bit] )