microsoft / microsoft/FLAML

Allow modern annotation types in the codebase

Open
#907 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Jupyter Notebook
Stars
4.4k
Forks
565
Avg merge
5d 8m
Merged PRs (30d)
17

Description

In general, some degree of type annotation in the code would be useful for newcomers to understand the inner working on flaml better. Opening this to hear your thoughts on this matter.

Modern python annotation can postpone the evaluation of annotation - [see example](https://stackoverflow.com/questions/61544854/from-future-import-annotations). I just wonder if one should be allowed to import `annotation` as needed - and kickstart type annotation while working on a specific part of the code (as I originally assumed in #894) or if that has wider consequences on the development and should be done on a module basis, as @ZviBaratz suggests.

> @coffepowered do you mean enabling modern annotation types without importing `annotations` from `__future__` within each module? Unfortunately, I don't know of any way of doing that. However, I do think importing `annotations` and updating the typing would make for a good PR. Probably best to do it module-by-module though, otherwise it would very difficult to review.

_Originally posted by @ZviBaratz in https://github.com/microsoft/FLAML/pull/894#discussion_r1090243070_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.