From 2a2c30db629b8fb09a8c62868b09aab70c9e5263 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Mar 2026 10:19:29 +0000 Subject: [PATCH] fix: use removesuffix("Def") instead of [:-3] for elementKind extraction Co-authored-by: jimisola <1577689+jimisola@users.noreply.github.com> --- .../processors/decorator_processor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reqstool_python_decorators/processors/decorator_processor.py b/src/reqstool_python_decorators/processors/decorator_processor.py index 9f81d21..a64e496 100644 --- a/src/reqstool_python_decorators/processors/decorator_processor.py +++ b/src/reqstool_python_decorators/processors/decorator_processor.py @@ -97,7 +97,7 @@ def get_functions_and_classes(self, file_path: str | os.PathLike, decorator_name self.req_svc_results.append( { "fullyQualifiedName": str(file_path).replace("/", "."), - "elementKind": node.__class__.__name__[:-3].upper(), + "elementKind": node.__class__.__name__.removesuffix("Def").upper(), "name": node.name, "decorators": decorators_info, }