Skip to content

Commit 3d993c9

Browse files
committed
fix: Use super() instead of name mangling for _parse_join calls
The previous implementation used self.__parse_join() which relies on Python's name mangling and doesn't work correctly. This changes it to use super(Parser, self)._parse_join() which properly calls the parent class method. This fixes the mypy error: Parser has no attribute __parse_join Signed-off-by: Awanish Gupta <awanishgupta159@gmail.com>
1 parent 0c1abe1 commit 3d993c9

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

sqlmesh/core/dialect.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,13 @@ def _parse_join(
325325
macro = _parse_matching_macro(self, "JOIN")
326326
if not macro:
327327
self._retreat(index)
328-
return self.__parse_join(skip_join_token=skip_join_token, parse_bracket=parse_bracket, alias_tokens=alias_tokens) # type: ignore
328+
return super(Parser, self)._parse_join(
329+
skip_join_token=skip_join_token,
330+
parse_bracket=parse_bracket,
331+
alias_tokens=alias_tokens,
332+
)
329333

330-
join = self.__parse_join(skip_join_token=True, alias_tokens=alias_tokens) # type: ignore
334+
join = super(Parser, self)._parse_join(skip_join_token=True, alias_tokens=alias_tokens)
331335
if method:
332336
join.set("method", method.text)
333337
if side:

0 commit comments

Comments
 (0)