Skip to content

Commit 2a2c30d

Browse files
Copilotjimisola
andcommitted
fix: use removesuffix("Def") instead of [:-3] for elementKind extraction
Co-authored-by: jimisola <1577689+jimisola@users.noreply.github.com>
1 parent 4b745a3 commit 2a2c30d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/reqstool_python_decorators/processors/decorator_processor.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def get_functions_and_classes(self, file_path: str | os.PathLike, decorator_name
9797
self.req_svc_results.append(
9898
{
9999
"fullyQualifiedName": str(file_path).replace("/", "."),
100-
"elementKind": node.__class__.__name__[:-3].upper(),
100+
"elementKind": node.__class__.__name__.removesuffix("Def").upper(),
101101
"name": node.name,
102102
"decorators": decorators_info,
103103
}

0 commit comments

Comments
 (0)