Open WBETHERI opened 2 years ago
I'd be happy to work on a PR for this myself if the author is amenable :)
Sure please go ahead :)
@WBETHERI did you ever get around to this? I could probably do it if you haven't started yet.
@MoleyCode Unfortunately I only got a little ways into working on it before I fell in to some crunch at work and haven't come up for air -- feel free to take it!
Issue: When calling functions such as Spreadsheet.worksheet_by_title(), which return a custom class (such as Worksheet, Spreadsheet), intellisense cannot provide autocomplete intelligently unless you utilize function chaining.
Consider the below:
worksheet = Spreadsheet.worksheet_by_title('Sheet1')
When utilizing the worksheet variable, intellisense doesn't know what to do, seeing it as type 'any'.
Solution:
Add appropriate type annotations to functions that return custom classes.
Example:
def worksheet_by_title(self, title): -> Worksheet
rather thandef worksheet_by_title(self, title):
I'd be happy to work on a PR for this myself if the author is amenable :)