Skip to content

Commit b610876

Browse files
committed
revert: rename query printer methods
Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
1 parent 749a2b8 commit b610876

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

CHANGELOG.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ API and behavior changes (including breaking changes) compared to 2.4.x:
5353
* `ReqlAuthError` raises `ValueError` if only host or only port is provided; includes host:port in message if both are provided
5454
* `ReqlTimeoutError` now subclasses `TimeoutError` and mirrors `ReqlAuthError` host/port validation and messaging
5555
* **QueryPrinter (errors.QueryPrinter)**:
56-
* `print_query` -> property `query`
57-
* `print_carrots` -> property `carets`
5856
* Error messages now embed composed query and caret markers
5957
* **Handshake (`rethinkdb.handshake.HandshakeV1_0`)**:
6058
* Uses protected attributes for credentials: `__username`, `__password`

rethinkdb/ast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __str__(self) -> str:
9090
"""
9191
Return the string representation of the query.
9292
"""
93-
return QueryPrinter(self).query
93+
return QueryPrinter(self).print_query()
9494

9595
def __repr__(self) -> str:
9696
"""

rethinkdb/errors.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,14 @@ def __init__(self, root: "RqlQuery", frames: Optional[List[int]] = None) -> None
5858
self.root = root
5959
self.frames: List[int] = frames or []
6060

61-
@property
62-
def query(self) -> str:
61+
def print_query(self) -> str:
6362
"""
6463
Return the composed query.
6564
"""
6665

6766
return "".join(self.__compose_term(self.root))
6867

69-
@property
70-
def carets(self) -> str:
68+
def print_carrots(self) -> str:
7169
"""
7270
Return the carets indicating the location of the failure for the query.
7371
"""
@@ -152,7 +150,7 @@ def __str__(self) -> str:
152150
return self.message
153151

154152
message = self.message.rstrip(".")
155-
return f"{message} in:\n{self.__query_printer.query}\n{self.__query_printer.carets}"
153+
return f"{message} in:\n{self.__query_printer.print_query()}\n{self.__query_printer.print_carrots()}"
156154

157155
def __repr__(self) -> str:
158156
"""

0 commit comments

Comments
 (0)