fix: resolve pyright type errors in api.py and test_api.py
Cast Die.code (_ExitCode) to int before passing to BottleError — Die always holds an int but SystemExit.code is typed as str|int|None in typeshed. Replace untyped lambda with str() as identity for _uniquify_label_headless mock (fixes reportUnknownLambdaType). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,7 @@ class TestStartHeadless(unittest.TestCase):
|
||||
"bot_bottle.api._launch_bottle", return_value=("implementer-abc12", 0)
|
||||
).start()
|
||||
patch(
|
||||
"bot_bottle.api._uniquify_label_headless", side_effect=lambda lbl: lbl
|
||||
"bot_bottle.api._uniquify_label_headless", side_effect=str
|
||||
).start()
|
||||
self.addCleanup(patch.stopall)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user