mirror of https://github.com/ansible/ansible.git
Update ansible-test pylint Python support. (#72972)
* Update ansible-test pylint Python support. * Python 3.8 is now officially supported. * Python 3.9 is now skipped with a warning.pull/72983/head
parent
7eee2454f6
commit
37d09f2488
@ -0,0 +1,3 @@
|
|||||||
|
minor_changes:
|
||||||
|
- ansible-test - The ``pylint`` sanity test is now supported on Python 3.8.
|
||||||
|
- ansible-test - The ``pylint`` sanity test is now skipped with a warning on Python 3.9 due to unresolved upstream regressions.
|
@ -0,0 +1,21 @@
|
|||||||
|
"""
|
||||||
|
These test cases verify ansible-test version constraints for pylint and its dependencies across Python versions.
|
||||||
|
The initial test cases were discovered while testing various Python versions against ansible/ansible.
|
||||||
|
"""
|
||||||
|
from __future__ import absolute_import, division, print_function
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
|
# Python 3.8 fails with astroid 2.2.5 but works on 2.3.3
|
||||||
|
# syntax-error: Cannot import 'string' due to syntax error 'invalid syntax (<unknown>, line 109)'
|
||||||
|
# Python 3.9 fails with astroid 2.2.5 but works on 2.3.3
|
||||||
|
# syntax-error: Cannot import 'string' due to syntax error 'invalid syntax (<unknown>, line 104)'
|
||||||
|
import string
|
||||||
|
|
||||||
|
# Python 3.9 fails with pylint 2.3.1 or 2.4.4 with astroid 2.3.3 but works with pylint 2.5.0 and astroid 2.4.0
|
||||||
|
# 'Call' object has no attribute 'value'
|
||||||
|
result = {}[{}.get('something')]
|
||||||
|
|
||||||
|
# pylint 2.3.1 and 2.4.4 report the following error but 2.5.0 and 2.6.0 do not
|
||||||
|
# blacklisted-name: Black listed name "foo"
|
||||||
|
# see: https://github.com/PyCQA/pylint/issues/3701
|
||||||
|
foo = {}.keys()
|
@ -1,3 +1,3 @@
|
|||||||
pylint ; python_version < '3.9' # installation fails on python 3.9.0b1
|
pylint
|
||||||
pyyaml # needed for collection_detail.py
|
pyyaml # needed for collection_detail.py
|
||||||
mccabe # pylint complexity testing
|
mccabe # pylint complexity testing
|
||||||
|
Loading…
Reference in New Issue