Skip to content

chore(types): fix wrong type - #295

Merged
jfcherng merged 4 commits into
masterfrom
fix/types
Jul 2, 2026
Merged

chore(types): fix wrong type#295
jfcherng merged 4 commits into
masterfrom
fix/types

Conversation

@rchl

@rchl rchl commented Jun 30, 2026

Copy link
Copy Markdown
Member

Those type errors don't show up normally because this package doesn't use good stubs for mdpopups but it does show up when using LSP stubs.

/usr/local/workspace/lsp/lsp_maintainers/repositories/LSP-copilot/plugin/ui/chat.py
  /usr/local/workspace/lsp/lsp_maintainers/repositories/LSP-copilot/plugin/ui/chat.py:185:42 - error: Argument of type "Sheet" cannot be assigned to parameter "sheet" of type "HtmlSheet" in function "update_html_sheet"
    "Sheet" is not assignable to "HtmlSheet" (reportArgumentType)
/usr/local/workspace/lsp/lsp_maintainers/repositories/LSP-copilot/plugin/ui/completion.py
  /usr/local/workspace/lsp/lsp_maintainers/repositories/LSP-copilot/plugin/ui/completion.py:242:13 - warning: No parameter named "layout" (reportCallIssue)

Comment thread plugin/ui/chat.py
self.manager.window.run_command("hide_panel")
if self.manager.original_layout:
self.window.set_layout(self.manager.original_layout)
self.window.set_layout(self.manager.original_layout) # pyright: ignore[reportArgumentType]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a problem when testing in LSP repo - https://github.com/sublimelsp/LSP/actions/runs/28530627354/job/84578855392

The types of ST layout are:

  • custom Layout in LSP-copilot stubs
  • dict[str, Any] in LSP stubs
  • dict[str, Value] in ST's own types

So it's all a mess that's why I'm just ignoring those issues.

@jfcherng

jfcherng commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

@jfcherng
jfcherng merged commit 3ee51b7 into master Jul 2, 2026
2 checks passed
@jfcherng
jfcherng deleted the fix/types branch July 2, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants