mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Simple Python 3 compatibility changes
Summary: Changes that move towards python 3 compatibility that are easy to review without much thought Test Plan: The tests Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2873
This commit is contained in:
@@ -24,29 +24,29 @@ def get_ts_type(col_type):
|
||||
return _ts_types.get(col_type, "CellValue")
|
||||
|
||||
def main():
|
||||
print """
|
||||
print("""
|
||||
/*** THIS FILE IS AUTO-GENERATED BY %s ***/
|
||||
// tslint:disable:object-literal-key-quotes
|
||||
|
||||
export const schema = {
|
||||
""" % __file__
|
||||
""" % __file__)
|
||||
|
||||
for table in schema.schema_create_actions():
|
||||
print ' "%s": {' % table.table_id
|
||||
print(' "%s": {' % table.table_id)
|
||||
for column in table.columns:
|
||||
print ' %-20s: "%s",' % (column['id'], column['type'])
|
||||
print ' },\n'
|
||||
print(' %-20s: "%s",' % (column['id'], column['type']))
|
||||
print(' },\n')
|
||||
|
||||
print """};
|
||||
print("""};
|
||||
|
||||
export interface SchemaTypes {
|
||||
"""
|
||||
""")
|
||||
for table in schema.schema_create_actions():
|
||||
print ' "%s": {' % table.table_id
|
||||
print(' "%s": {' % table.table_id)
|
||||
for column in table.columns:
|
||||
print ' %s: %s;' % (column['id'], get_ts_type(column['type']))
|
||||
print ' };\n'
|
||||
print "}"
|
||||
print(' %s: %s;' % (column['id'], get_ts_type(column['type'])))
|
||||
print(' };\n')
|
||||
print("}")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user