mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
3.13 removed the simpler importlib.resources api
This commit is contained in:
parent
762e68173b
commit
75f2710bd4
2 changed files with 4 additions and 2 deletions
|
|
@ -25,7 +25,8 @@ run_hook = lang_base.basic_run_hook
|
|||
|
||||
|
||||
def _resource_bytesio(filename: str) -> IO[bytes]:
|
||||
return importlib.resources.open_binary('pre_commit.resources', filename)
|
||||
files = importlib.resources.files('pre_commit.resources')
|
||||
return files.joinpath(filename).open('rb')
|
||||
|
||||
|
||||
@functools.lru_cache(maxsize=1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue