Skip to content

Comments

Fix annotation for ast.alias.name#11364

Merged
AlexWaygood merged 1 commit intomainfrom
AlexWaygood-patch-1
Feb 5, 2024
Merged

Fix annotation for ast.alias.name#11364
AlexWaygood merged 1 commit intomainfrom
AlexWaygood-patch-1

Conversation

@AlexWaygood
Copy link
Member

This isn't necessarily always an identifier:

>>> print(ast.dump(ast.parse('from typing import *'), indent=2))
Module(
  body=[
    ImportFrom(
      module='typing',
      names=[
        alias(name='*')],
      level=0)],
  type_ignores=[])
>>> '*'.isidentifier()
False

This isn't necessarily always an identifier:

```pycon
>>> print(ast.dump(ast.parse('from typing import *'), indent=2))
Module(
  body=[
    ImportFrom(
      module='typing',
      names=[
        alias(name='*')],
      level=0)],
  type_ignores=[])
>>> '*'.isidentifier()
False
```
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2024

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@AlexWaygood AlexWaygood merged commit a2a6aee into main Feb 5, 2024
@AlexWaygood AlexWaygood deleted the AlexWaygood-patch-1 branch February 5, 2024 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants