Commit Graph

20 Commits

Author SHA1 Message Date
Brian Gesiak
c9000af795 Merge pull request #1526 from practicalswift/fix-pep8-violations-ii
[Python] Fix five classes of PEP-8 violations (E101/E111/E128/E302/W191)
2016-03-08 23:55:46 -05:00
practicalswift
265835fdfc [Python] Use consistent import ordering for Python code
Ordering used:
1.) standard library imports
2.) third party imports
3.) local package imports

Each group is individually alphabetized.
2016-03-07 23:25:16 +01:00
practicalswift
183da818df [Python] Fix five classes of PEP-8 violations (E101/E111/E128/E302/W191)
* E101: indentation contains mixed spaces and tabs
* E111: indentation is not a multiple of four
* E128: continuation line under-indented for visual indent
* E302: expected 2 blank lines, found 1
* W191: indentation contains tabs
2016-03-07 22:36:23 +01:00
Daniel Duan
f14182a2b7 [Utils] replace #line with #setline in utils/line-directive 2016-03-01 23:08:54 -08:00
practicalswift
e395ea0f0e [Python] Follow standard Python docstrings conventions (PEP-0257).
https://www.python.org/dev/peps/pep-0257/
2016-02-20 17:11:57 +01:00
practicalswift
33452564f6 PEP8: Fix violations of type "continuation line under-indented for hanging indent" (E121) 2016-01-24 09:47:53 +01:00
practicalswift
84a31184c7 PEP8: Fix all violations of type "missing whitespace after ','" (E231) 2016-01-24 09:40:32 +01:00
practicalswift
1cd4d4e9c9 [gardening] Fix violations of non-controversial PEP8 rules
Fixes:
* multiple statements on one line (colon) (E701)
* missing whitespace around arithmetic operator (E226)
* missing whitespace around operator (E225)
* closing bracket does not match visual indentation (E124)
* blank line contains whitespace (W293)
* continuation line missing indentation or outdented (E122)
* continuation line over-indented for hanging indent (E126)
* missing expected blank line (E301)
* trailing whitespace (W291)
* unexpected spaces around keyword / parameter equals (E251)
* whitespace after '(', '[' or '{' (E201)
* whitespace before ')', ']' or '}' (E202)
* whitespace before ',' or ':' (E203)
2016-01-23 09:23:33 +01:00
practicalswift
22d043fcc0 [gardening] Fix violations of non-controversial PEP8 rules.
Fixes:
* blank line at end of file
* closing bracket does not match indentation of opening bracket's line
* continuation line over-indented for hanging indent
* continuation line over-indented for visual indent
* continuation line unaligned for hanging indent
* inline comment should start with '# '
* missing whitespace around arithmetic operator
* missing whitespace around bitwise or shift operator
* multiple imports on one line
* multiple spaces after ':'
* multiple spaces after operator
2016-01-16 00:47:43 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Ryan Lovelett
8f223005d7 [gyb] Popen explicit string instead of byte sequence
The Popen command on Python returns a byte sequence on stdout by
default. However by sending the constructor the argument
`universal_newlines=True` it forces the Popen to put a string on stdout.

This was not a problem on Python 2 because the Python 2 regex engine
seemed to work find on byte sequences where Python 3's does not. By
explicitly converting everything to a string the same behavior is now
seen on Python 2 and 3.

See: https://docs.python.org/2/library/subprocess.html#frequently-used-arguments
See: https://docs.python.org/3/library/subprocess.html#frequently-used-arguments
2015-12-31 16:51:48 -05:00
Brian Gesiak
0d62ed2cf1 [line-directive] Add code header
Add code headers missing from `utils/line-directive`, as per the template
from #762.
2015-12-29 00:21:42 -05:00
practicalswift
cd337dc83b Remove unused imports. 2015-12-21 10:24:08 +01:00
Dave Abrahams
1c63d9dc7f [line-directive] StdlibUnittest support
Recognize yet more StdlibUnittest output

Swift SVN r23495
2014-11-21 00:24:25 +00:00
Dave Abrahams
43257cbfaa [emacs, line-directive] StdlibUnittest support
Recognize more StdlibUnittest output both in our emacs error parsing
and in the line-directive tool.

Corrected a bug in the emacs error support that caused it to mask one
error format with a second one having the same name

Swift SVN r23464
2014-11-20 03:41:09 +00:00
Dave Abrahams
c1ceaedc1b [utils] line-directive: indentation fix
Swift SVN r16969
2014-04-28 08:40:48 +00:00
Dave Abrahams
7036eaee44 [utils] recognize assertions in line-directive
Swift SVN r16967
2014-04-28 08:32:40 +00:00
Dave Abrahams
19f22d9f57 [utils] gyb/line-directive: fix up line alignment
Needed to properly map a file's first line to itself in the absence of a
directive.  We were also off by two columns due to a stray +2

Swift SVN r15682
2014-03-31 16:37:51 +00:00
Dave Abrahams
c733f3e419 [build] Integrate gyb line-directive processing
Diagnostic output from compiling .swift files is now passed through the
line-directive tool so that errors point back at the original .gyb
files.

Swift SVN r15674
2014-03-31 08:42:56 +00:00
Dave Abrahams
e07dc1d62d [stdlib] add line-directive post-processor
Swift SVN r15344
2014-03-21 22:11:47 +00:00