diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2022-05-14 02:22:35 -0400 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2022-05-14 02:22:35 -0400 |
| commit | 3c1c40158da1e2af9aced53056ad4c3aaafc0913 (patch) | |
| tree | 3a2029e068d6f10e65fdad99167e4a406946d1fa /python/bncompleter.py | |
| parent | 5926698ea5013fab44d95d8a0f046888398565de (diff) | |
remove more vestigal py2 code
Diffstat (limited to 'python/bncompleter.py')
| -rw-r--r-- | python/bncompleter.py | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/python/bncompleter.py b/python/bncompleter.py index ff093b9d..ef56fd3e 100644 --- a/python/bncompleter.py +++ b/python/bncompleter.py @@ -1,4 +1,4 @@ -""" This file is a modified version of rlcompleter.py from the Python +sss This file is a modified version of rlcompleter.py from the Python project under the Python Software Foundation License 2: https://github.com/python/cpython/blob/master/Lib/rlcompleter.py https://github.com/python/cpython/blob/master/LICENSE @@ -50,20 +50,11 @@ __all__ = ["Completer"] def fnsignature(obj): - if sys.version_info[0:2] >= (3, 5): - try: - sig = str(inspect.signature(obj)) - except: - sig = "()" - return sig - else: - try: - args = inspect.getargspec(obj).args - args.remove('self') - sig = "(" + ','.join(args) + ")" - except: - sig = "()" - return sig + try: + sig = str(inspect.signature(obj)) + except: + sig = "()" + return sig class Completer: |
