Currently the operator allows to set requirement as list that needs to be hard coded.
It would be nice if airflow can support reading from file directly (something similar to how operators read sql file)
tests/operators/test_python.py
self.dag.create_dagrun(
            run_type=DagRunType.MANUAL,
            execution_date=DEFAULT_DATE,
            start_date=DEFAULT_DATE,
            state=State.RUNNING,
            external_trigger=False,
        )
        
        def func(dag):
            
            
            raise RuntimeError(f"Should not be triggered, dag: {dag}")
        python_operator = PythonOperator(
            task_id='python_operator', op_args=[1], python_callable=func, dag=self.dag
        )
        with pytest.raises(ValueError) as ctx:
            python_operator.run(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
        assert 'dag' in str(ctx.value), "'dag' not found in the exception"
    def test_provide_context_does_not_fail(self):