Skip to content

Don't rewrite ~/.myclirc quotes on /dsn save - #2094

Merged
rolandwalker merged 1 commit into
mainfrom
RW/avoid-rewriting-myclirc-quoting-dsns
Aug 4, 2026
Merged

Don't rewrite ~/.myclirc quotes on /dsn save#2094
rolandwalker merged 1 commit into
mainfrom
RW/avoid-rewriting-myclirc-quoting-dsns

Conversation

@rolandwalker

@rolandwalker rolandwalker commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

The user's own quoting, or lack of quoting, could be rewritten if saving or deleting a DSN alias via the REPL. If the dotfile is kept under revision control, this can create needless churn.

Moves implementation of manual triplequoting from favorite queries to the ConfigObj subclass. The previous implementation only guaranteed maintaining triplequotes within favorite queries, during a favorite queries save.

There is one limitation explained in the docstring: the style of any triplequoted multiline value cannot be maintained perfectly.

xref #2092

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

The user's own quoting, or lack of quoting, could be rewritten if saving
or deleting a DSN alias via the REPL.  If the dotfile is kept under
revision control, this can create needless churn.

Moves implementation of manual triplequoting from favorite queries to
the ConfigObj subclass.  The previous implementation only guaranteed
maintaining triplequotes within favorite queries, during a favorite
queries save.

There is one limitation explained in the docstring: the style of any
triplequoted multiline value cannot be maintained perfectly.
@rolandwalker rolandwalker self-assigned this Aug 4, 2026
@rolandwalker
rolandwalker merged commit 8f79605 into main Aug 4, 2026
11 checks passed
@rolandwalker
rolandwalker deleted the RW/avoid-rewriting-myclirc-quoting-dsns branch August 4, 2026 11:05
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.

1 participant