Skip to content

Commit

Permalink
chore: typing
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Dec 19, 2024
1 parent 4ad7b93 commit b3e18bb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/jinjarope/fsspecloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def get_source(
) -> tuple[str, str, Callable[[], bool] | None]:
try:
with self.fs.open(template) as file:
src = file.read().decode()
src = file.read().decode() # pyright: ignore
except FileNotFoundError as e:
raise jinja2.TemplateNotFound(template) from e
path = pathlib.Path(template).as_posix()
Expand Down
2 changes: 1 addition & 1 deletion src/jinjarope/iterfilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def keyfunc(x):
return x

elif isinstance(key, str):
keyfunc = operator.attrgetter(key)
keyfunc = operator.attrgetter(key) # pyright: ignore
else:
keyfunc = key
if sort_groups or natural_sort:
Expand Down
2 changes: 1 addition & 1 deletion src/jinjarope/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def __repr__(self):

def __add__(self, other) -> FileSystemLoader:
ls = [other] if isinstance(other, jinja2.FileSystemLoader) else other.serchpath
return FileSystemLoader([*self.searchpath, *ls])
return FileSystemLoader([*self.searchpath, *ls]) # pyright: ignore

def __bool__(self):
return len(self.searchpath) > 0
Expand Down
2 changes: 1 addition & 1 deletion src/jinjarope/localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


try:
from babel.core import Locale, UnknownLocaleError
from babel.core import Locale, UnknownLocaleError # pyright: ignore
from babel.support import NullTranslations, Translations

HAS_BABEL = True
Expand Down

0 comments on commit b3e18bb

Please sign in to comment.