Skip to content

Commit

Permalink
Remove version check for importlib_resources call.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Jul 5, 2024
1 parent 892f867 commit 4737659
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions repo_helper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,7 @@ def resource(
:param resource: The name of the resource.
"""

if sys.version_info < (3, 7) or sys.version_info >= (3, 11):
return importlib_resources.as_file(importlib_resources.files(package) / os.fspath(resource))
else:
return importlib_resources.path(package, resource)
return importlib_resources.as_file(importlib_resources.files(package) / os.fspath(resource))


base_license_url = RequestsURL("https://raw.githubusercontent.com/licenses/license-templates/master/templates/")
Expand Down

0 comments on commit 4737659

Please sign in to comment.