Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gajim/common/jingle_ftstates.py')
-rw-r--r--gajim/common/jingle_ftstates.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/gajim/common/jingle_ftstates.py b/gajim/common/jingle_ftstates.py
index a356d20ff..d954c6557 100644
--- a/gajim/common/jingle_ftstates.py
+++ b/gajim/common/jingle_ftstates.py
@@ -15,7 +15,6 @@
from __future__ import annotations
from typing import Any
-from typing import Optional
from typing import TYPE_CHECKING
import logging
@@ -43,7 +42,7 @@ class JingleFileTransferStates:
def __init__(self, jingleft: JingleFileTransfer) -> None:
self.jft = jingleft
- def action(self, args: Optional[dict[str, Any]] = None) -> None:
+ def action(self, args: dict[str, Any] | None = None) -> None:
'''
This method MUST be overridden by a subclass
'''
@@ -55,7 +54,7 @@ class StateInitialized(JingleFileTransferStates):
This state initializes the file transfer
'''
- def action(self, args: Optional[dict[str, Any]] = None) -> None:
+ def action(self, args: dict[str, Any] | None = None) -> None:
if self.jft.weinitiate:
# update connection's fileprops
self.jft._listen_host()
@@ -93,7 +92,7 @@ class StateCandSent(JingleFileTransferStates):
content.addChild(node=transport)
self.jft.session.send_transport_info(content)
- def action(self, args: Optional[dict[str, Any]] = None) -> None:
+ def action(self, args: dict[str, Any] | None = None) -> None:
self._send_candidate(args)
@@ -120,7 +119,7 @@ class StateCandReceived(JingleFileTransferStates):
# We save the candidate nominated by peer
self.jft.nominated_cand['peer-cand'] = streamhost_used
- def action(self, args: Optional[dict[str, Any]] = None) -> None:
+ def action(self, args: dict[str, Any] | None = None) -> None:
self._recv_candidate(args)
@@ -131,7 +130,7 @@ class StateCandSentAndRecv(StateCandSent, StateCandReceived):
we should execute the action of when we receive or send a candidate.
'''
- def action(self, args: Optional[dict[str, Any]] = None) -> None:
+ def action(self, args: dict[str, Any] | None = None) -> None:
if args['sendCand']:
self._send_candidate(args)
else:
@@ -143,7 +142,7 @@ class StateTransportReplace(JingleFileTransferStates):
This state initiates transport replace
'''
- def action(self, args: Optional[dict[str, Any]] = None) -> None:
+ def action(self, args: dict[str, Any] | None = None) -> None:
self.jft.session.transport_replace()
@@ -230,7 +229,7 @@ class StateTransfering(JingleFileTransferStates):
app.socks5queue.send_file(self.jft.file_props,
self.jft.session.connection.name, mode)
- def action(self, args: Optional[dict[str, Any]] = None) -> None:
+ def action(self, args: dict[str, Any] | None = None) -> None:
if self.jft.transport.type_ == TransportType.IBB:
self._start_ibb_transfer(self.jft.session.connection)
elif self.jft.transport.type_ == TransportType.SOCKS5: