Skip to content

Commit

Permalink
Adding type ignore to sql hook (apache#46163)
Browse files Browse the repository at this point in the history
  • Loading branch information
amoghrajesh authored Jan 28, 2025
1 parent 031028d commit 3f07d80
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def placeholder(self) -> str:
@property
def insert_statement_format(self) -> str:
"""Return the insert statement format."""
if not self._insert_statement_format:
if self._insert_statement_format is None:
self._insert_statement_format = self.connection_extra.get(
"insert_statement_format", "INSERT INTO {} {} VALUES ({})"
)
Expand All @@ -216,7 +216,7 @@ def insert_statement_format(self) -> str:
@property
def replace_statement_format(self) -> str:
"""Return the replacement statement format."""
if not self._replace_statement_format:
if self._replace_statement_format is None:
self._replace_statement_format = self.connection_extra.get(
"replace_statement_format", "REPLACE INTO {} {} VALUES ({})"
)
Expand All @@ -225,14 +225,14 @@ def replace_statement_format(self) -> str:
@property
def escape_word_format(self) -> str:
"""Return the escape word format."""
if not self._escape_word_format:
if self._escape_word_format is None:
self._escape_word_format = self.connection_extra.get("escape_word_format", '"{}"')
return self._escape_word_format

@property
def escape_column_names(self) -> bool:
"""Return the escape column names flag."""
if not self._escape_column_names:
if self._escape_column_names is None:
self._escape_column_names = self.connection_extra.get("escape_column_names", False)
return self._escape_column_names

Expand Down

0 comments on commit 3f07d80

Please sign in to comment.