Skip to content

Commit

Permalink
Follow BaseHook connection fields method signature in FSHook (#36444)
Browse files Browse the repository at this point in the history
  • Loading branch information
Taragolis committed Dec 27, 2023
1 parent 75faf11 commit f5e5027
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions airflow/hooks/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ class FSHook(BaseHook):
conn_type = "fs"
hook_name = "File (path)"

@staticmethod
def get_connection_form_widgets() -> dict[str, Any]:
@classmethod
def get_connection_form_widgets(cls) -> dict[str, Any]:
"""Return connection widgets to add to connection form."""
from flask_appbuilder.fieldwidgets import BS3TextFieldWidget
from flask_babel import lazy_gettext
from wtforms import StringField

return {"path": StringField(lazy_gettext("Path"), widget=BS3TextFieldWidget())}

@staticmethod
def get_ui_field_behaviour() -> dict[str, Any]:
@classmethod
def get_ui_field_behaviour(cls) -> dict[str, Any]:
"""Return custom field behaviour."""
return {
"hidden_fields": ["host", "schema", "port", "login", "password", "extra"],
Expand Down

0 comments on commit f5e5027

Please sign in to comment.