Skip to content

Commit 81b6570

Browse files
committed
Revert some unwanted changes that sneaked in with 0477d51550ab.
1 parent b448047 commit 81b6570

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

bpython/inspection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def fixlongargs(f, argspec):
164164
kwparsed = parsekeywordpairs(signature)
165165

166166
for i, (key, value) in enumerate(zip(keys, values)):
167-
if len(repr(value)) != len(kwparsed[key]):
167+
if len(str(value)) != len(kwparsed[key]):
168168
values[i] = kwparsed[key]
169169

170170
argspec[3] = values

bpython/test/test_inspection.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import inspect
21
import unittest
32

43
from bpython import inspection
@@ -43,15 +42,5 @@ def fails(spam=['-a', '-b']):
4342
defaults = argspec[1][3]
4443
self.assertEqual(str(defaults[0]), default_arg_repr)
4544

46-
def test_fixlongargs(self):
47-
def spam(a, b=1, c="y\xc3\xa4y"):
48-
pass
49-
50-
argspec = list(inspect.getargspec(spam))
51-
print argspec[3],
52-
inspection.fixlongargs(spam, argspec)
53-
print argspec[3], [type(a) for a in argspec[3]]
54-
self.assertFalse(argspec)
55-
5645
if __name__ == '__main__':
5746
unittest.main()

0 commit comments

Comments
 (0)