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

Include a functime.type_alias Module #46

Closed
abstractqqq opened this issue Sep 25, 2023 · 0 comments
Closed

Include a functime.type_alias Module #46

abstractqqq opened this issue Sep 25, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@abstractqqq
Copy link
Collaborator

Typing is important. We all agree on that. Here we want to micmic Polars and have a functime specific type_alias module for the following purposes:

  1. Custom typing for more complex and nested types. Right now I don't see any crazy types, but we might need this in the future.
  2. Use Literal types for strategies in function calls instead of str. The advantage of using Literal["a", "b", "c", ..] is that a good linter can tell the user which are the available strategies, and can suggest the strategy based on what the user has typed in. On the other hand, a linter cannot infer anything from strings. (This is similar to Rust Enum, although more basic and only helps the linter, not the Python "compiler" or "interpreter".)
  3. Have a centralized place to initialize constants, some parameters, custom types, instead of having all these stuff scattered around.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants