-
Notifications
You must be signed in to change notification settings - Fork 95
Closed
Labels
feature requeststatus: needs-triageNew issue, not yet reviewed or categorizedNew issue, not yet reviewed or categorized
Description
Is this a new feature, an improvement, or a change to existing functionality?
Improvement
How would you describe the priority of this feature request?
Medium
Please provide a clear description of problem this feature solves
Allow developers to add type annotations for expressions. This helps improve code clarity and reduce LSP warning/error given that current function signatures have multiple possible return types.
Feature Description
@ct.kernel
def foo(x: ct.Array, y: ct.Array):
# ...
x_exp = ct.exp2(x) # Currently returns ct.Tile | int | float | ScalarProtocol
# Or
x_exp: ct.Tile = ct.exp2(x) # cuda.tile._exception.TileSyntaxError: Unsupported syntax <class 'ast.AnnAssign'>Describe your ideal solution
Given the type annotation is optional and not enforced at runtime, it's acceptable to treat ast.AnnAssign as an ordinary ast.Assign.
Describe any alternatives you have considered
No response
Additional context
No response
Contributing Guidelines
- I agree to follow cuTile Python's contributing guidelines
- I have searched the open feature requests and have found no duplicates for this feature request
Metadata
Metadata
Assignees
Labels
feature requeststatus: needs-triageNew issue, not yet reviewed or categorizedNew issue, not yet reviewed or categorized