[all-commits] [llvm/llvm-project] 4ed97c: [lldb] Add type hints for gdbclientutils.py when b...

Daniel Sanders via All-commits all-commits at lists.llvm.org
Mon Dec 1 14:23:27 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4ed97c153b6a289256a320238f98b74eaf4844d6
      https://github.com/llvm/llvm-project/commit/4ed97c153b6a289256a320238f98b74eaf4844d6
  Author: Daniel Sanders <daniel_l_sanders at apple.com>
  Date:   2025-12-01 (Mon, 01 Dec 2025)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/gdbclientutils.py

  Log Message:
  -----------
  [lldb] Add type hints for gdbclientutils.py when base class returns Literal[T] (#170182)

Pyright automatically deduces these functions to return `Literal["foo"]`
since the implementation returns "foo". This causes any overload that
returns a different literal or a string to report that they're
overloaded in an incompatible way. By correctly annotating them as
returning str, the overloads can return different strings without this
error

I was encountering these a lot while writing tests for my downstream
target



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list