Commit graph

3 commits

Author SHA1 Message Date
Mathieu Bridon
8097ffce7b runroot: Avoid squashing path components with os.path.join
Although this is often a surprising behaviour, the Python documentation
is quite clear on this:

    If a component is an absolute path, all previous components are
    thrown away and joining continues from the absolute path component.

    https://docs.python.org/2/library/os.path.html#os.path.join

That means we need to ensure that we don't end up in this case.
2015-07-10 12:34:32 -05:00
Pavol Babincak
9e89ebb9a4 Ran reindent.py from cpython tools on all python scripts
Citing from reindent docs:

    Change Python (.py) files to use 4-space indents and no hard tab
    characters. Also trim excess spaces and tabs from ends of lines, and
    remove empty lines at the end of files.  Also ensure the last line
    ends with a newline.

Citing from PEP 8:

    Use 4 spaces per indentation level.

    Python 2 code indented with a mixture of tabs and spaces should be
    converted to using spaces exclusively.

    Don't write string literals that rely on significant trailing
    whitespace. Such trailing whitespace is visually indistinguishable
    and some editors (or more recently, reindent.py) will trim them.

Also PyLint recommends not to have trailing whitespace on any line.
2015-05-13 16:39:53 -04:00
Tomas Kopecek
cd45e886cc runroot plugin 2015-01-27 22:41:00 -06:00