asottile-archive/flake8-2020

False positive with version slice

asottile opened this issue · 0 comments

the version slice should probably only check for :1 and :3 as there's a few "legitimate" usages of slicing sys.version I've seen in the wild, in particular here's one from cpython that seems to be well defined:

https://github.com/python/cpython/blob/da27d9b9dc44913ffee8f28d9638985eaaa03755/Lib/distutils/msvc9compiler.py#L174-L179