diff options
author | Marc Mueller <30130371+cdce8p@users.noreply.github.com> | 2021-09-17 19:55:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-17 19:55:29 +0200 |
commit | e8d112132dbd88e91257cdb8380ddc4e1561e305 (patch) | |
tree | f647d0c773f2538c5f90413fad14803c3f3c5f98 /tests/functional | |
parent | 096b31f109c1ee34c668f7ffe271c6493c889b80 (diff) | |
download | pylint-git-e8d112132dbd88e91257cdb8380ddc4e1561e305.tar.gz |
Require Python 3.6 for consider f-string check (#5024)
* Require Python 3.6 for consider f-string check
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests/functional')
-rw-r--r-- | tests/functional/p/py_version/py_version_35.py | 14 | ||||
-rw-r--r-- | tests/functional/p/py_version/py_version_35.rc | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/functional/p/py_version/py_version_35.py b/tests/functional/p/py_version/py_version_35.py new file mode 100644 index 000000000..ee880c54a --- /dev/null +++ b/tests/functional/p/py_version/py_version_35.py @@ -0,0 +1,14 @@ +"""Test warnings aren't emitted for features that require Python > 3.5""" +# pylint: disable=invalid-name + +# consider-using-f-string -> requires Python 3.6 +"Hello {}".format("World") + + +# ------ +# CodeStyle extension + +# consider-using-assignment-expr -> requires Python 3.8 +a1 = 2 +if a1: + ... diff --git a/tests/functional/p/py_version/py_version_35.rc b/tests/functional/p/py_version/py_version_35.rc new file mode 100644 index 000000000..6f19ec36a --- /dev/null +++ b/tests/functional/p/py_version/py_version_35.rc @@ -0,0 +1,3 @@ +[MASTER] +load-plugins=pylint.extensions.code_style +py-version=3.5 |