Skip to content

Commit edd87b4

Browse files
iwishiwasaneagleplatisd
authored andcommitted
Ignore none python files
1 parent be296a9 commit edd87b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

duplicate_code_detection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def run(fail_threshold, directories, files, ignore_directories, ignore_files,
175175
with open(source_code_file, 'r', errors='surrogateescape') as f:
176176
# Store source code with the file path as the key
177177
content = f.read()
178-
if only_code:
178+
if only_code and source_code_file.endswith('py'):
179179
content = remove_comments_and_docstrings(content)
180180
source_code[source_code_file] = content
181181
except Exception as err:

0 commit comments

Comments
 (0)