From f4c7a06cc90bed1e1feadd343e5a9fec3433e004 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 1 Apr 2016 14:43:06 +1100 Subject: Drop unused safe_repr function When _assertIn was removed from test_resources, the safe_repr function was not dropped, leaving it with no callers, so drop it. --- pkg_resources/tests/test_resources.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'pkg_resources') diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 791d8ee3..98b8dcd7 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -15,17 +15,6 @@ from pkg_resources import (parse_requirements, VersionConflict, parse_version, 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""" -- cgit v1.2.1