Concrete implementation of InspectLoader.get_source.
(self, fullname)
| 806 | |
| 807 | |
| 808 | def get_source(self, fullname): |
| 809 | """Concrete implementation of InspectLoader.get_source.""" |
| 810 | path = self.get_filename(fullname) |
| 811 | try: |
| 812 | source_bytes = self.get_data(path) |
| 813 | except OSError as exc: |
| 814 | raise ImportError('source not available through get_data()', |
| 815 | name=fullname) from exc |
| 816 | return decode_source(source_bytes) |
| 817 | |
| 818 | def source_to_code(self, data, path, *, _optimize=-1): |
| 819 | """Return the code object compiled from source. |
nothing calls this directly
no test coverage detected