Skip to content

Commit

Permalink
YAPF supports Python 2.7 and 3.6.4+
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Dec 30, 2021
1 parent cad59ea commit 60f064c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["2.7", "3.7", "3.8", "3.9", "3.10"]
python-version: ["2.7", "3.7", "3.8", "3.9", "3.10", "3.11-dev"]
os: [ubuntu-latest, macos-latest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=py27,py34,py35,py36,py37,py38,py39,py310
envlist=py27,py36,py37,py38,py39,py310

[testenv]
commands=
Expand Down
4 changes: 2 additions & 2 deletions yapf/yapflib/yapf_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ def FormatCode(unformatted_source,


def _CheckPythonVersion(): # pragma: no cover
errmsg = 'yapf is only supported for Python 2.7 or 3.4+'
errmsg = 'yapf is only supported for Python 2.7 or 3.6+'
if sys.version_info[0] == 2:
if sys.version_info[1] < 7:
raise RuntimeError(errmsg)
elif sys.version_info[0] == 3:
if sys.version_info[1] < 4:
if sys.version_info[1] < 6:
raise RuntimeError(errmsg)


Expand Down

0 comments on commit 60f064c

Please sign in to comment.