Skip to content

Commit

Permalink
Ahh, it does exist on 3.10, let's see of mypy on 3.10 likes it, too
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed Dec 12, 2023
1 parent 917c309 commit bc33edb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fontra/core/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from functools import partial
from http.cookies import SimpleCookie
from importlib import resources
from importlib.abc import Traversable
from importlib.metadata import entry_points
from typing import Any, Optional
from urllib.parse import quote
Expand Down Expand Up @@ -304,7 +305,7 @@ def addVersionTokenToReferences(data: bytes, versionToken, extensions) -> bytes:
return re.sub(pattern, repl, data)


def getResourcePath(modulePath: str, resourceName: str) -> Any:
def getResourcePath(modulePath: str, resourceName: str) -> Traversable:
moduleParts = modulePath.split(".")
moduleRoot = resources.files(moduleParts[0])
return moduleRoot.joinpath(*moduleParts[1:], resourceName)
Expand Down

0 comments on commit bc33edb

Please sign in to comment.