Apache Airflow version
3.1.8
What happened and how to reproduce it?
While reviewing the code base, I noticed that the _get_pod_namespace method is decorated with @staticmethod twice. This appears to be redundant, as applying @staticmethod once is sufficient and additional applications do not change behavior.
This does not cause a runtime error, but it introduces unnecessary duplication and may confuse readers or contributors into thinking there is a special reason for the double decoration.
Steps to reproduce
- Navigate to the file containing
_get_pod_namespace
- Locate the method definition:
@staticmethod
@staticmethod
def _get_pod_namespace(ti: TaskInstance | TaskInstanceHistory):
...
- Observe that
@staticmethod is applied twice to the same method.
What you think should happen instead?
This is likely an oversight introduced during a refactor or code edit. Since applying @staticmethod multiple times does not raise an error or change behavior, the duplication would not be caught by tests or linters unless specifically checked.
As a result, the redundant decorator remained in the codebase without affecting functionality, but adds unnecessary duplication and may cause confusion for readers.
Operating System
No response
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
Apache Airflow version
3.1.8
What happened and how to reproduce it?
While reviewing the code base, I noticed that the
_get_pod_namespacemethod is decorated with@staticmethodtwice. This appears to be redundant, as applying@staticmethodonce is sufficient and additional applications do not change behavior.This does not cause a runtime error, but it introduces unnecessary duplication and may confuse readers or contributors into thinking there is a special reason for the double decoration.
Steps to reproduce
_get_pod_namespace@staticmethodis applied twice to the same method.What you think should happen instead?
This is likely an oversight introduced during a refactor or code edit. Since applying
@staticmethodmultiple times does not raise an error or change behavior, the duplication would not be caught by tests or linters unless specifically checked.As a result, the redundant decorator remained in the codebase without affecting functionality, but adds unnecessary duplication and may cause confusion for readers.
Operating System
No response
Versions of Apache Airflow Providers
No response
Deployment
Docker-Compose
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct