Skip to content

Commit

Permalink
Added support for final classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Wilkens authored and Jonas Wilkens committed Jun 24, 2021
1 parent aa6e581 commit f8caee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def parse_file(path: pathlib.Path, package_set: set, import_set: set, content: l
import_set.add(line)

# Its a class definition, remove the visibility modifier
elif (class_definition_match := re.match(r"\s*(public|private|protected)\s+((abstract\s+)?(class|enum|interface).*\n)", line)):
elif (class_definition_match := re.match(r"\s*(public|private|protected)\s+(((abstract|final)\s+)?(class|enum|interface).*\n)", line)):
content.append(class_definition_match.groups()[1])

# Anythin else just add to content if not whitespace
Expand Down

0 comments on commit f8caee6

Please sign in to comment.