-
Notifications
You must be signed in to change notification settings - Fork 680
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
[BUG] Do not use TypeVar to denote the extension of a Flytefile #2870
Comments
We should invest in using |
Hey, I'm looking to make my first open source contribution. Can I work on this? |
Hi @samhita-alla, can I work on this issue? #self-assign |
@alexdt1982 / @aniketh-varma, please feel free to create a PR. It's first-come, first-serve. |
@samhita-alla I opened a PR for this: flyteorg/flytekit#1236 |
What is the origin of the FlyteFile['csv'].extension()
'csv'
FlyteFile[typing.TypeVar('csv')].extension()
'csv'
FlyteFile['tar.gz'].extension()
'tar.gz'
FlyteFile[typing.TypeVar('tar.gz')].extension()
'tar.gz' Would it be appropriate to simply switch using the simple str form and deprecate the |
@eapolinario / @pingsutw ^^^ |
The reason why we use
here's what mypy has to say about this code:
Notice how we can't simpy use a string as a type variable. That's why my initial suggestion to solve this problem was to use |
Describe the bug
Linters like pylint are not happy with the blessed way of defining
FlyteFile
extensions today. A user reported seeing this error when pylint in the sagemaker example:We use this pattern in other places as well, e.g. https://github.com/flyteorg/flytekit/blob/8528268a29a07fe7e9ce9f7f08fea68c41b6a60b/tests/flytekit/unit/core/test_realworld_examples.py#L47 and also in
flytesnacks
.Expected behavior
pylint
should run without warnings.Additional context to reproduce
flytekit
pylint plugins/flytekit-aws-sagemaker/flytekitplugins/awssagemaker/training.py
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: