Skip to content

fix: remove duplicate @staticmethod decorator from _get_pod_namespace in FileTaskHandler#64518

Closed
nagasrisai wants to merge 3 commits intoapache:mainfrom
nagasrisai:fix/remove-duplicate-staticmethod-file-task-handler
Closed

fix: remove duplicate @staticmethod decorator from _get_pod_namespace in FileTaskHandler#64518
nagasrisai wants to merge 3 commits intoapache:mainfrom
nagasrisai:fix/remove-duplicate-staticmethod-file-task-handler

Conversation

@nagasrisai
Copy link
Copy Markdown
Contributor

@nagasrisai nagasrisai commented Mar 31, 2026

While going through the codebase I noticed that _get_pod_namespace in file_task_handler.py has @staticmethod written twice back to back:

@staticmethod
@staticmethod
def _get_pod_namespace(ti: TaskInstance | TaskInstanceHistory):

Python only needs it once. The second application does nothing at runtime, the method behaves exactly the same either way. The duplication just looks odd to anyone reading it, since it suggests something special might be going on when there really isn't.

This removes the extra decorator and leaves the code as it should be.

Closes #64477

The `_get_pod_namespace` method in `FileTaskHandler` had `@staticmethod`
applied twice in a row. Python only needs one to make the method static,
so the second application is redundant. Removing it to keep the code clean
and avoid confusing readers into thinking the duplication is intentional.

Fixes apache#64477
@jroachgolf84
Copy link
Copy Markdown
Collaborator

@nagasrisai, there's already a PR addressing this, and the issue was assigned: #64479

@potiuk potiuk added the duplicate Issue that is duplicated label Apr 1, 2026
@potiuk potiuk closed this Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:logging duplicate Issue that is duplicated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove duplicate @staticmethod in file_task_handler.py

3 participants