mrDoctorWho/vk4xmpp

View on GitHub

Showing 283 of 283 total issues

Function chatMessage has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def chatMessage(chat, text, jidFrom, subj=None, timestamp=0):
Severity: Minor
Found in extensions/groupchats.py - About 35 mins to fix

    Function UnregisterHandler has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def UnregisterHandler(self, name, handler, typ="", ns="", xmlns=None):
    Severity: Minor
    Found in library/xmpp/dispatcher.py - About 35 mins to fix

      Function setAffiliation has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def setAffiliation(chat, afl, jid, jidFrom=TransportID, reason=None):
      Severity: Minor
      Found in extensions/groupchats.py - About 35 mins to fix

        Function setField has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def setField(self, name, value=None, typ=None, desc=None, options=[]):
        Severity: Minor
        Found in library/xmpp/protocol.py - About 35 mins to fix

          Function setChatConfig has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def setChatConfig(chat, jidFrom, exterminate=False, cb=None, args={}):
          Severity: Minor
          Found in extensions/groupchats.py - About 35 mins to fix

            Function addChild has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def addChild(self, name=None, attrs={}, payload=[], namespace=None, node=None):
            Severity: Minor
            Found in library/xmpp/simplexml.py - About 35 mins to fix

              Function show has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def show(self, msg, flag=None, prefix=None, sufix=None, lf=0):
              Severity: Minor
              Found in library/xmpp/debug.py - About 35 mins to fix

                Function setField has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def setField(self, name, value=None, typ=None, desc=None, options=[]):
                Severity: Minor
                Found in library/xmpp/protocol.py - About 35 mins to fix

                  Function setField has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def setField(self, name, typ=None, label=None, desc=None, options=[]):
                  Severity: Minor
                  Found in library/xmpp/protocol.py - About 35 mins to fix

                    Function sendMessages has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def sendMessages(self, init=False, messages=None, mid=0, uid=0, filter_="unread"):
                    Severity: Minor
                    Found in gateway.py - About 35 mins to fix

                      Function buildDataForm has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def buildDataForm(form=None, type="form", fields=[], title=None, data=[]):
                      Severity: Minor
                      Found in library/utils.py - About 35 mins to fix

                        Function parseXHTML has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def parseXHTML(user, html, source, destination, mType="user_id"):
                        Severity: Minor
                        Found in modules/mod_xhtml.py - About 35 mins to fix

                          Function sendPhoto has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def sendPhoto(user, data, type, address, mType):
                          Severity: Minor
                          Found in modules/mod_xhtml.py - About 35 mins to fix

                            Function sendMessage has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def sendMessage(self, body, id, mType="user_id", more={}, mid=0):
                            Severity: Minor
                            Found in gateway.py - About 35 mins to fix

                              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/"
                              Severity: Minor
                              Found in library/vkapi.py - About 35 mins to fix

                              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 parseReplyMessages has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def parseReplyMessages(self, msg):
                                  body = ""
                                  result = (MSG_APPEND, "")
                                  if msg.get("reply_message"):
                                      # todo: add date if the message wasn't sent today
                              Severity: Minor
                              Found in extensions/reply.py - About 35 mins to fix

                              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 getUserObject has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def getUserObject(source):
                                      """
                                      Gets user object by chat jid
                                      """
                                      user = None
                              Severity: Minor
                              Found in extensions/groupchats.py - About 35 mins to fix

                              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 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.
                                      """
                              Severity: Minor
                              Found in library/xmpp/filetransfer.py - About 35 mins to fix

                              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 getPrivacyLists has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def getPrivacyLists(disp):
                                  """
                                  Requests privacy lists from connected server.
                                  Returns dictionary of existing lists on success.
                                  """
                              Severity: Minor
                              Found in library/xmpp/features.py - About 35 mins to fix

                              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 FeaturesHandler has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def FeaturesHandler(self, conn, feats):
                                      """
                                      Used to determine if server supports SASL auth. Used internally.
                                      """
                                      if not feats.getTag("mechanisms", namespace=NS_SASL):
                              Severity: Minor
                              Found in library/xmpp/auth.py - About 35 mins to fix

                              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

                              Severity
                              Category
                              Status
                              Source
                              Language