From f8caee6f513b7def7b2a5b7cacc94498cbbc0d79 Mon Sep 17 00:00:00 2001 From: Jonas Wilkens Date: Thu, 24 Jun 2021 13:38:06 +0200 Subject: [PATCH] Added support for final classes --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 3103c9d..2ec7db0 100644 --- a/main.py +++ b/main.py @@ -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