Skip to content

Commit

Permalink
fix: correct stdout type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Jan 16, 2025
1 parent 6e0b591 commit f9d9d0b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions translation_finder/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@

import sys
from argparse import ArgumentParser
from typing import TYPE_CHECKING, cast
from typing import TYPE_CHECKING, TextIO

from .finder import Finder, PathMockType

if TYPE_CHECKING:
from io import TextIOWrapper
from pathlib import PurePath

from translation_finder.discovery.base import BaseDiscovery
Expand Down Expand Up @@ -54,9 +53,9 @@ def discover(
return results


def cli(stdout: TextIOWrapper | None = None, args: list[str] | None = None) -> int:
def cli(stdout: TextIO | None = None, args: list[str] | None = None) -> int:
"""Execution entry point."""
stdout = stdout if stdout is not None else cast("TextIOWrapper", sys.stdout)
stdout = stdout if stdout is not None else sys.stdout

parser = ArgumentParser(
description="Weblate translation discovery utility.",
Expand Down

0 comments on commit f9d9d0b

Please sign in to comment.