@@ -116,22 +116,25 @@ def convert_column_to_datetime(type, column, registry=None):
116116@convert_sqlalchemy_type .register (types .Integer )
117117def convert_column_to_int_or_id (type , column , registry = None ):
118118 if column .primary_key :
119- return ID (description = get_column_doc (column ), required = not (is_column_nullable (column )))
119+ return ID (description = get_column_doc (column ),
120+ required = not (is_column_nullable (column )))
120121 else :
121122 return Int (description = get_column_doc (column ),
122123 required = not (is_column_nullable (column )))
123124
124125
125126@convert_sqlalchemy_type .register (types .Boolean )
126127def convert_column_to_boolean (type , column , registry = None ):
127- return Boolean (description = get_column_doc (column ), required = not (is_column_nullable (column )))
128+ return Boolean (description = get_column_doc (column ),
129+ required = not (is_column_nullable (column )))
128130
129131
130132@convert_sqlalchemy_type .register (types .Float )
131133@convert_sqlalchemy_type .register (types .Numeric )
132134@convert_sqlalchemy_type .register (types .BigInteger )
133135def convert_column_to_float (type , column , registry = None ):
134- return Float (description = get_column_doc (column ), required = not (is_column_nullable (column )))
136+ return Float (description = get_column_doc (column ),
137+ required = not (is_column_nullable (column )))
135138
136139
137140@convert_sqlalchemy_type .register (types .Enum )
@@ -141,7 +144,8 @@ def convert_enum_to_enum(type, column, registry=None):
141144 except AttributeError :
142145 items = zip (type .enums , type .enums )
143146 return Field (Enum (type .name , items ),
144- description = get_column_doc (column ), required = not (is_column_nullable (column )))
147+ description = get_column_doc (column ),
148+ required = not (is_column_nullable (column )))
145149
146150
147151@convert_sqlalchemy_type .register (ChoiceType )
@@ -159,16 +163,19 @@ def convert_scalar_list_to_list(type, column, registry=None):
159163def convert_postgres_array_to_list (_type , column , registry = None ):
160164 graphene_type = convert_sqlalchemy_type (column .type .item_type , column )
161165 inner_type = type (graphene_type )
162- return List (inner_type , description = get_column_doc (column ), required = not (is_column_nullable (column )))
166+ return List (inner_type , description = get_column_doc (column ),
167+ required = not (is_column_nullable (column )))
163168
164169
165170@convert_sqlalchemy_type .register (postgresql .HSTORE )
166171@convert_sqlalchemy_type .register (postgresql .JSON )
167172@convert_sqlalchemy_type .register (postgresql .JSONB )
168173def convert_json_to_string (type , column , registry = None ):
169- return JSONString (description = get_column_doc (column ), required = not (is_column_nullable (column )))
174+ return JSONString (description = get_column_doc (column ),
175+ required = not (is_column_nullable (column )))
170176
171177
172178@convert_sqlalchemy_type .register (JSONType )
173179def convert_json_type_to_string (type , column , registry = None ):
174- return JSONString (description = get_column_doc (column ), required = not (is_column_nullable (column )))
180+ return JSONString (description = get_column_doc (column ),
181+ required = not (is_column_nullable (column )))
0 commit comments