Skip to content

Commit c827bfb

Browse files
Fixed Pylance complaints
1 parent 0404446 commit c827bfb

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# documentation root, use os.path.abspath to make it absolute, like shown here.
1919
#
2020

21-
from typing import TYPE_CHECKING
21+
from typing import TYPE_CHECKING, Mapping, Any
2222

2323
import os
2424
from datetime import datetime
@@ -103,7 +103,7 @@
103103
html_sidebars = {
104104
"**": ["about.html", "navigation.html", "relations.html", "searchbox.html"]
105105
}
106-
html_theme_options = {
106+
html_theme_options: Mapping[str, Any] = {
107107
"logo": "GreynirLogo400.png",
108108
"logo_name": False,
109109
"logo_text_align": "center",

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
from glob import glob
4444
from os.path import basename, splitext
4545

46-
from setuptools import find_packages, setup
46+
from setuptools import find_packages
47+
from setuptools import setup # type: ignore
4748

4849

4950
with open("README.md", "r", encoding="utf-8") as fh:

src/reynir/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(
6464
cache: Dict[Any, List[Any]] = {}
6565
self.cache = cache
6666

67-
last = root
67+
last: List[Any] = root
6868
for _ in range(maxsize):
6969
key = object()
7070
cache[key] = last[1] = last = [last, root, key, None]

src/reynir/fastparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ def _load_binary_grammar(cls) -> Any:
674674
raise GrammarError(
675675
"Unable to load binary grammar file {0}".format(fname)
676676
)
677-
return cast(Any, cls._c_grammar)
677+
return cls._c_grammar
678678

679679
def __init__(self, verbose: bool = False, root: Optional[str] = None) -> None:
680680

0 commit comments

Comments
 (0)