Skip to content

Conversation

@andyscho
Copy link
Contributor

@andyscho andyscho commented Jan 2, 2026

Add a baselineMode extension setting at the workspace level for auto | discard. Not including lock or other settings for now since the behavior it would have in the extension is less clear to me, and --baselinemode is referenced as experimental in the cli documentation. So it seems fine to be less aggressive with exposing modes to users here.

Default behaviors are unchanged (still defaults to auto).

This satisfies the first part of the proposal in #1692.

Users using discard in the extension may want to include a pre-commit hook running basedpyright with a different baselinemode (i.e. auto or no --baselinemode/--writebaseline flag) to get rid of baslined errors that are no longer relevant.

This intentionally does not address #1524 yet, though there's no reason why it can't be included later.

Copy link
Owner

@DetachHead DetachHead left a comment

Choose a reason for hiding this comment

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

thanks for the contribution!

@DetachHead
Copy link
Owner

Users using discard in the extension may want to include a pre-commit hook running basedpyright with a different baselinemode (i.e. auto or no --baselinemode/--writebaseline flag) to get rid of baslined errors that are no longer relevant.

i think this is something we can just document as a tip for users who want this behavior, rather than something integrated into the language server (i'm not sure how that would even work)

@github-actions

This comment has been minimized.

@andyscho
Copy link
Contributor Author

andyscho commented Jan 3, 2026

i think this is something we can just document as a tip for users who want this behavior, rather than something integrated into the language server (i'm not sure how that would even work)

i think this is something we can just document as a tip for users who want this behavior, rather than something integrated into the language server (i'm not sure how that would even work)

Agreed. It was more of a suggestion for users. I made a change to put the suggestion into the documentation (plus some other changes), let me know what you think.

@DetachHead DetachHead linked an issue Jan 3, 2026 that may be closed by this pull request
Co-authored-by: DetachHead <[email protected]>
@DetachHead DetachHead merged commit 2724305 into DetachHead:main Jan 3, 2026
14 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2026

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

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.

Undone user python file changes do not undo changes to baseline file

2 participants