Skip to content

Commit 5976f36

Browse files
authored
Merge pull request #5368 from asottile/pyupgrade
Automated / semi-automated python3 upgrades
2 parents b8781ff + ce78c9a commit 5976f36

File tree

191 files changed

+820
-1517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+820
-1517
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ repos:
77
args: [--safe, --quiet]
88
language_version: python3
99
- repo: https://github.com/asottile/blacken-docs
10-
rev: v0.5.0
10+
rev: v1.0.0
1111
hooks:
1212
- id: blacken-docs
1313
additional_dependencies: [black==19.3b0]
1414
language_version: python3
1515
- repo: https://github.com/pre-commit/pre-commit-hooks
16-
rev: v2.2.2
16+
rev: v2.2.3
1717
hooks:
1818
- id: trailing-whitespace
1919
- id: end-of-file-fixer
2020
- id: fix-encoding-pragma
21+
args: [--remove]
2122
- id: check-yaml
2223
- id: debug-statements
2324
exclude: _pytest/debugging.py
@@ -31,14 +32,14 @@ repos:
3132
rev: v1.4.0
3233
hooks:
3334
- id: reorder-python-imports
34-
args: ['--application-directories=.:src']
35+
args: ['--application-directories=.:src', --py3-plus]
3536
- repo: https://github.com/asottile/pyupgrade
36-
rev: v1.15.0
37+
rev: v1.18.0
3738
hooks:
3839
- id: pyupgrade
39-
args: [--keep-percent-format]
40+
args: [--py3-plus]
4041
- repo: https://github.com/pre-commit/pygrep-hooks
41-
rev: v1.3.0
42+
rev: v1.4.0
4243
hooks:
4344
- id: rst-backticks
4445
- repo: local

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- test $(python -c 'import sys; print("%d%d" % sys.version_info[0:2])') = 37
3535

3636
# Full run of latest supported version, without xdist.
37-
- env: TOXENV=py37
37+
- env: TOXENV=py37 PYTEST_COVERAGE=1
3838
python: '3.7'
3939

4040
# Coverage tracking is slow with pypy, skip it.

bench/bench.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import sys
32

43
if __name__ == "__main__":

bench/bench_argcomplete.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# 10000 iterations, just for relative comparison
32
# 2.7.5 3.3.2
43
# FilesCompleter 75.1109 69.2116

bench/empty.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
# -*- coding: utf-8 -*-
21
for i in range(1000):
32
exec("def test_func_%d(): pass" % i)

bench/manyparam.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import pytest
32

43

bench/skip.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
from six.moves import range
3-
41
import pytest
52

63
SKIP = True

doc/en/_themes/flask_theme_support.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# flasky extensions. flasky pygments style based on tango style
32
from pygments.style import Style
43
from pygments.token import Comment

doc/en/conf.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
#
32
# pytest documentation build configuration file, created by
43
# sphinx-quickstart on Fri Oct 8 17:54:28 2010.
@@ -63,9 +62,9 @@
6362
master_doc = "contents"
6463

6564
# General information about the project.
66-
project = u"pytest"
65+
project = "pytest"
6766
year = datetime.datetime.utcnow().year
68-
copyright = u"2015–2019 , holger krekel and pytest-dev team"
67+
copyright = "2015–2019 , holger krekel and pytest-dev team"
6968

7069

7170
# The language for content autogenerated by Sphinx. Refer to documentation
@@ -233,8 +232,8 @@
233232
(
234233
"contents",
235234
"pytest.tex",
236-
u"pytest Documentation",
237-
u"holger krekel, trainer and consultant, http://merlinux.eu",
235+
"pytest Documentation",
236+
"holger krekel, trainer and consultant, http://merlinux.eu",
238237
"manual",
239238
)
240239
]
@@ -266,16 +265,16 @@
266265

267266
# One entry per manual page. List of tuples
268267
# (source start file, name, description, authors, manual section).
269-
man_pages = [("usage", "pytest", u"pytest usage", [u"holger krekel at merlinux eu"], 1)]
268+
man_pages = [("usage", "pytest", "pytest usage", ["holger krekel at merlinux eu"], 1)]
270269

271270

272271
# -- Options for Epub output ---------------------------------------------------
273272

274273
# Bibliographic Dublin Core info.
275-
epub_title = u"pytest"
276-
epub_author = u"holger krekel at merlinux eu"
277-
epub_publisher = u"holger krekel at merlinux eu"
278-
epub_copyright = u"2013, holger krekel et alii"
274+
epub_title = "pytest"
275+
epub_author = "holger krekel at merlinux eu"
276+
epub_publisher = "holger krekel at merlinux eu"
277+
epub_copyright = "2013, holger krekel et alii"
279278

280279
# The language of the text. It defaults to the language option
281280
# or en if the language is not set.

doc/en/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# -*- coding: utf-8 -*-
21
collect_ignore = ["conf.py"]

0 commit comments

Comments
 (0)