mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
Apparently only importlib_resources has actually deprecated contents()
This commit is contained in:
@@ -9,12 +9,7 @@ import unittest
|
||||
from typing import Callable, Generator, NoReturn, Sequence, Set, Iterable
|
||||
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from importlib.resources import files
|
||||
|
||||
def contents(package: str) -> Iterable[str]:
|
||||
return (path.name for path in files(package).iterdir())
|
||||
elif sys.version_info < (3, 7):
|
||||
if sys.version_info < (3, 7):
|
||||
from importlib_resources import files
|
||||
|
||||
def contents(package: str) -> Iterable[str]:
|
||||
|
||||
Reference in New Issue
Block a user