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

Add type annotations to all methods #280

Closed
t1m0thyj opened this issue Jun 6, 2024 · 2 comments
Closed

Add type annotations to all methods #280

t1m0thyj opened this issue Jun 6, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request priority-low
Milestone

Comments

@t1m0thyj
Copy link
Member

t1m0thyj commented Jun 6, 2024

Python supports type hints in a similar format to TypeScript:
def func(arg: arg_type, optarg: arg_type = default) -> return_type:

They are not used at runtime but can be validated with tools like MyPy which have VS Code integration.

See here for more details: https://realpython.com/python-type-checking/

Support for type annotations was added in Python 3.0 but has been enhanced in minor releases. If we want to take advantage of recent enhancements while continuing to support old versions of Python, we could investigate stripping out type annotations at publish time, but only if they have no value (we should keep them if they behave like .d.ts files) - thanks @zFernand0 for this idea 🙂

@t1m0thyj t1m0thyj added the enhancement New feature or request label Jun 6, 2024
@github-project-automation github-project-automation bot moved this to New Issues in Zowe CLI Squad Jun 6, 2024
Copy link

github-actions bot commented Jun 6, 2024

Thank you for raising this enhancement request.
The community has 90 days to vote on it.
If the enhancement receives at least 5 upvotes, it is added to our development backlog.
If it receives fewer votes, the issue is closed.

@zowe-robot zowe-robot moved this from New Issues to Low Priority in Zowe CLI Squad Jun 10, 2024
@zFernand0 zFernand0 added this to the v1 LTS milestone Jun 11, 2024
@t1m0thyj
Copy link
Member Author

We may be able to partially automate this process with MonkeyType

@github-project-automation github-project-automation bot moved this from Low Priority to Closed in Zowe CLI Squad Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-low
Projects
Status: Closed
Development

No branches or pull requests

4 participants