Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeWithEmad committed Nov 27, 2024
1 parent e0a8991 commit d0116d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tutorwordpress/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,14 @@ def get_template_full_path(package_name: str, *template_path: str) -> str:
# For each file in tutorwordpress/patches,
# apply a patch based on the file's name and contents.
if sys.version_info >= (3, 9):
for path in glob(str(importlib_resources.files("tutorwordpress") / "patches" / "*")):
for path in glob(
str(importlib_resources.files("tutorwordpress") / "patches" / "*")
):
with open(path, encoding="utf-8") as patch_file:
tutor_hooks.Filters.ENV_PATCHES.add_item(
(os.path.basename(path), patch_file.read())
)
else:
else:
for path in glob(
os.path.join(
pkg_resources.resource_filename("tutorwordpress", "patches"),
Expand Down

0 comments on commit d0116d5

Please sign in to comment.