Showing 283 of 283 total issues
Function setChatConfig
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def setChatConfig(chat, jidFrom, exterminate=False, cb=None, args={}):
Function UnregisterHandler
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def UnregisterHandler(self, name, handler, typ="", ns="", xmlns=None):
Function show
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def show(self, msg, flag=None, prefix=None, sufix=None, lf=0):
Function addChild
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def addChild(self, name=None, attrs={}, payload=[], namespace=None, node=None):
Function setField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def setField(self, name, value=None, typ=None, desc=None, options=[]):
Function chatMessage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def chatMessage(chat, text, jidFrom, subj=None, timestamp=0):
Function setField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def setField(self, name, typ=None, label=None, desc=None, options=[]):
Function setField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def setField(self, name, value=None, typ=None, desc=None, options=[]):
Function setAffiliation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def setAffiliation(chat, afl, jid, jidFrom=TransportID, reason=None):
Function parseXHTML
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def parseXHTML(user, html, source, destination, mType="user_id"):
Function sendMessage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def sendMessage(self, body, id, mType="user_id", more={}, mid=0):
Function sendMessages
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def sendMessages(self, init=False, messages=None, mid=0, uid=0, filter_="unread"):
Function sendPhoto
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def sendPhoto(user, data, type, address, mType):
Function buildDataForm
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def buildDataForm(form=None, type="form", fields=[], title=None, data=[]):
Function StreamBrokenHandler
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def StreamBrokenHandler(self, conn, stanza):
"""
Handle stream closure due to all some error while receiving data.
Raise xmpppy event specifying unsuccessfull data receive.
"""
- 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 login
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def login(self):
"""
Logging in using password
"""
url = "https://login.vk.com/"
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, node=None):
"""
Create new empty data item. However, note that, according XEP-0004, DataItem MUST contain ALL
DataFields described in DataReported.
Alternatively other XML object can be passed in as the "node" parameted to replicate it as a new
- 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 parseForwardedMessages
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def parseForwardedMessages(self, msg, depth=0):
body = ""
result = (MSG_APPEND, "")
if msg.get("fwd_messages"):
spacer = BASE_SPACER * depth
- 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 getCDATA
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def getCDATA(self):
"""
Serialize node, dropping all tags and leaving CDATA intact.
That is effectively kills all formatting, leaving only text were contained in XML.
"""
- 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 Bind
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def Bind(self, domain=None):
"""
Perform binding. Use provided domain name (if not provided).
"""
while self.bound is None and self._owner.Process(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"