Skip to content

Commit

Permalink
Move code around
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovsky committed Nov 6, 2018
1 parent 65d4a41 commit a439cb9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pony/orm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5954,12 +5954,6 @@ def random(query, limit):
def to_json(query, include=(), exclude=(), converter=None, with_schema=True, schema_hash=None):
return query._database.to_json(query[:], include, exclude, converter, with_schema, schema_hash)

def strcut(s, width):
if len(s) <= width:
return s + ' ' * (width - len(s))
else:
return s[:width-3] + '...'


class QueryResultIterator(object):
__slots__ = '_query_result', '_position'
Expand Down Expand Up @@ -6147,6 +6141,13 @@ def to_list(self):
remove = make_query_result_method_error_stub('remove', 'remove')


def strcut(s, width):
if len(s) <= width:
return s + ' ' * (width - len(s))
else:
return s[:width-3] + '...'


@cut_traceback
def show(entity):
x = entity
Expand Down

0 comments on commit a439cb9

Please sign in to comment.