Derived from the flake8-2020 linter.
What it does#
Checks for uses of
Why is this bad?#
If the major version number consists of more than one digit, this will
select the first digit of the major version number only (e.g.,
would evaluate to
"1"). This is likely unintended, and can lead to subtle
bugs in future versions of Python if the version string is used to test
against a specific major version number.
sys.version_info.major to access the current major version