Skip to content

Commit 249c2e4

Browse files
authored
Fix LGTM warning about redefined variable (#177)
1 parent b38e834 commit 249c2e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pattern_library/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ def get_pattern_templates():
115115
found_templates.append(template)
116116

117117
if found_templates:
118-
sub_folders = os.path.relpath(root, lookup_dir)
119-
sub_folders = os.path.relpath(sub_folders, path) # TODO improve this
118+
lookup_dir_relpath = os.path.relpath(root, lookup_dir)
119+
sub_folders = os.path.relpath(lookup_dir_relpath, path)
120120
templates_to_store = templates
121121
for folder in [section, *sub_folders.split(os.sep)]:
122122
try:

0 commit comments

Comments
 (0)