Fixes for pylint's C0103 msgid #3071

Merged
merged 134 commits into from Dec 31, 2012

Conversation

Projects
None yet
3 participants
@s0undt3ch
Member

s0undt3ch commented Dec 29, 2012

Here goes quite some pylint fixes, all related to C0103.
Some commits also include PEP8 and indentation fixes.
Most of the indentation should already be in develop. I might have missed some.

Anyway, with these fixes:

Your code has been rated at 8.84/10 (previous run: 8.42/10)

Full PyLint report is here.

The commits were done file by file so we can filter out any unwanted fixes by git rebase or any other method.

Once reviewed, these commit could probably be "merged" into a single commit. @whiteinge or @SEJeff, I might need a git recipe on how to properly make all these commits into a single one preferably without losing commit messages.

Please review and let me know what needs to change.

s0undt3ch added some commits Dec 28, 2012

@thatch45

This comment has been minimized.

Show comment Hide comment
@thatch45

thatch45 Dec 30, 2012

Member

give me a minute to review these :)
I like them in separate commits btw

Member

thatch45 commented Dec 30, 2012

give me a minute to review these :)
I like them in separate commits btw

@s0undt3ch

This comment has been minimized.

Show comment Hide comment
@s0undt3ch

s0undt3ch Dec 30, 2012

Member

You can have all the minutes you want ;)

Let me know how I can later squash these into a single one, or you still prefer them separate?

Pedro Algarvio

----- Reply message -----
De: "Thomas S Hatch" notifications@github.com
Para: "saltstack/salt" salt@noreply.github.com
Cc: "Pedro Algarvio" pedro@algarvio.me
Assunto: [salt] Fixes for pylint's C0103 msgid (#3071)
Data: dom, Dez 30, 2012 05:23
give me a minute to review these :)

I like them in separate commits btw

Reply to this email directly or view it on GitHub.

Member

s0undt3ch commented Dec 30, 2012

You can have all the minutes you want ;)

Let me know how I can later squash these into a single one, or you still prefer them separate?

Pedro Algarvio

----- Reply message -----
De: "Thomas S Hatch" notifications@github.com
Para: "saltstack/salt" salt@noreply.github.com
Cc: "Pedro Algarvio" pedro@algarvio.me
Assunto: [salt] Fixes for pylint's C0103 msgid (#3071)
Data: dom, Dez 30, 2012 05:23
give me a minute to review these :)

I like them in separate commits btw

Reply to this email directly or view it on GitHub.

@SEJeff

This comment has been minimized.

Show comment Hide comment
@SEJeff

SEJeff Dec 31, 2012

Member

Just FYI, do git rebase -i HEAD~${NUM_OF_COMMITS_YOU_WANT_TO_SQUASH} and change the part that says pick into either s or squash. They will then all be squashed together and $EDITOR will open containing the concatenated commit messages of each.

Member

SEJeff commented Dec 31, 2012

Just FYI, do git rebase -i HEAD~${NUM_OF_COMMITS_YOU_WANT_TO_SQUASH} and change the part that says pick into either s or squash. They will then all be squashed together and $EDITOR will open containing the concatenated commit messages of each.

@s0undt3ch

This comment has been minimized.

Show comment Hide comment
@s0undt3ch

s0undt3ch Dec 31, 2012

Member

Thanks @SEJeff! ;)

Member

s0undt3ch commented Dec 31, 2012

Thanks @SEJeff! ;)

@thatch45

This comment has been minimized.

Show comment Hide comment
@thatch45

thatch45 Dec 31, 2012

Member

double quotes in version.py?

Member

thatch45 commented Dec 31, 2012

double quotes in version.py?

@thatch45

This comment has been minimized.

Show comment Hide comment
@thatch45

thatch45 Dec 31, 2012

Member

ok, I am merging this, the fixes all look completely sane

Member

thatch45 commented Dec 31, 2012

ok, I am merging this, the fixes all look completely sane

thatch45 added a commit that referenced this pull request Dec 31, 2012

@thatch45 thatch45 merged commit a601af6 into saltstack:develop Dec 31, 2012

@s0undt3ch

This comment has been minimized.

Show comment Hide comment
@s0undt3ch

s0undt3ch Dec 31, 2012

Member

Dam, missed those double quotes!

Member

s0undt3ch commented Dec 31, 2012

Dam, missed those double quotes!

@thatch45

This comment has been minimized.

Show comment Hide comment
@thatch45

thatch45 Dec 31, 2012

Member

lol
BTW, we should have pylint complain about functions that don't have docstrings, they should all have docstrings

