mirror of https://github.com/google/yapf.git
Add support for Python 3.10 (#986)
* Add support for Python 3.10 * YAPF supports Python 2.7 and 3.6.4+ * Add support for Python 3.10pull/987/head
parent
ebd977af00
commit
e02dfd19ca
|
@ -11,7 +11,7 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [2.7, 3.7, 3.8, 3.9]
|
||||
python-version: ["2.7", "3.7", "3.8", "3.9", "3.10"]
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
|
||||
steps:
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
## [0.40.0] UNRELEASED
|
||||
### Changes
|
||||
- Moved 'pytree' parsing tools into its own subdirectory.
|
||||
- Add support for Python 3.10.
|
||||
|
||||
## [0.32.0] 2021-12-26
|
||||
### Added
|
||||
|
|
4
setup.py
4
setup.py
|
@ -61,6 +61,10 @@ with codecs.open('README.rst', 'r', 'utf-8') as fd:
|
|||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||
'Topic :: Software Development :: Quality Assurance',
|
||||
],
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist=py27,py34,py35,py36,py37,py38
|
||||
envlist=py27,py36,py37,py38,py39,py310
|
||||
|
||||
[testenv]
|
||||
commands=
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue