Skip to content

Commit

Permalink
Remove Airflow 2.3 compat from PapermillOperator (#34675)
Browse files Browse the repository at this point in the history
  • Loading branch information
Taragolis committed Sep 29, 2023
1 parent bd51200 commit 55fbdfe
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions airflow/providers/papermill/operators/papermill.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,7 @@
class NoteBook(File):
"""Jupyter notebook."""

# For compatibility with Airflow 2.3:
# 1. Use predefined set because `File.template_fields` introduced in Airflow 2.4
# 2. Use old styled annotations because `cattrs` doesn't work well with PEP 604.

template_fields: ClassVar[Collection[str]] = {
"parameters",
*(File.template_fields if hasattr(File, "template_fields") else {"url"}),
}
template_fields: ClassVar[Collection[str]] = {"parameters", *File.template_fields}

type_hint: str | None = "jupyter_notebook"
parameters: dict | None = {}
Expand Down

0 comments on commit 55fbdfe

Please sign in to comment.