Skip to content

python LS: some more cleanup#12325

Merged
austin3dickey merged 8 commits intomainfrom
aus/lsp-dead-code
Mar 9, 2026
Merged

python LS: some more cleanup#12325
austin3dickey merged 8 commits intomainfrom
aus/lsp-dead-code

Conversation

@austin3dickey
Copy link
Copy Markdown
Contributor

@austin3dickey austin3dickey commented Mar 6, 2026

Addresses part of #12014, before I make bigger structural changes.

  1. Removes some dead code
  2. Extracts some string-parsing logic into NamedTuple helper classes
  3. Fixes a bug where Series previews wouldn't show in hovers
  4. Pull in Add missing type definitions for chat participant additions and private interfaces #12340 to fix CI from the 1.109 merge

Release Notes

New Features

  • N/A

Bug Fixes

  • N/A

QA Notes

CI should be green; completions/hovers working correctly.

Try completions/hovers for these lines of code:

import pandas as pd

df = pd.DataFrame({"a": [0, 1, 2]})
x = df["a"]
x

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

@austin3dickey austin3dickey changed the title python LS: remove some dead code python LS: some more cleanup Mar 6, 2026
def __init__(self, server: PositronLanguageServer, converter: cattrs.Converter):
super().__init__(server, converter)
# Queue for handling message batching (performance optimization)
self._messages_to_handle: list[Any] = []
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

dead code


def _get_dataframe_column_completions(obj: Any, prefix: str) -> list[types.CompletionItem]:
"""Get column name completions for DataFrame/Series objects."""
"""Get column name completions for DataFrame objects."""
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was never used for series, though I just realized that the _handle_hover() function was mistakenly relying on this to handle series. So I'll fix that in the next commit

Comment thread extensions/positron-python/package.json Outdated
@austin3dickey
Copy link
Copy Markdown
Contributor Author

Okay thanks for your patience, this should be good to review!

Copy link
Copy Markdown
Contributor

@isabelizimm isabelizimm left a comment

Choose a reason for hiding this comment

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

this makes a lot of the document parsing way easier to follow, thanks!! 👾

@austin3dickey austin3dickey merged commit f952b65 into main Mar 9, 2026
43 checks passed
@austin3dickey austin3dickey deleted the aus/lsp-dead-code branch March 9, 2026 15:44
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants