Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
dynamo
Commits
003c4270
Unverified
Commit
003c4270
authored
May 29, 2025
by
Tanmay Verma
Committed by
GitHub
May 29, 2025
Browse files
fix: Fix mypy errors on trtllm examples (#1277)
parent
3e3c3b10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
examples/tensorrt_llm/common/utils.py
examples/tensorrt_llm/common/utils.py
+7
-3
No files found.
examples/tensorrt_llm/common/utils.py
View file @
003c4270
...
...
@@ -21,7 +21,7 @@ import traceback
import
weakref
from
enum
import
Enum
from
queue
import
Queue
from
typing
import
Callable
,
Optional
,
TypedDict
,
Union
from
typing
import
Any
,
Callable
,
Coroutine
,
Optional
,
TypedDict
,
Union
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -54,7 +54,9 @@ class ConversationMessage(TypedDict):
class
ManagedThread
(
threading
.
Thread
):
def
__init__
(
self
,
task
:
Optional
[
Union
[
Callable
[...,
bool
],
weakref
.
WeakMethod
]],
task
:
Optional
[
Union
[
Callable
[...,
Coroutine
[
Any
,
Any
,
bool
]],
weakref
.
WeakMethod
]
],
error_queue
:
Optional
[
Queue
]
=
None
,
name
:
Optional
[
str
]
=
None
,
loop
:
Optional
[
asyncio
.
AbstractEventLoop
]
=
None
,
...
...
@@ -74,7 +76,9 @@ class ManagedThread(threading.Thread):
def
run
(
self
):
while
not
self
.
stop_event
.
is_set
():
task
:
Optional
[
Union
[
Callable
[...,
bool
],
weakref
.
WeakMethod
]]
=
self
.
task
task
:
Optional
[
Union
[
Callable
[...,
Coroutine
[
Any
,
Any
,
bool
]],
weakref
.
WeakMethod
]
]
=
self
.
task
if
isinstance
(
task
,
weakref
.
WeakMethod
):
task
=
task
()
if
task
is
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment