Skip to content

Commit 97c38b9

Browse files
committed
More assert cleanup
1 parent 825abf5 commit 97c38b9

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

asyncssh/connection.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,6 @@ async def send_userauth_success(self) -> None:
20952095
result = self._acceptor(self)
20962096

20972097
if inspect.isawaitable(result):
2098-
assert result is not None
20992098
self.create_task(result)
21002099

21012100
self._acceptor = None
@@ -2606,7 +2605,6 @@ def _process_userauth_success(self, _pkttype: int, _pktid: int,
26062605
result = self._acceptor(self)
26072606

26082607
if inspect.isawaitable(result):
2609-
assert result is not None
26102608
self.create_task(result)
26112609

26122610
self._acceptor = None

asyncssh/sftp.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6317,7 +6317,6 @@ async def _process_readdir(self, packet: SSHPacket) -> _SFTPNames:
63176317
longname_result = self._server.format_longname(name)
63186318

63196319
if inspect.isawaitable(longname_result):
6320-
assert longname_result is not None
63216320
await longname_result
63226321

63236322
result.append(name)

asyncssh/stream.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013-2024 by Ron Frederick <ronf@timeheart.net> and others.
1+
# Copyright (c) 2013-2025 by Ron Frederick <ronf@timeheart.net> and others.
22
#
33
# This program and the accompanying materials are made available under
44
# the terms of the Eclipse Public License v2.0 which accompanies this
@@ -771,7 +771,6 @@ def session_started(self) -> None:
771771

772772
if inspect.isawaitable(handler):
773773
assert self._conn is not None
774-
assert handler is not None
775774
self._conn.create_task(handler, stdin.logger)
776775

777776
def exception_received(self, exc: Exception) -> None:
@@ -824,7 +823,6 @@ def session_started(self) -> None:
824823

825824
if inspect.isawaitable(handler):
826825
assert self._conn is not None
827-
assert handler is not None
828826
self._conn.create_task(handler, reader.logger)
829827

830828

0 commit comments

Comments
 (0)