Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想用来flake8验证 scons 文件(SConstruct, SConscript)。因为scons隐式导入 SCons 模块,所以默认情况下可以使用一些名称,例如Program, Glob, Command. flake8 不知道它们并丢弃“未定义名称'Glob' [F821]”警告。
flake8
SConstruct
SConscript
scons
Program
Glob
Command
我怎么能解决这个问题?
对于我使用的隐式导入,您可以使它们显式,例如:
from SCons.Script import (Command, Glob, Program)