diff --git a/swagger_spec_validator/common.py b/swagger_spec_validator/common.py index 0144d41..25cefa0 100644 --- a/swagger_spec_validator/common.py +++ b/swagger_spec_validator/common.py @@ -62,8 +62,8 @@ def read_file(file_path: str) -> dict[str, Any]: @lru_cache() def read_resource_file(resource_path: str) -> tuple[dict[str, Any], str]: - ref = importlib.resources.files('swagger_spec_validator') / resource_path - with importlib.resources.as_file(ref) as path: + ref = files('swagger_spec_validator') / resource_path + with as_file(ref) as path: return read_file(path), path