Skip to content

Commit

Permalink
Raise notimplemented for stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
greenape committed Nov 5, 2024
1 parent 7075c4e commit 88990c1
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions flowmachine/flowmachine/core/query_stub.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,26 @@ def __init__(self, deps: list["Query"], qid: str) -> None:
self.deps = deps
self._md5 = qid
super().__init__()
def _make_query(self):
pass

def _make_query(self) -> str:
"""
Not implemented for stub queries.
Raises
------
NotImplementedError
Always, as stub queries cannot generate SQL.
"""
raise NotImplementedError("Stub queries cannot generate SQL")

@property
def column_names(self):
pass
def column_names(self) -> list[str]:
"""
Not implemented for stub queries.
Raises
------
NotImplementedError
Always, as stub queries cannot generate SQL.
"""
raise NotImplementedError("Stub queries cannot provide column names.")

0 comments on commit 88990c1

Please sign in to comment.