Skip to content

Commit 13325a4

Browse files
dfalbelCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]> Signed-off-by: Daniel Falbel <[email protected]>
1 parent 3abffc5 commit 13325a4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

extensions/positron-python/python_files/posit/positron/connections.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ def __init__(self, conn: Any):
13531353
self.conn = conn
13541354

13551355
try:
1356-
# Unfortunatelly there's no public API to get the host, so we access the protected member.
1356+
# Unfortunately there's no public API to get the host, so we access the protected member.
13571357
# to at least provide some info in the connection display name.
13581358
host, _ = conn._usock.getpeername() # noqa: SLF001
13591359
except AttributeError:
@@ -1514,7 +1514,7 @@ def _make_code(self) -> str:
15141514
"# Authentication steps may be incomplete, adjust as needed.\n"
15151515
"import redshift_connector\n"
15161516
"con = redshift_connector.connect(\n"
1517-
f" iam = True,\n"
1517+
" iam = True,\n"
15181518
f" host = '{self.host}',\n"
15191519
")\n"
15201520
"%connection_show con\n"

extensions/positron-python/python_files/posit/positron/tests/test_connections.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ def test_register_connection(self, connections_service: ConnectionsService):
887887
assert comm_id in connections_service.comms
888888

889889
@pytest.mark.parametrize(
890-
("path_kind"),
890+
"path_kind",
891891
[
892892
pytest.param("root", id="root"),
893893
pytest.param("database", id="database"),
@@ -902,7 +902,7 @@ def test_contains_data(self, connections_service: ConnectionsService, path_kind:
902902
msg = _make_msg(params={"path": path}, method="contains_data", comm_id=comm_id)
903903
dummy_comm.handle_msg(msg)
904904
result = dummy_comm.messages[0]["data"]["result"]
905-
assert result == (path_kind == "table")
905+
assert result is (path_kind == "table")
906906

907907
@pytest.mark.parametrize(
908908
("path_kind", "expected"),

0 commit comments

Comments
 (0)