带有 pep8 命名的 Flake8 抱怨 camelCase 导入
Flake8 with pep8-naming complains about camelCase imports
我尝试使用以下方法:
import xml.etree.ElementTree as ET
但是 flake8
和 pep8-naming
给出了以下警告:
N817 camelcase 'xml.etree.ElementTree' imported as acronym 'ET'
然后我尝试了:
import xml.etree.ElementTree as et
import xml.etree.ElementTree as element_tree
但又一次:
N813 camelcase 'xml.etree.ElementTree' imported as lowercase 'et'
这里flake8想要什么?
Flake8 可以使用以下首字母缩略词:
import xml.etree.ElementTree as Et
import xml.etree.ElementTree as eT
更详细的变体也是可能的:
import xml.etree.ElementTree as ETree
import xml.etree.ElementTree as eTree
import xml.etree.ElementTree as ElementTree
我尝试使用以下方法:
import xml.etree.ElementTree as ET
但是 flake8
和 pep8-naming
给出了以下警告:
N817 camelcase 'xml.etree.ElementTree' imported as acronym 'ET'
然后我尝试了:
import xml.etree.ElementTree as et
import xml.etree.ElementTree as element_tree
但又一次:
N813 camelcase 'xml.etree.ElementTree' imported as lowercase 'et'
这里flake8想要什么?
Flake8 可以使用以下首字母缩略词:
import xml.etree.ElementTree as Et
import xml.etree.ElementTree as eT
更详细的变体也是可能的:
import xml.etree.ElementTree as ETree
import xml.etree.ElementTree as eTree
import xml.etree.ElementTree as ElementTree