peterhudec/authomatic

View on GitHub

Showing 126 of 222 total issues

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

    def create_signature(cls, method, base, params,
Severity: Minor
Found in authomatic/providers/oauth1.py - About 35 mins to fix

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

        def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
    Severity: Minor
    Found in authomatic/six.py - About 35 mins to fix

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

          def popup_html(self, callback_name=None, indent=None,
      Severity: Minor
      Found in authomatic/core.py - About 35 mins to fix

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

            def _log_param(cls, param, value='', last=None,
        Severity: Minor
        Found in authomatic/providers/__init__.py - About 35 mins to fix

          Function any has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def any(self, provider_name):
                  result = authomatic.login(Webapp2Adapter(self), provider_name)
                  if result:
                      apis = []
                      if result.user:
          Severity: Minor
          Found in examples/gae/showcase/main.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 any has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def any(self, provider_name):
          
                  # Log the user in.
                  result = authomatic.login(Webapp2Adapter(self), provider_name)
          
          
          Severity: Minor
          Found in examples/gae/credentials/main.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 login has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def login(self, provider_name):
          
                  result = authomatic.login(Webapp2Adapter(self),
                                            provider_name,
                                            callback=self.callback)
          Severity: Minor
          Found in examples/gae/dev/main.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

          Avoid too many return statements within this function.
          Open

                return el.hide();
          Severity: Major
          Found in examples/gae/showcase/static/js/foundation/foundation.reveal.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return BaseProvider;
            Severity: Major
            Found in javascript/authomatic.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return Oauth2Provider;
              Severity: Major
              Found in examples/gae/showcase/static/js/authomatic.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return WindowsLive;
                Severity: Major
                Found in javascript/authomatic.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return Oauth2Provider;
                  Severity: Major
                  Found in javascript/authomatic.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return BaseProvider;
                    Severity: Major
                    Found in examples/gae/showcase/static/js/authomatic.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return WindowsLive;
                      Severity: Major
                      Found in examples/gae/showcase/static/js/authomatic.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                              return el.show();
                        Severity: Major
                        Found in examples/gae/showcase/static/js/foundation/foundation.reveal.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                return BaseProvider;
                          Severity: Major
                          Found in examples/gae/showcase/static/js/authomatic.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                  return $(this.scope).width() < 768;
                            Severity: Major
                            Found in examples/gae/showcase/static/js/foundation/foundation.section.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                    return BaseProvider;
                              Severity: Major
                              Found in javascript/authomatic.js - About 30 mins to fix

                                Function _x_user_parser has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def _x_user_parser(user, data):
                                        _birth_date = data.get('birthday')
                                        if _birth_date:
                                            try:
                                                user.birth_date = datetime.datetime.strptime(_birth_date,
                                Severity: Minor
                                Found in authomatic/providers/oauth2.py - About 25 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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def __init__(self, handler, session=None, secret=None,
                                                 cookie_name='webapp2authomatic', backend='memcache',
                                                 config=None):
                                        """
                                        .. warning::
                                Severity: Minor
                                Found in authomatic/extras/gae/__init__.py - About 25 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