-
Notifications
You must be signed in to change notification settings - Fork 172
preserve CamelCase #130
base: master
Are you sure you want to change the base?
preserve CamelCase #130
Conversation
Can you squash two commits into one commit? Looks legit. Thanks for the contribution. |
7b0d9f9
to
a6a5f8e
Compare
a6a5f8e
to
f9eb27f
Compare
Done. |
@@ -170,7 +170,7 @@ def test_advanced_add(self): | |||
with open(self.config_file) as f: | |||
# check that property is really flushed out to the config? | |||
content = f.read().encode('ascii') | |||
self.assertIn(b'identityfile "/tmp/idfilecheck.rsa"', content) | |||
self.assertIn(b'IdentityFile "/tmp/idfilecheck.rsa"', content) | |||
self.assertIn(b"stricthostkeychecking yes", content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these (StrictHostKeyChecking and UserKnownHostsFile) not also assert CamelCase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, maybe so. Those look to be coming from --o "StrictHostKeyChecking=yes"
above... which I guess means something like "Add this key val pair".
But really the only part of this project I actually care about is this one file: storm/parsers/ssh_config_parser.py
. Maybe I should just break that file out into a separate micro-repo and close this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I wonder why dump() isn't respecting the camelcase of the --o option. Need to dig into it further, even though it looks like you've got the lower_to_original function implemented there.
I used storm to parse my ssh config file for this tool: https://github.com/JesseAldridge/ssh_fixer
Unfortunately, it seems the CamelCase is lost and the output looks a bit ugly.
Before:
After:
This PR preserves the original casing.