jet-admin / jet-bridge

Consider using f-strings PYL-C0209
Performance
Minor
a month ago2 years old
Formatting a regular string which could be a f-string
1012                pagination=PaginationType(),
1013                search=SearchType()
1014            )
1015            query_attrs['resolve_{}'.format(name)] = create_list_resolver(Model, mapper)1016
1017            i += 1
1018
Formatting a regular string which could be a f-string
 775        model_name = clean_name(table_name)
 776        column_name = clean_name(column.name)
 777        relationship = self.get_model_field_lookups_type_relationship(MappedBase, mapper, column_name) if with_relations else None
 778        cls_name = 'Model{}Column{}LookupsFieldType'.format(model_name, column_name) if relationship \ 779            else 'LookupsFieldType'
 780
 781        if cls_name in self.model_lookups_field_types:
Formatting a regular string which could be a f-string
 699        dbfield_filter = filter_for_data_type(column.type)
 700        relationship = self.get_model_field_filters_type_relationship(MappedBase, mapper, column_name) if with_relations else None
 701        cls_name = 'Model{}Column{}FiltersType'.format(model_name, column_name) if relationship \
 702            else 'Lookups{}FiltersType'.format(dbfield_filter['lookups_name']) 703
 704        if cls_name in self.model_filters_field_types:
 705            return self.model_filters_field_types[cls_name]
Formatting a regular string which could be a f-string
 698        column_name = clean_name(column.name)
 699        dbfield_filter = filter_for_data_type(column.type)
 700        relationship = self.get_model_field_filters_type_relationship(MappedBase, mapper, column_name) if with_relations else None
 701        cls_name = 'Model{}Column{}FiltersType'.format(model_name, column_name) if relationship \ 702            else 'Lookups{}FiltersType'.format(dbfield_filter['lookups_name'])
 703
 704        if cls_name in self.model_filters_field_types:
Formatting a regular string which could be a f-string
 979                'allAttrs': graphene.Field(RawScalar),
 980                'lookups': graphene.List(RawScalar)
 981            })
 982            ModelListType = type('Model{}ModelListType'.format(name), (graphene.ObjectType,), { 983                'data': graphene.List(ModelType),
 984                'pagination': graphene.Field(PaginationResponseType)
 985            })