I need to support both python 3.8 and versions lower that 3.8, but the package I need to import into my stub (*.pyi) file had different name in <3.8
import sys
if sys.version_info.minor < 8:
import xyz
else:
import zyx
In general this should do the job, but when I run flake8 with *.pyi files config (flake8 --config flake8-pyi.ini
) I get this:
Y002 If test must be a simple comparison against sys.platform or sys.version_info
Any ideas what could be done about that?
Thanks in advance!