AlexMathew/scrapple

View on GitHub

Showing 673 of 673 total issues

Indentation contains tabs
Open

                columns[head] = self.get_tree_tag(selector)
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    
Severity: Minor
Found in scrapple/selectors/xpath.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Trailing whitespace
Open

        is the equivalent of using the Scrapple :ref:`run command <command-run>`. 
Severity: Minor
Found in scrapple/commands/generate.py by pep8

Trailing whitespace is superfluous.

The warning returned varies on whether the line itself is blank,
for easier filtering for those who want to indent their blank lines.

Okay: spam(1)\n#
W291: spam(1) \n#
W293: class Foo(object):\n    \n    bang = 12

Line too long (89 > 79 characters)
Open

                  "exist. Use ``scrapple genconfig``." + Back.RESET + Fore.RESET, sep="")
Severity: Minor
Found in scrapple/commands/generate.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 > 79 characters)
Open

                    for tdh, r in traverse_next(selector, nextx, result, verbosity=self.args['--verbosity']):
Severity: Minor
Found in scrapple/commands/run.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.

Continuation line under-indented for visual indent
Open

                    'w') as f:
Severity: Minor
Found in scrapple/commands/run.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

Continuation line with same indent as next logical line
Open

                    'w') as f:
Severity: Minor
Found in scrapple/commands/run.py by pep8

Continuation lines indentation.

Continuation lines should align wrapped elements either vertically
using Python's implicit line joining inside parentheses, brackets
and braces, or using a hanging indent.

When using a hanging indent these considerations should be applied:
- there should be no arguments on the first line, and
- further indentation should be used to clearly distinguish itself
  as a continuation line.

Okay: a = (\n)
E123: a = (\n    )

Okay: a = (\n    42)
E121: a = (\n   42)
E122: a = (\n42)
E123: a = (\n    42\n    )
E124: a = (24,\n     42\n)
E125: if (\n    b):\n    pass
E126: a = (\n        42)
E127: a = (24,\n      42)
E128: a = (24,\n    42)
E129: if (a or\n    b):\n    pass
E131: a = (\n    42\n 24)

The backslash is redundant between brackets
Open

                with open(os.path.join(os.getcwd(), self.args['<output_filename>'] + '.json'), \
Severity: Minor
Found in scrapple/commands/run.py by pep8

Avoid explicit line join between brackets.

The preferred way of wrapping long lines is by using Python's
implied line continuation inside parentheses, brackets and braces.
Long lines can be broken over multiple lines by wrapping expressions
in parentheses.  These should be used in preference to using a
backslash for line continuation.

E502: aaa = [123, \\n       123]
E502: aaa = ("bbb " \\n       "ccc")

Okay: aaa = [123,\n       123]
Okay: aaa = ("bbb "\n       "ccc")
Okay: aaa = "bbb " \\n    "ccc"
Okay: aaa = 123  # \\

Too many blank lines (2)
Open

    def run_flask(self):
Severity: Minor
Found in scrapple/commands/web.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 (87 > 79 characters)
Open

        the form, it makes a POST request, passing in the form in the request header. \
Severity: Minor
Found in scrapple/commands/web.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 (90 > 79 characters)
Open

        :ref:`utility function <implementation-utils>`, where the form is converted into \
Severity: Minor
Found in scrapple/commands/web.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 (91 > 79 characters)
Open

        Specifies if the script generated is a page scraper or a crawler [default: scraper]
Severity: Minor
Found in scrapple/cmd.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 (104 > 79 characters)
Open

            print(Back.YELLOW + Fore.BLUE + "Loading page ", link.url + Back.RESET + Fore.RESET, end='')
Severity: Minor
Found in scrapple/utils/config.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.

Indentation contains mixed spaces and tabs
Open

        'run': run,
Severity: Minor
Found in scrapple/utils/dynamicdispatch.py by pep8

Never mix tabs and spaces.

The most popular way of indenting Python is with spaces only.  The
second-most popular way is with tabs only.  Code indented with a
mixture of tabs and spaces should be converted to using spaces
exclusively.  When invoking the Python command line interpreter with
the -t option, it issues warnings about code that illegally mixes
tabs and spaces.  When using -tt these warnings become errors.
These options are highly recommended!

Okay: if a == 0:\n    a = 1\n    b = 1
E101: if a == 0:\n        a = 1\n\tb = 1

Indentation contains tabs
Open

    # TODO : Crawler 'next' parameter handling
Severity: Minor
Found in scrapple/utils/form.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

        """
Severity: Minor
Found in scrapple/selectors/css.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Indentation contains tabs
Open

    __selector_type__ = ''
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn

Line too long (92 > 79 characters)
Open

            raise Exception('Ensure that you are connected to the Internet and that the page exists')
Severity: Minor
Found in scrapple/selectors/selector.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.

Trailing whitespace
Open

        :return: A ``XpathSelector``/``CssSelector`` object for every page to be crawled through 
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

Trailing whitespace is superfluous.

The warning returned varies on whether the line itself is blank,
for easier filtering for those who want to indent their blank lines.

Okay: spam(1)\n#
W291: spam(1) \n#
W293: class Foo(object):\n    \n    bang = 12

Indentation contains tabs
Open

        A column extraction is when a set of rows have to be extracted, giving a list of header-value mappings.
Severity: Minor
Found in scrapple/selectors/selector.py by pep8

On new projects, spaces-only are strongly recommended over tabs.

Okay: if True:\n    return
W191: if True:\n\treturn
Severity
Category
Status
Source
Language