Member

thatch45 commented Dec 31, 2012

lol
BTW, we should have pylint complain about functions that don't have docstrings, they should all have docstrings

@s0undt3ch

This comment has been minimized.

Show comment Hide comment
@s0undt3ch

s0undt3ch Dec 31, 2012

Member

PyLint does complain about missing docstrings :)

Member

s0undt3ch commented Dec 31, 2012

PyLint does complain about missing docstrings :)

@thatch45

This comment has been minimized.

Show comment Hide comment
@thatch45

thatch45 Dec 31, 2012

Member

Travis broke with this merge,
963Traceback (most recent call last):
964 File "/home/travis/builds/saltstack/salt/tests/runtests.py", line 327, in
965 status = run_integration_tests(opts)
966 File "/home/travis/builds/saltstack/salt/tests/runtests.py", line 105, in run_integration_tests
967 with TestDaemon(opts=opts):
968 File "/home/travis/builds/saltstack/salt/tests/integration/init.py", line 220, in enter
969 master = salt.master.Master(self.master_opts)
970 File "/home/travis/builds/saltstack/salt/salt/master.py", line 157, in init
971 SMaster.init(self, opts)
972 File "/home/travis/builds/saltstack/salt/salt/master.py", line 93, in init
973 self.master_key = salt.crypt.MasterKeys(self.opts)
974 File "/home/travis/builds/saltstack/salt/salt/crypt.py", line 91, in init
975 self.key = self.get_keys()
976 File "/home/travis/builds/saltstack/salt/salt/crypt.py", line 108, in __get_keys
977 log.info('Generating keys: {0}'.format(self.opts['pki_dir']))
978 File "/usr/lib/python2.6/logging/__init
.py", line 1056, in info
979 self._log(INFO, msg, args, **kwargs)
980 File "/usr/lib/python2.6/logging/init.py", line 1172, in _log
981 record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)
982 File "/home/travis/builds/saltstack/salt/salt/log.py", line 147, in makeRecord
983 return LoggingLoggerClass.makeRecord(
984NameError: global name 'LoggingLoggerClass' is not defined

Member

thatch45 commented Dec 31, 2012

Travis broke with this merge,
963Traceback (most recent call last):
964 File "/home/travis/builds/saltstack/salt/tests/runtests.py", line 327, in
965 status = run_integration_tests(opts)
966 File "/home/travis/builds/saltstack/salt/tests/runtests.py", line 105, in run_integration_tests
967 with TestDaemon(opts=opts):
968 File "/home/travis/builds/saltstack/salt/tests/integration/init.py", line 220, in enter
969 master = salt.master.Master(self.master_opts)
970 File "/home/travis/builds/saltstack/salt/salt/master.py", line 157, in init
971 SMaster.init(self, opts)
972 File "/home/travis/builds/saltstack/salt/salt/master.py", line 93, in init
973 self.master_key = salt.crypt.MasterKeys(self.opts)
974 File "/home/travis/builds/saltstack/salt/salt/crypt.py", line 91, in init
975 self.key = self.get_keys()
976 File "/home/travis/builds/saltstack/salt/salt/crypt.py", line 108, in __get_keys
977 log.info('Generating keys: {0}'.format(self.opts['pki_dir']))
978 File "/usr/lib/python2.6/logging/__init
.py", line 1056, in info
979 self._log(INFO, msg, args, **kwargs)
980 File "/usr/lib/python2.6/logging/init.py", line 1172, in _log
981 record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)
982 File "/home/travis/builds/saltstack/salt/salt/log.py", line 147, in makeRecord
983 return LoggingLoggerClass.makeRecord(
984NameError: global name 'LoggingLoggerClass' is not defined

@s0undt3ch

This comment has been minimized.

Show comment Hide comment
@s0undt3ch

This comment has been minimized.

Show comment Hide comment
@s0undt3ch

s0undt3ch Dec 31, 2012

Member

Ah yes, the encoding fix didn't got touched by the C0103 fix

Member

s0undt3ch commented Dec 31, 2012

Ah yes, the encoding fix didn't got touched by the C0103 fix

@thatch45

This comment has been minimized.

Show comment Hide comment
@thatch45

thatch45 Dec 31, 2012

Member

Thanks for the update on the docstrings!

Member

thatch45 commented Dec 31, 2012

Thanks for the update on the docstrings!

s0undt3ch added a commit to s0undt3ch/salt that referenced this pull request Dec 31, 2012

@s0undt3ch s0undt3ch deleted the s0undt3ch:hotfix/pylint/C0103 branch Nov 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment