(self, identifier)
| 777 | complete_tbreak = _complete_location |
| 778 | |
| 779 | def lineinfo(self, identifier): |
| 780 | failed = (None, None, None) |
| 781 | # Input is identifier, may be in single quotes |
| 782 | idstring = identifier.split("'") |
| 783 | if len(idstring) == 1: |
| 784 | # not in single quotes |
| 785 | id = idstring[0].strip() |
| 786 | elif len(idstring) == 3: |
| 787 | # quoted |
| 788 | id = idstring[1].strip() |
| 789 | else: |
| 790 | return failed |
| 791 | if id == '': return failed |
| 792 | parts = id.split('.') |
| 793 | # Protection for derived debuggers |
| 794 | if parts[0] == 'self': |
| 795 | del parts[0] |
| 796 | if len(parts) == 0: |
| 797 | return failed |
| 798 | # Best first guess at file to look at |
| 799 | fname = self.defaultFile() |
| 800 | if len(parts) == 1: |
| 801 | item = parts[0] |
| 802 | else: |
| 803 | # More than one part. |
| 804 | # First is module, second is method/class |
| 805 | f = self.lookupmodule(parts[0]) |
| 806 | if f: |
| 807 | fname = f |
| 808 | item = parts[1] |
| 809 | answer = find_function(item, fname) |
| 810 | return answer or failed |
| 811 | |
| 812 | def checkline(self, filename, lineno): |
| 813 | """Check whether specified line seems to be executable. |
no test coverage detected