Fix generate script to output black-compatible code
This commit is contained in:
parent
0bf67cc0c9
commit
b60df6e5ce
@ -31,7 +31,7 @@ tables.sort()
|
|||||||
|
|
||||||
with open(os.path.join(tablesDir, "__init__.py"), "w") as file:
|
with open(os.path.join(tablesDir, "__init__.py"), "w") as file:
|
||||||
file.write(
|
file.write(
|
||||||
'''
|
'''\
|
||||||
# DON'T EDIT! This file is generated by MetaTools/buildTableList.py.
|
# DON'T EDIT! This file is generated by MetaTools/buildTableList.py.
|
||||||
def _moduleFinderHint():
|
def _moduleFinderHint():
|
||||||
"""Dummy function to let modulefinder know what tables may be
|
"""Dummy function to let modulefinder know what tables may be
|
||||||
@ -43,12 +43,15 @@ def _moduleFinderHint():
|
|||||||
)
|
)
|
||||||
|
|
||||||
for module in modules:
|
for module in modules:
|
||||||
file.write("\tfrom . import %s\n" % module)
|
file.write(" from . import %s\n" % module)
|
||||||
|
|
||||||
|
file.write("\n")
|
||||||
|
|
||||||
file.write(
|
file.write(
|
||||||
"""
|
"""
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import doctest, sys
|
import doctest, sys
|
||||||
|
|
||||||
sys.exit(doctest.testmod().failed)
|
sys.exit(doctest.testmod().failed)
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user