| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -359,7 +359,8 @@ def __init__(self, interp, config): | |||
| 359 | 359 | self.history = [] | |
| 360 | 360 | self.evaluating = False | |
| 361 | 361 | self.matches_iter = MatchesIterator() | |
| 362 | - self.argspec = None | ||
| 362 | + self.funcprops = None | ||
| 363 | + self.arg_pos = None | ||
| 363 | 364 | self.current_func = None | |
| 364 | 365 | self.highlighted_paren = None | |
| 365 | 366 | self._C = {} | |
@@ -468,8 +469,8 @@ def get_object(self, name): | |||
| 468 | 469 | ||
| 469 | 470 | def get_args(self): | |
| 470 | 471 | """Check if an unclosed parenthesis exists, then attempt to get the | |
| 471 | - argspec() for it. On success, update self.argspec and return True, | ||
| 472 | - otherwise set self.argspec to None and return False""" | ||
| 472 | + argspec() for it. On success, update self.funcprops,self.arg_pos and return True, | ||
| 473 | + otherwise set self.funcprops to None and return False""" | ||
| 473 | 474 | ||
| 474 | 475 | self.current_func = None | |
| 475 | 476 | ||
@@ -532,11 +533,11 @@ def get_args(self): | |||
| 532 | 533 | except AttributeError: | |
| 533 | 534 | return None | |
| 534 | 535 | self.current_func = f | |
| 535 | - | ||
| 536 | - self.argspec = inspection.getargspec(func, f) | ||
| 537 | - if self.argspec: | ||
| 538 | - self.argspec.append(arg_number) | ||
| 536 | + self.funcprops = inspection.getfuncprops(func, f) | ||
| 537 | + if self.funcprops: | ||
| 538 | + self.arg_pos = arg_number | ||
| 539 | 539 | return True | |
| 540 | + self.arg_pos = None | ||
| 540 | 541 | return False | |
| 541 | 542 | ||
| 542 | 543 | def get_source_of_current_name(self): | |
@@ -567,7 +568,7 @@ def get_source_of_current_name(self): | |||
| 567 | 568 | def set_docstring(self): | |
| 568 | 569 | self.docstring = None | |
| 569 | 570 | if not self.get_args(): | |
| 570 | - self.argspec = None | ||
| 571 | + self.funcprops = None | ||
| 571 | 572 | elif self.current_func is not None: | |
| 572 | 573 | try: | |
| 573 | 574 | self.docstring = pydoc.getdoc(self.current_func) | |
@@ -609,7 +610,7 @@ def complete(self, tab=False): | |||
| 609 | 610 | cursor_offset=self.cursor_offset, | |
| 610 | 611 | line=self.current_line, | |
| 611 | 612 | locals_=self.interp.locals, | |
| 612 | - argspec=self.argspec, | ||
| 613 | + argspec=self.funcprops, | ||
| 613 | 614 | current_block='\n'.join(self.buffer + [self.current_line]), | |
| 614 | 615 | complete_magic_methods=self.config.complete_magic_methods, | |
| 615 | 616 | history=self.history) | |
@@ -618,7 +619,7 @@ def complete(self, tab=False): | |||
| 618 | 619 | ||
| 619 | 620 | if len(matches) == 0: | |
| 620 | 621 | self.matches_iter.clear() | |
| 621 | - return bool(self.argspec) | ||
| 622 | + return bool(self.funcprops) | ||
| 622 | 623 | ||
| 623 | 624 | self.matches_iter.update(self.cursor_offset, | |
| 624 | 625 | self.current_line, matches, completer) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments