Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More type hints for Amazon provider #11297

Open
mik-laj opened this issue Oct 6, 2020 · 15 comments
Open

More type hints for Amazon provider #11297

mik-laj opened this issue Oct 6, 2020 · 15 comments
Assignees
Labels
area:providers good first issue kind:task A task that needs to be completed as part of a larger issue provider:amazon AWS/Amazon - related issues

Comments

@mik-laj
Copy link
Member

mik-laj commented Oct 6, 2020

Description

The boto3 used by Amazon provider generates new classes at runtime, so mypy is not aware of types. Luckily, there is a package that has generated type annotations, but we have to install them separately - boto3-stubs
It would be nice for us to check if this library meets our expectations and integrate it with our CI.

CC: @kaxil @mlgruby @coopergillan

Use case / motivation

This will allow us to detect more problems during the static check. It will also provide a better development experience as the IDE will be able to suggest types.

Related Issues

N/A

@mik-laj mik-laj changed the title Strict type hints for Amazon More type hints for Amazon Oct 6, 2020
@mik-laj mik-laj changed the title More type hints for Amazon More type hints for Amazon provider Oct 6, 2020
@mlgruby
Copy link
Contributor

mlgruby commented Oct 6, 2020

Since you mentioned in last issue comment I had a look and it make sense to try it here.

I can have a look.

@kaxil
Copy link
Member

kaxil commented Oct 6, 2020

Since you mentioned in last issue comment I had a look and it make sense to try it here.

I can have a look.

Cool, thanks. Not super important, this can wait if you'd like to work on other Type hints first. Completely up to you :)

@mlgruby
Copy link
Contributor

mlgruby commented Oct 6, 2020

Yup, just gonna do some checks and then switch to other type hints 🙂

@scrambldchannel
Copy link
Contributor

I'm interested in helping with this too, I was just looking at the AWS provider typehints and came across the same library.

@potix2
Copy link
Contributor

potix2 commented Oct 15, 2020

I'm interested in this issue too.

@kaxil
Copy link
Member

kaxil commented Oct 15, 2020

Go for it @potix2 if you would like to create PR, take #11470 as an example

@potix2
Copy link
Contributor

potix2 commented Oct 15, 2020

I'm working on #11531. But I feel it's too large to ask for review. Should I divide into some small requests?

@kaxil
Copy link
Member

kaxil commented Oct 18, 2020

I'm working on #11531. But I feel it's too large to ask for review. Should I divide into some small requests?

Sure got for it

@mik-laj
Copy link
Member Author

mik-laj commented Oct 22, 2020

@potix2 @mlgruby @scrambldchannel I assigned you to this ticket 🐱

@mik-laj
Copy link
Member Author

mik-laj commented Dec 10, 2020

@potix2 @mlgruby @scrambldchannel Do you need any help? If you have any questions about this ticket, I will be happy to explain.

@mlgruby
Copy link
Contributor

mlgruby commented Dec 10, 2020

I have started to work on this, sorry initially got distracted by professional work. I might shout out for help later. But for now I am good.

@potix2
Copy link
Contributor

potix2 commented Dec 16, 2020

I'm working on #10742, but it's a little harder than I expected. After complete it, I'll be back to this issue.

@coopergillan
Copy link
Contributor

@mik-laj - came back to this after seeing a new comment on an old PR: https://github.com/apache/airflow/pull/10164/files#r653685526

It looks like boto3_type_annotations is another option in addition to boto3-stubs as you mention.

Do you have a preference? Do you know if either of these have yet been installed? Guessing no.

@mik-laj
Copy link
Member Author

mik-laj commented Jun 20, 2021

boto3_type_annotations is deprecated. We should use boto3-stubs.

@eladkal eladkal added kind:task A task that needs to be completed as part of a larger issue and removed kind:feature Feature Requests labels May 25, 2022
@Taragolis Taragolis self-assigned this Jan 27, 2023
@Taragolis Taragolis removed their assignment Mar 2, 2023
@Taragolis
Copy link
Contributor

I do not a time and desire to complete this (and other) tasks.
For someone who would like to work on this, implement this one could be nice start point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers good first issue kind:task A task that needs to be completed as part of a larger issue provider:amazon AWS/Amazon - related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants