Skip to content

Commit

Permalink
R Use imported names
Browse files Browse the repository at this point in the history
  • Loading branch information
ymilki authored Nov 17, 2023
1 parent 7e45b23 commit dc9b6d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions swagger_spec_validator/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit dc9b6d0

Please sign in to comment.