Skip to content
Snippets Groups Projects
Commit c00dcecf authored by Christian Meeßen's avatar Christian Meeßen
Browse files

Remove comments from imports in py files

parent bb3ba5f8
No related branches found
No related tags found
No related merge requests found
......@@ -202,8 +202,8 @@ class Python(LanguageHandler):
# parse all lines with import statements
for line in lines_with_libs_list:
# strip leading whitespaces
line = line.lstrip()
# strip leading/trailing whitespaces and trailing comments
line = line.split("#")[0].strip()
lib_list = []
if line[0:7] == "import ":
# strip import aliases
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment