Skip to content

Commit

Permalink
more mostly automatic type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed May 28, 2023
1 parent 9a78a13 commit 7c6dfc3
Show file tree
Hide file tree
Showing 126 changed files with 914 additions and 782 deletions.
5 changes: 3 additions & 2 deletions xpra/audio/sink.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/usr/bin/env python3
# This file is part of Xpra.
# Copyright (C) 2010-2022 Antoine Martin <[email protected]>
# Copyright (C) 2010-2023 Antoine Martin <[email protected]>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

import sys
from time import monotonic
from collections import deque
from threading import Lock
from typing import Dict
from gi.repository import GObject # @UnresolvedImport

from xpra.audio.audio_pipeline import AudioPipeline
Expand Down Expand Up @@ -342,7 +343,7 @@ def eos(self):
self.cleanup()
return GST_FLOW_OK

def get_info(self) -> dict:
def get_info(self) -> Dict:
info = super().get_info()
if QUEUE_TIME>0 and self.queue:
clt = self.queue.get_property("current-level-time")
Expand Down
3 changes: 2 additions & 1 deletion xpra/audio/src.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import os.path
from queue import Queue
from time import monotonic
from typing import Dict
from gi.repository import GObject # @UnresolvedImport

from xpra.os_util import SIGNAMES
Expand Down Expand Up @@ -184,7 +185,7 @@ def cleanup(self):
self.sink = None
self.caps = None

def get_info(self) -> dict:
def get_info(self) -> Dict:
info = super().get_info()
if self.queue:
info["queue"] = {"cur" : self.queue.get_property("current-level-time")//MS_TO_NS}
Expand Down
5 changes: 3 additions & 2 deletions xpra/audio/wrapper.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# This file is part of Xpra.
# Copyright (C) 2015-2020 Antoine Martin <[email protected]>
# Copyright (C) 2015-2023 Antoine Martin <[email protected]>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

import os
import sys
from time import monotonic
from collections import namedtuple
from typing import Dict

from xpra.gst_common import import_gst, format_element_options
from xpra.audio.gstreamer_util import (
Expand Down Expand Up @@ -299,7 +300,7 @@ def get_state(self):
return self.state


def get_info(self) -> dict:
def get_info(self) -> Dict:
return self.info

def info_update(self, _wrapper, info):
Expand Down
Loading

0 comments on commit 7c6dfc3

Please sign in to comment.