Skip to content

Conversation

@kiukchung
Copy link
Contributor

Summary:
For python-3.10, support type annotations in component fn arguments using builtin dict, list, tuple types and | for Optional types.

Allows component fn to be typed as:

def foo(env: dict[str, str] | None):
   pass

versus

from typing import Dict, Optional

def foo(env: Optional[Dict[str, str]]):
  pass

Reviewed By: highker

Differential Revision: D81826386

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 9, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D81826386

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D81826386

kiukchung added a commit that referenced this pull request Sep 9, 2025
…for optional types and builtin container types. (#1110)

Summary:
Pull Request resolved: #1110

For python-3.10, support type annotations in component fn arguments using builtin `dict`, `list`, `tuple` types and `|` for Optional types.

Allows component fn to be typed as:

```
def foo(env: dict[str, str] | None):
   pass
```

versus

```
from typing import Dict, Optional

def foo(env: Optional[Dict[str, str]]):
  pass
```

Reviewed By: highker

Differential Revision: D81826386
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D81826386

kiukchung added a commit that referenced this pull request Sep 9, 2025
…for optional types and builtin container types. (#1110)

Summary:
Pull Request resolved: #1110

For python-3.10, support type annotations in component fn arguments using builtin `dict`, `list`, `tuple` types and `|` for Optional types.

Allows component fn to be typed as:

```
def foo(env: dict[str, str] | None):
   pass
```

versus

```
from typing import Dict, Optional

def foo(env: Optional[Dict[str, str]]):
  pass
```

Reviewed By: highker

Differential Revision: D81826386
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D81826386

kiukchung added a commit that referenced this pull request Sep 9, 2025
…for optional types and builtin container types. (#1110)

Summary:
Pull Request resolved: #1110

For python-3.10, support type annotations in component fn arguments using builtin `dict`, `list`, `tuple` types and `|` for Optional types.

Allows component fn to be typed as:

```
def foo(env: dict[str, str] | None):
   pass
```

versus

```
from typing import Dict, Optional

def foo(env: Optional[Dict[str, str]]):
  pass
```

Reviewed By: highker

Differential Revision: D81826386
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D81826386

kiukchung added a commit that referenced this pull request Sep 9, 2025
…for optional types and builtin container types. (#1110)

Summary:
Pull Request resolved: #1110

For python-3.10, support type annotations in component fn arguments using builtin `dict`, `list`, `tuple` types and `|` for Optional types.

Allows component fn to be typed as:

```
def foo(env: dict[str, str] | None):
   pass
```

versus

```
from typing import Dict, Optional

def foo(env: Optional[Dict[str, str]]):
  pass
```

Reviewed By: highker

Differential Revision: D81826386
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D81826386

kiukchung added a commit that referenced this pull request Sep 10, 2025
…for optional types and builtin container types. (#1110)

Summary:
Pull Request resolved: #1110

For python-3.10, support type annotations in component fn arguments using builtin `dict`, `list`, `tuple` types and `|` for Optional types.

Allows component fn to be typed as:

```
def foo(env: dict[str, str] | None):
   pass
```

versus

```
from typing import Dict, Optional

def foo(env: Optional[Dict[str, str]]):
  pass
```

Reviewed By: highker

Differential Revision: D81826386
kiukchung added a commit that referenced this pull request Sep 10, 2025
…for optional types and builtin container types. (#1110)

Summary:

For python-3.10, support type annotations in component fn arguments using builtin `dict`, `list`, `tuple` types and `|` for Optional types.

Allows component fn to be typed as:

```
def foo(env: dict[str, str] | None):
   pass
```

versus

```
from typing import Dict, Optional

def foo(env: Optional[Dict[str, str]]):
  pass
```

Reviewed By: highker

Differential Revision: D81826386
kiukchung added a commit that referenced this pull request Sep 10, 2025
…for optional types and builtin container types. (#1110)

Summary:

For python-3.10, support type annotations in component fn arguments using builtin `dict`, `list`, `tuple` types and `|` for Optional types.

Allows component fn to be typed as:

```
def foo(env: dict[str, str] | None):
   pass
```

versus

```
from typing import Dict, Optional

def foo(env: Optional[Dict[str, str]]):
  pass
```

Reviewed By: highker

Differential Revision: D81826386
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D81826386

kiukchung added a commit that referenced this pull request Sep 10, 2025
…for optional types and builtin container types. (#1110)

Summary:
Pull Request resolved: #1110

For python-3.10, support type annotations in component fn arguments using builtin `dict`, `list`, `tuple` types and `|` for Optional types.

Allows component fn to be typed as:

```
def foo(env: dict[str, str] | None):
   pass
```

versus

```
from typing import Dict, Optional

def foo(env: Optional[Dict[str, str]]):
  pass
```

Reviewed By: highker

Differential Revision: D81826386
…for optional types and builtin container types. (#1110)

Summary:
Pull Request resolved: #1110

For python-3.10, support type annotations in component fn arguments using builtin `dict`, `list`, `tuple` types and `|` for Optional types.

Allows component fn to be typed as:

```
def foo(env: dict[str, str] | None):
   pass
```

versus

```
from typing import Dict, Optional

def foo(env: Optional[Dict[str, str]]):
  pass
```

Reviewed By: highker

Differential Revision: D81826386
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D81826386

@facebook-github-bot facebook-github-bot merged commit 456bde8 into main Sep 10, 2025
22 of 24 checks passed
@facebook-github-bot facebook-github-bot deleted the export-D81826386 branch September 10, 2025 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants