Skip to content

Commit

Permalink
Merge pull request #528 from s-t-e-v-e-n-k/drop-safe-repr
Browse files Browse the repository at this point in the history
Drop unused safe_repr function
  • Loading branch information
jaraco committed Apr 1, 2016
2 parents 04d10ff + f4c7a06 commit d0620ff
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions pkg_resources/tests/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@
WorkingSet)


def safe_repr(obj, short=False):
""" copied from Python2.7"""
try:
result = repr(obj)
except Exception:
result = object.__repr__(obj)
if not short or len(result) < pkg_resources._MAX_LENGTH:
return result
return result[:pkg_resources._MAX_LENGTH] + ' [truncated]...'


class Metadata(pkg_resources.EmptyProvider):
"""Mock object to return metadata as if from an on-disk distribution"""

Expand Down

0 comments on commit d0620ff

Please sign in to comment.