
__builtin__ does not exist in Python 3, use six.moves.builtins instead. Change-Id: I79b61b5ab67f491ce88015f799ff7d66c9eeb7ee closes-bug: #1290234
24 lines
488 B
Python
24 lines
488 B
Python
"""
|
|
wrapper for pyflakes to ignore gettext based warning:
|
|
"undefined name '_'"
|
|
|
|
Synced in from openstack-common
|
|
"""
|
|
|
|
__all__ = ['main']
|
|
|
|
import sys
|
|
import six.moves.builtins as builtins
|
|
import pyflakes.api
|
|
from pyflakes import checker
|
|
|
|
|
|
def main():
|
|
checker.Checker.builtIns = (set(dir(builtins)) |
|
|
set(['_']) |
|
|
set(checker._MAGIC_GLOBALS))
|
|
sys.exit(pyflakes.api.main())
|
|
|
|
if __name__ == "__main__":
|
|
main()
|