KengoWada opened a new issue, #64477: URL: https://github.com/apache/airflow/issues/64477
### 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](https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/utils/log/file_task_handler.py) containing `_get_pod_namespace` - Locate the method definition: ```py @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? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
