Liberally accept literal DSN arguments to --dsn#1589
Conversation
|
Findings
No security issues or correctness regressions jumped out in the code paths touched. Suggested next steps
|
9505a68 to
1774657
Compare
mycli/main.py
Outdated
| @click.option("--list-dsn", "list_dsn", is_flag=True, help="list of DSN configured into the [alias_dsn] section of myclirc file.") | ||
| @click.option("-D", "--database", "dbname", help="Database or DSN to use for the connection.") | ||
| @click.option("-d", "--dsn", 'dsn_alias', default="", envvar="DSN", help="DSN alias configured in the ~/.myclirc file, or a full DSN.") | ||
| @click.option("--list-dsn", "list_dsn", is_flag=True, help="list of DSNs configured in the [alias_dsn] section of the ~/.myclirc file.") |
There was a problem hiding this comment.
Maybe change the help to "list of DSN aliases..." to fit with your rename
There was a problem hiding this comment.
Also maybe add an alias command for --list-dsn-aliases or something again to fit with your rename.
There was a problem hiding this comment.
Also maybe add a --dsn-alias alias as well.
There was a problem hiding this comment.
Good point on the help text, will do!
But as to the other two, it isn't a user-visible rename, just a fallback, with an internal variable rename for clarity.
scottnemes
left a comment
There was a problem hiding this comment.
Verified it works as-is. Left some comments for further potential aliases if desired.
1774657 to
77bc723
Compare
Forgive the user for thinking that --dsn can accept a literal DSN in addition to an alias. Internally, recast the confusing variable name "dsn" to "dsn_alias".
77bc723 to
1d7c207
Compare
Description
Forgive the user for thinking that
--dsncan accept a literal DSN in addition to an alias.Internally, recast the confusing variable name
dsntodsn_alias.Checklist
changelog.mdfile.AUTHORSfile (or it's already there).