sunank200 commented on code in PR #58188:
URL: https://github.com/apache/airflow/pull/58188#discussion_r2516974288
##########
airflow-core/src/airflow/configuration.py:
##########
@@ -758,10 +758,29 @@ def restore_core_default_configuration(self) -> None:
self._default_values =
create_default_config_parser(self.configuration_description)
self._providers_configuration_loaded = False
+ @property
+ def _validators(self) -> list[Callable[[], None]]:
Review Comment:
You’re right that without a setter, you can’t directly reassign _validators.
The brittleness isn’t about reassignment - it’s about mutation and intent.
Even though there’s no setter, returning a list still gives anyone holding
the reference full write access. They can append, remove, or reorder validators
in place, and Python won’t stop them. That’s not likely in your own code, but
it’s easy for a subclass or external caller to do by accident.
Returning Tuple would fix this. But again this is nits
--
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]