Bruno Oliveira
5f9bc557ea
Fix linting
2018-03-09 17:44:39 -03:00
Ronny Pfannschmidt
543bac925a
fix if-chain in _code.source
2018-03-09 16:50:46 +01:00
Ronny Pfannschmidt
2fe56b97c9
remove unused assertion parameter in source and minor cleanups
2018-03-09 15:03:57 +01:00
Ronny Pfannschmidt
3284d575e8
readline generator no longer needs to yield empty strings
2018-03-09 14:58:11 +01:00
Ronny Pfannschmidt
a406ca14d6
remove getstatementrange_old - its documented for python <= 2.4
2018-03-09 14:48:28 +01:00
Ronny Pfannschmidt
c67f45b716
simplify a few imports in _pytest._code.source
2018-03-09 12:06:50 +01:00
Anthony Sottile
bd1d17e8de
Replace py.std with stdlib imports
2018-01-09 12:44:10 -08:00
Srinivas Reddy Thatiparthy
cb0ba18f53
remove '_ast' module; and redirect '_ast' references to 'ast'
2017-12-11 23:14:17 +05:30
Bruno Oliveira
983a09a2d4
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2017-11-10 18:33:02 -02:00
Bruno Oliveira
b11640c1eb
Fix linting E722: do not use bare except
2017-11-04 13:59:10 -02:00
Bruno Oliveira
03829fde8a
Fix linting E741: ambiguous variable name
2017-11-04 13:59:10 -02:00
hugovk
ef732fc51d
Remove code for unsupported Python versions
2017-10-10 08:54:56 +03:00
Srinivas Reddy Thatiparthy
dc563e4954
convert py module references to six module
2017-08-04 08:05:03 +05:30
Andras Tim
b49e8baab3
Fixed E731 flake8 errors
...
do not assign a lambda expression, use a def
2017-07-17 01:44:23 +02:00
Andras Tim
45ac863069
Fixed E401 flake8 errors
...
multiple imports on one line
2017-07-17 01:44:23 +02:00
Andras Tim
b840622819
Fixed E302 flake8 errors
...
expected 2 blank lines, found 0
2017-07-17 01:44:23 +02:00
Andras Tim
17a21d540b
Fixed E301 flake8 errors
...
expected 1 blank line, found 0
2017-07-17 01:44:23 +02:00
Andras Tim
195a816522
Fixed E265 flake8 errors
...
block comment should start with ‘# ‘
2017-07-17 01:44:22 +02:00
Andras Tim
8f3eb6dfc7
Fixed E261 flake8 errors
...
at least two spaces before inline comment
2017-07-17 01:44:22 +02:00
Andras Tim
b226454582
Fixed E251 flake8 errors
...
unexpected spaces around keyword / parameter equals
2017-07-17 01:44:22 +02:00
Andras Tim
617e510b6e
Fixed E231 flake8 errors
...
missing whitespace after ‘,’, ‘;’, or ‘:’
2017-07-17 01:44:22 +02:00
Andras Tim
4b22f270a3
Fixed E226 flake8 errors
...
missing whitespace around arithmetic operator
2017-07-17 01:44:22 +02:00
Andras Tim
3fabc4d219
Fixed E222 flake8 errors
...
multiple spaces after operator
2017-07-17 01:44:22 +02:00
Andras Tim
1ff54ba205
Fixed E201 flake8 errors
...
whitespace after ‘(‘
2017-07-17 01:28:17 +02:00
Andras Tim
cf97159009
Fixed E128 flake8 errors
...
continuation line under-indented for visual indent
2017-07-17 01:28:16 +02:00
Andras Tim
6af2abdb53
Fixed flake8 warnings
...
W191 indentation contains tabs
W292 no newline at end of file
W293 blank line contains whitespace
W391 blank line at end of file
2017-07-17 01:28:16 +02:00
Bruno Oliveira
42a5d6bdfa
Add __future__ imports to all pytest modules
...
This prevents silly errors from creeping in Python 2 when testing in Python 3
2017-03-16 22:45:40 -03:00
Bruno Oliveira
30f0152ae6
Remove unused import
2016-11-30 22:34:02 -02:00
Bruno Oliveira
f8d195253e
Remove support code for earlier Python 3 version in Source.compile
...
This code leaves None in sys.modules as a side effect but is no longer needed in the Python 3 versions we support.
Fix #2103
2016-11-30 22:23:02 -02:00
Bruno Oliveira
1eb5a690d4
Fix flake8 E305 and E306 errors
...
These errors started to appear with flake8-3.1.1, while they don't appear with
version 3.1.0 (weird).
2016-11-20 18:59:15 -02:00
Roy Williams
f1c4cfea2c
Remove implementation of `__getslice__`
...
`__getslice__` has been Deprecated since Python 2.0 and is removed in Python 3. See
https://docs.python.org/2/reference/datamodel.html#object.__getslice__
Unfortunately, Python 2 will still dispatch to `__getslice__` over `__getitem__`, See
http://bugs.python.org/issue2041 , which causes Warnings when running with `-3` in 2.7.
2016-09-23 09:52:30 -07:00
Roy Williams
24db3c123d
Explicitly set to None to have consistent behavior in Python 2 and Python 3
2016-09-22 09:22:12 -07:00
Roy Williams
940ed7e943
Fix `DeprecationWarnings` found when running py.test in Python 2.7 with the -3 flag.
...
Running through some of my tests with the `-3` flag in python2.7 I encountered some errors within py.test itself. This fixes those errors so we can use py.test in order to identify problems with Python 3.
2016-09-21 17:44:25 -07:00
Bruno Oliveira
a912d3745b
Moved py.code code over to py.test
...
Fix #103
2016-01-25 23:18:04 -02:00