rosedu/wouso

View on GitHub
wouso/utils/add_users_force.py

Summary

Maintainability
F
1 wk
Test Coverage

Function try_using_cookie has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
Open

def try_using_cookie(username, first_name, last_name, email, password, cookie):
    (username, ret) = try_using_cookie_no_recurse(username, first_name, last_name, email, password, cookie)

    if ret == OP_SUCCESS:
        return (username, True)
Severity: Minor
Found in wouso/utils/add_users_force.py - About 5 hrs 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 try_using_truncate has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

def try_using_truncate(username, first_name, last_name, email, password, cookie):
    (username, ret) = try_using_truncate_no_recurse(username, first_name, last_name, email, password)

    if ret == OP_SUCCESS:
        return (username, True)
Severity: Minor
Found in wouso/utils/add_users_force.py - About 2 hrs 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 try_using_cookie_no_recurse has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

def try_using_cookie_no_recurse(username, first_name, last_name, email, password, cookie):
Severity: Minor
Found in wouso/utils/add_users_force.py - About 45 mins to fix

    Function add_user_no_matter_what has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def add_user_no_matter_what(username, first_name, last_name, email, password, cookie):
    Severity: Minor
    Found in wouso/utils/add_users_force.py - About 45 mins to fix

      Function try_using_cookie has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def try_using_cookie(username, first_name, last_name, email, password, cookie):
      Severity: Minor
      Found in wouso/utils/add_users_force.py - About 45 mins to fix

        Function try_using_truncate has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def try_using_truncate(username, first_name, last_name, email, password, cookie):
        Severity: Minor
        Found in wouso/utils/add_users_force.py - About 45 mins to fix

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

          def add_user_helper(username, first_name, last_name, email, password):
          Severity: Minor
          Found in wouso/utils/add_users_force.py - About 35 mins to fix

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

            def try_using_index_no_recurse(username, first_name, last_name, email, password):
            Severity: Minor
            Found in wouso/utils/add_users_force.py - About 35 mins to fix

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

              def try_using_truncate_no_recurse(username, first_name, last_name, email, password):
              Severity: Minor
              Found in wouso/utils/add_users_force.py - About 35 mins to fix

                Avoid too many return statements within this function.
                Open

                    return (None, False)
                Severity: Major
                Found in wouso/utils/add_users_force.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return (username, False)
                  Severity: Major
                  Found in wouso/utils/add_users_force.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return (username, False)
                    Severity: Major
                    Found in wouso/utils/add_users_force.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                          return (username, True)
                      Severity: Major
                      Found in wouso/utils/add_users_force.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return (username, False)
                        Severity: Major
                        Found in wouso/utils/add_users_force.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return (None, False)
                          Severity: Major
                          Found in wouso/utils/add_users_force.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return (username, False)
                            Severity: Major
                            Found in wouso/utils/add_users_force.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                              return (username, True)
                              Severity: Major
                              Found in wouso/utils/add_users_force.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return (username, True)
                                Severity: Major
                                Found in wouso/utils/add_users_force.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                                  return (username, True)
                                  Severity: Major
                                  Found in wouso/utils/add_users_force.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                    return (username, False)
                                    Severity: Major
                                    Found in wouso/utils/add_users_force.py - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                  return (username, False)
                                      Severity: Major
                                      Found in wouso/utils/add_users_force.py - About 30 mins to fix

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

                                        def main():
                                            if len(sys.argv) != 2:
                                                print 'Usage: python add_users.py <file.csv>'
                                                print " CSV columns: username, first name, last name, email, password, cookie"
                                                sys.exit(1)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.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

                                        Similar blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                        def try_using_cookie(username, first_name, last_name, email, password, cookie):
                                            (username, ret) = try_using_cookie_no_recurse(username, first_name, last_name, email, password, cookie)
                                        
                                            if ret == OP_SUCCESS:
                                                return (username, True)
                                        Severity: Major
                                        Found in wouso/utils/add_users_force.py and 1 other location - About 4 days to fix
                                        wouso/utils/add_users_force_to_race.py on lines 79..128

                                        Duplicated Code

                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                        Tuning

                                        This issue has a mass of 418.

                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                        Refactorings

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                        def try_using_truncate(username, first_name, last_name, email, password, cookie):
                                            (username, ret) = try_using_truncate_no_recurse(username, first_name, last_name, email, password)
                                        
                                            if ret == OP_SUCCESS:
                                                return (username, True)
                                        Severity: Major
                                        Found in wouso/utils/add_users_force.py and 1 other location - About 2 days to fix
                                        wouso/utils/add_users_force_to_race.py on lines 41..76

                                        Duplicated Code

                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                        Tuning

                                        This issue has a mass of 281.

                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                        Refactorings

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                        def try_using_index_no_recurse(username, first_name, last_name, email, password):
                                            ret = OP_EXISTS
                                            for i in range(1,100):
                                                _username = username+"%d" %(i)
                                                ret = add_user_helper(_username, first_name, last_name, email, password)
                                        Severity: Major
                                        Found in wouso/utils/add_users_force.py and 1 other location - About 6 hrs to fix
                                        wouso/utils/add_users_force_to_race.py on lines 14..24

                                        Duplicated Code

                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                        Tuning

                                        This issue has a mass of 107.

                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                        Refactorings

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                        def add_user_no_matter_what(username, first_name, last_name, email, password, cookie):
                                            _ret = add_user_helper(username, first_name, last_name, email, password)
                                        
                                            # Assume everything went OK.
                                            ret = True
                                        Severity: Major
                                        Found in wouso/utils/add_users_force.py and 1 other location - About 6 hrs to fix
                                        wouso/utils/add_users_force_to_race.py on lines 149..166

                                        Duplicated Code

                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                        Tuning

                                        This issue has a mass of 103.

                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                        Refactorings

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                        def add_user_helper(username, first_name, last_name, email, password):
                                            """Helper function for adding user. Return value states wether operation
                                            completed successfully, and exception was encountered or use already
                                            existed.
                                            """
                                        Severity: Major
                                        Found in wouso/utils/add_users_force.py and 1 other location - About 5 hrs to fix
                                        wouso/utils/add_users_force_to_race.py on lines 131..146

                                        Duplicated Code

                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                        Tuning

                                        This issue has a mass of 92.

                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                        Refactorings

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                        def truncate_username(username):
                                            parts = username.split('.')
                                            if len(parts) != 2:
                                                print >>sys.stderr, "Username %s should consist of two parts."
                                                return
                                        Severity: Major
                                        Found in wouso/utils/add_users_force.py and 1 other location - About 3 hrs to fix
                                        wouso/utils/add_users_force_to_race.py on lines 26..31

                                        Duplicated Code

                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                        Tuning

                                        This issue has a mass of 68.

                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                        Refactorings

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                        def try_using_cookie_no_recurse(username, first_name, last_name, email, password, cookie):
                                            username = username+cookie
                                            return (username, add_user_helper(username, first_name, last_name, email, password))
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py and 1 other location - About 50 mins to fix
                                        wouso/utils/add_users_force_to_race.py on lines 37..39

                                        Duplicated Code

                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                        Tuning

                                        This issue has a mass of 36.

                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                        Refactorings

                                        Further Reading

                                        Identical blocks of code found in 2 locations. Consider refactoring.
                                        Open

                                        def try_using_truncate_no_recurse(username, first_name, last_name, email, password):
                                            username = truncate_username(username)
                                            return (username, add_user_helper(username, first_name, last_name, email, password))
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py and 1 other location - About 35 mins to fix
                                        wouso/utils/add_users_force_to_race.py on lines 33..35

                                        Duplicated Code

                                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                        Tuning

                                        This issue has a mass of 33.

                                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                        Refactorings

                                        Further Reading

                                        Missing whitespace after ','
                                        Open

                                            for i in range(1,100):
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Each comma, semicolon or colon should be followed by whitespace.

                                        Okay: [a, b]
                                        Okay: (3,)
                                        Okay: a[1:4]
                                        Okay: a[:4]
                                        Okay: a[1:]
                                        Okay: a[1:4:2]
                                        E231: ['a','b']
                                        E231: foo(bar,baz)
                                        E231: [{'a':'b'}]

                                        Missing whitespace around operator
                                        Open

                                                print "h: Successfully added user %s." %(username)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Surround operators with a single space on either side.

                                        - Always surround these binary operators with a single space on
                                          either side: assignment (=), augmented assignment (+=, -= etc.),
                                          comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
                                          Booleans (and, or, not).
                                        
                                        - If operators with different priorities are used, consider adding
                                          whitespace around the operators with the lowest priorities.
                                        
                                        Okay: i = i + 1
                                        Okay: submitted += 1
                                        Okay: x = x * 2 - 1
                                        Okay: hypot2 = x * x + y * y
                                        Okay: c = (a + b) * (a - b)
                                        Okay: foo(bar, key='word', *args, **kwargs)
                                        Okay: alpha[:-i]
                                        
                                        E225: i=i+1
                                        E225: submitted +=1
                                        E225: x = x /2 - 1
                                        E225: z = x **y
                                        E225: z = 1and 1
                                        E226: c = (a+b) * (a-b)
                                        E226: hypot2 = x*x + y*y
                                        E227: c = a|b
                                        E228: msg = fmt%(errno, errmsg)

                                        Line too long (106 > 100 characters)
                                        Open

                                                    (username, ret) = try_using_index_no_recurse(username, first_name, last_name, email, password)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Line too long (105 > 100 characters)
                                        Open

                                                (username, ret) = try_using_truncate_no_recurse(username, first_name, last_name, email, password)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Missing whitespace around operator
                                        Open

                                                    print "Failed adding user %s. Nothing worked." %(username)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Surround operators with a single space on either side.

                                        - Always surround these binary operators with a single space on
                                          either side: assignment (=), augmented assignment (+=, -= etc.),
                                          comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
                                          Booleans (and, or, not).
                                        
                                        - If operators with different priorities are used, consider adding
                                          whitespace around the operators with the lowest priorities.
                                        
                                        Okay: i = i + 1
                                        Okay: submitted += 1
                                        Okay: x = x * 2 - 1
                                        Okay: hypot2 = x * x + y * y
                                        Okay: c = (a + b) * (a - b)
                                        Okay: foo(bar, key='word', *args, **kwargs)
                                        Okay: alpha[:-i]
                                        
                                        E225: i=i+1
                                        E225: submitted +=1
                                        E225: x = x /2 - 1
                                        E225: z = x **y
                                        E225: z = 1and 1
                                        E226: c = (a+b) * (a-b)
                                        E226: hypot2 = x*x + y*y
                                        E227: c = a|b
                                        E228: msg = fmt%(errno, errmsg)

                                        Line too long (106 > 100 characters)
                                        Open

                                                    (username, ret) = try_using_index_no_recurse(username, first_name, last_name, email, password)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Expected 2 blank lines, found 1
                                        Open

                                        def try_using_truncate_no_recurse(username, first_name, last_name, email, password):
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Separate top-level function and class definitions with two blank lines.

                                        Method definitions inside a class are separated by a single blank
                                        line.
                                        
                                        Extra blank lines may be used (sparingly) to separate groups of
                                        related functions.  Blank lines may be omitted between a bunch of
                                        related one-liners (e.g. a set of dummy implementations).
                                        
                                        Use blank lines in functions, sparingly, to indicate logical
                                        sections.
                                        
                                        Okay: def a():\n    pass\n\n\ndef b():\n    pass
                                        Okay: def a():\n    pass\n\n\nasync def b():\n    pass
                                        Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
                                        Okay: default = 1\nfoo = 1
                                        Okay: classify = 1\nfoo = 1
                                        
                                        E301: class Foo:\n    b = 0\n    def bar():\n        pass
                                        E302: def a():\n    pass\n\ndef b(n):\n    pass
                                        E302: def a():\n    pass\n\nasync def b(n):\n    pass
                                        E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
                                        E303: def a():\n\n\n\n    pass
                                        E304: @decorator\n\ndef a():\n    pass
                                        E305: def a():\n    pass\na()
                                        E306: def a():\n    def b():\n        pass\n    def c():\n        pass

                                        Line too long (115 > 100 characters)
                                        Open

                                                (new_username, ret) = try_using_cookie_no_recurse(username, first_name, last_name, email, password, cookie)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Line too long (106 > 100 characters)
                                        Open

                                                    (username, ret) = try_using_index_no_recurse(username, first_name, last_name, email, password)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Expected 2 blank lines, found 1
                                        Open

                                        def try_using_cookie_no_recurse(username, first_name, last_name, email, password, cookie):
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Separate top-level function and class definitions with two blank lines.

                                        Method definitions inside a class are separated by a single blank
                                        line.
                                        
                                        Extra blank lines may be used (sparingly) to separate groups of
                                        related functions.  Blank lines may be omitted between a bunch of
                                        related one-liners (e.g. a set of dummy implementations).
                                        
                                        Use blank lines in functions, sparingly, to indicate logical
                                        sections.
                                        
                                        Okay: def a():\n    pass\n\n\ndef b():\n    pass
                                        Okay: def a():\n    pass\n\n\nasync def b():\n    pass
                                        Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
                                        Okay: default = 1\nfoo = 1
                                        Okay: classify = 1\nfoo = 1
                                        
                                        E301: class Foo:\n    b = 0\n    def bar():\n        pass
                                        E302: def a():\n    pass\n\ndef b(n):\n    pass
                                        E302: def a():\n    pass\n\nasync def b(n):\n    pass
                                        E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
                                        E303: def a():\n\n\n\n    pass
                                        E304: @decorator\n\ndef a():\n    pass
                                        E305: def a():\n    pass\na()
                                        E306: def a():\n    def b():\n        pass\n    def c():\n        pass

                                        Expected 2 blank lines, found 1
                                        Open

                                        def try_using_truncate(username, first_name, last_name, email, password, cookie):
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Separate top-level function and class definitions with two blank lines.

                                        Method definitions inside a class are separated by a single blank
                                        line.
                                        
                                        Extra blank lines may be used (sparingly) to separate groups of
                                        related functions.  Blank lines may be omitted between a bunch of
                                        related one-liners (e.g. a set of dummy implementations).
                                        
                                        Use blank lines in functions, sparingly, to indicate logical
                                        sections.
                                        
                                        Okay: def a():\n    pass\n\n\ndef b():\n    pass
                                        Okay: def a():\n    pass\n\n\nasync def b():\n    pass
                                        Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
                                        Okay: default = 1\nfoo = 1
                                        Okay: classify = 1\nfoo = 1
                                        
                                        E301: class Foo:\n    b = 0\n    def bar():\n        pass
                                        E302: def a():\n    pass\n\ndef b(n):\n    pass
                                        E302: def a():\n    pass\n\nasync def b(n):\n    pass
                                        E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
                                        E303: def a():\n\n\n\n    pass
                                        E304: @decorator\n\ndef a():\n    pass
                                        E305: def a():\n    pass\na()
                                        E306: def a():\n    def b():\n        pass\n    def c():\n        pass

                                        Line too long (101 > 100 characters)
                                        Open

                                            (username, ret) = try_using_truncate_no_recurse(username, first_name, last_name, email, password)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Line too long (107 > 100 characters)
                                        Open

                                            (username, ret) = try_using_cookie_no_recurse(username, first_name, last_name, email, password, cookie)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Line too long (109 > 100 characters)
                                        Open

                                                    (username, ret) = try_using_truncate_no_recurse(username, first_name, last_name, email, password)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Line too long (102 > 100 characters)
                                        Open

                                                (username, ret) = try_using_truncate(username, first_name, last_name, email, password, cookie)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Line too long (108 > 100 characters)
                                        Open

                                                (_username, ret) = add_user_no_matter_what(username, first_name, last_name, email, password, cookie)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Line too long (110 > 100 characters)
                                        Open

                                                        (username, ret) = try_using_index_no_recurse(username, first_name, last_name, email, password)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Missing whitespace around operator
                                        Open

                                                print "h: Exception when adding %s." %(username)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Surround operators with a single space on either side.

                                        - Always surround these binary operators with a single space on
                                          either side: assignment (=), augmented assignment (+=, -= etc.),
                                          comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
                                          Booleans (and, or, not).
                                        
                                        - If operators with different priorities are used, consider adding
                                          whitespace around the operators with the lowest priorities.
                                        
                                        Okay: i = i + 1
                                        Okay: submitted += 1
                                        Okay: x = x * 2 - 1
                                        Okay: hypot2 = x * x + y * y
                                        Okay: c = (a + b) * (a - b)
                                        Okay: foo(bar, key='word', *args, **kwargs)
                                        Okay: alpha[:-i]
                                        
                                        E225: i=i+1
                                        E225: submitted +=1
                                        E225: x = x /2 - 1
                                        E225: z = x **y
                                        E225: z = 1and 1
                                        E226: c = (a+b) * (a-b)
                                        E226: hypot2 = x*x + y*y
                                        E227: c = a|b
                                        E228: msg = fmt%(errno, errmsg)

                                        Line too long (106 > 100 characters)
                                        Open

                                                (new_username, ret) = try_using_index_no_recurse(username, first_name, last_name, email, password)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Line too long (135 > 100 characters)
                                        Open

                                                ret = wouso.utils.user_util.add_user(username, first_name, last_name, email, password, is_active=1, is_staff=0, is_superuser=0)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Limit all lines to a maximum of 79 characters.

                                        There are still many devices around that are limited to 80 character
                                        lines; plus, limiting windows to 80 characters makes it possible to
                                        have several windows side-by-side.  The default wrapping on such
                                        devices looks ugly.  Therefore, please limit all lines to a maximum
                                        of 79 characters. For flowing long blocks of text (docstrings or
                                        comments), limiting the length to 72 characters is recommended.
                                        
                                        Reports error E501.

                                        Missing whitespace around operator
                                        Open

                                                    print "Successfully added user %s." %(_username)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Surround operators with a single space on either side.

                                        - Always surround these binary operators with a single space on
                                          either side: assignment (=), augmented assignment (+=, -= etc.),
                                          comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
                                          Booleans (and, or, not).
                                        
                                        - If operators with different priorities are used, consider adding
                                          whitespace around the operators with the lowest priorities.
                                        
                                        Okay: i = i + 1
                                        Okay: submitted += 1
                                        Okay: x = x * 2 - 1
                                        Okay: hypot2 = x * x + y * y
                                        Okay: c = (a + b) * (a - b)
                                        Okay: foo(bar, key='word', *args, **kwargs)
                                        Okay: alpha[:-i]
                                        
                                        E225: i=i+1
                                        E225: submitted +=1
                                        E225: x = x /2 - 1
                                        E225: z = x **y
                                        E225: z = 1and 1
                                        E226: c = (a+b) * (a-b)
                                        E226: hypot2 = x*x + y*y
                                        E227: c = a|b
                                        E228: msg = fmt%(errno, errmsg)

                                        Expected 2 blank lines, found 1
                                        Open

                                        def truncate_username(username):
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Separate top-level function and class definitions with two blank lines.

                                        Method definitions inside a class are separated by a single blank
                                        line.
                                        
                                        Extra blank lines may be used (sparingly) to separate groups of
                                        related functions.  Blank lines may be omitted between a bunch of
                                        related one-liners (e.g. a set of dummy implementations).
                                        
                                        Use blank lines in functions, sparingly, to indicate logical
                                        sections.
                                        
                                        Okay: def a():\n    pass\n\n\ndef b():\n    pass
                                        Okay: def a():\n    pass\n\n\nasync def b():\n    pass
                                        Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
                                        Okay: default = 1\nfoo = 1
                                        Okay: classify = 1\nfoo = 1
                                        
                                        E301: class Foo:\n    b = 0\n    def bar():\n        pass
                                        E302: def a():\n    pass\n\ndef b(n):\n    pass
                                        E302: def a():\n    pass\n\nasync def b(n):\n    pass
                                        E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
                                        E303: def a():\n\n\n\n    pass
                                        E304: @decorator\n\ndef a():\n    pass
                                        E305: def a():\n    pass\na()
                                        E306: def a():\n    def b():\n        pass\n    def c():\n        pass

                                        Missing whitespace around operator
                                        Open

                                                print "h: Failed adding user %s. User already exists." %(username)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Surround operators with a single space on either side.

                                        - Always surround these binary operators with a single space on
                                          either side: assignment (=), augmented assignment (+=, -= etc.),
                                          comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
                                          Booleans (and, or, not).
                                        
                                        - If operators with different priorities are used, consider adding
                                          whitespace around the operators with the lowest priorities.
                                        
                                        Okay: i = i + 1
                                        Okay: submitted += 1
                                        Okay: x = x * 2 - 1
                                        Okay: hypot2 = x * x + y * y
                                        Okay: c = (a + b) * (a - b)
                                        Okay: foo(bar, key='word', *args, **kwargs)
                                        Okay: alpha[:-i]
                                        
                                        E225: i=i+1
                                        E225: submitted +=1
                                        E225: x = x /2 - 1
                                        E225: z = x **y
                                        E225: z = 1and 1
                                        E226: c = (a+b) * (a-b)
                                        E226: hypot2 = x*x + y*y
                                        E227: c = a|b
                                        E228: msg = fmt%(errno, errmsg)

                                        Missing whitespace around operator
                                        Open

                                                _username = username+"%d" %(i)
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Surround operators with a single space on either side.

                                        - Always surround these binary operators with a single space on
                                          either side: assignment (=), augmented assignment (+=, -= etc.),
                                          comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
                                          Booleans (and, or, not).
                                        
                                        - If operators with different priorities are used, consider adding
                                          whitespace around the operators with the lowest priorities.
                                        
                                        Okay: i = i + 1
                                        Okay: submitted += 1
                                        Okay: x = x * 2 - 1
                                        Okay: hypot2 = x * x + y * y
                                        Okay: c = (a + b) * (a - b)
                                        Okay: foo(bar, key='word', *args, **kwargs)
                                        Okay: alpha[:-i]
                                        
                                        E225: i=i+1
                                        E225: submitted +=1
                                        E225: x = x /2 - 1
                                        E225: z = x **y
                                        E225: z = 1and 1
                                        E226: c = (a+b) * (a-b)
                                        E226: hypot2 = x*x + y*y
                                        E227: c = a|b
                                        E228: msg = fmt%(errno, errmsg)

                                        Expected 2 blank lines, found 1
                                        Open

                                        def try_using_index_no_recurse(username, first_name, last_name, email, password):
                                        Severity: Minor
                                        Found in wouso/utils/add_users_force.py by pep8

                                        Separate top-level function and class definitions with two blank lines.

                                        Method definitions inside a class are separated by a single blank
                                        line.
                                        
                                        Extra blank lines may be used (sparingly) to separate groups of
                                        related functions.  Blank lines may be omitted between a bunch of
                                        related one-liners (e.g. a set of dummy implementations).
                                        
                                        Use blank lines in functions, sparingly, to indicate logical
                                        sections.
                                        
                                        Okay: def a():\n    pass\n\n\ndef b():\n    pass
                                        Okay: def a():\n    pass\n\n\nasync def b():\n    pass
                                        Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
                                        Okay: default = 1\nfoo = 1
                                        Okay: classify = 1\nfoo = 1
                                        
                                        E301: class Foo:\n    b = 0\n    def bar():\n        pass
                                        E302: def a():\n    pass\n\ndef b(n):\n    pass
                                        E302: def a():\n    pass\n\nasync def b(n):\n    pass
                                        E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
                                        E303: def a():\n\n\n\n    pass
                                        E304: @decorator\n\ndef a():\n    pass
                                        E305: def a():\n    pass\na()
                                        E306: def a():\n    def b():\n        pass\n    def c():\n        pass

                                        There are no issues that match your filters.

                                        Category
                                        Status