Skip to content

Commit

Permalink
Fix: Fix return type of CMakeVErsionParser._tokenize method
Browse files Browse the repository at this point in the history
The method is just an iterator.
  • Loading branch information
bjoernricks authored and greenbonebot committed Jan 18, 2024
1 parent 53ddf6b commit 38479f9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pontos/version/commands/_cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


import re
from typing import Generator, Literal, Optional, Tuple, Union
from typing import Iterator, Literal, Optional, Tuple, Union

from .._errors import VersionError
from .._version import Version, VersionUpdate
Expand Down Expand Up @@ -189,11 +189,7 @@ def is_dev_version(self) -> bool:

def _tokenize( # type: ignore
self, content: str
) -> Generator[
Tuple[int, str, str],
Tuple[int, str, str],
Tuple[int, str, str],
]:
) -> Iterator[Tuple[int, str, str]]:
toks, remainder = self.__cmake_scanner.scan(content)
if remainder != "":
print(f"WARNING: unrecognized cmake tokens: {remainder}")
Expand Down

0 comments on commit 38479f9

Please sign in to comment.