Skip to content

Commit

Permalink
SONARPY-1252 S5886 (FunctionReturnTypeCheck) should consider type ali…
Browse files Browse the repository at this point in the history
…ases (#1661)
  • Loading branch information
maksim-grebeniuk-sonarsource authored Nov 24, 2023
1 parent 6e80de7 commit b9cb0dc
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,13 @@ def conditional_import():

async def my_iterator() -> Iterator[str]:
yield "hello"


def type_aliases():
from typing import Generator
from typing import TypeAlias

StepGenerator: TypeAlias = Generator[str, None, None]
def ordered_steps() -> StepGenerator:
for i in range(10):
yield str(i)

0 comments on commit b9cb0dc

Please sign in to comment.