Skip to content

RE: Code cleanup#2

Merged
rth merged 7 commits intomasterfrom
stephenfin-pr
Nov 28, 2016
Merged

RE: Code cleanup#2
rth merged 7 commits intomasterfrom
stephenfin-pr

Conversation

@rth
Copy link
Copy Markdown

@rth rth commented Nov 28, 2016

Copy of the original PR akuchling#3 by @stephenfin,

I'm using this code in a project of my own. I'm unsure if this project is still maintained but this is a series of changes I made to clean up the code beforehand, should you want to merge it. Unit tests are passing and it works pretty well for my purposed.

Note: I also plan on porting it to Python3 but this will be a later PR. I might also look at expanding the test suite but, again, this will be a later change

Making this a separate PR to make sure that unit tests in Travis CI pass and to rebase on top of PR #1.

stephenfin and others added 7 commits November 28, 2016 15:33
Resolve PEP8 warnings.

Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
Per PEP257, it is not recommended that signatures are given in
docstrings as they may be obtained via introspection. Instead, use the
docstring format suggested by Google Python Style Guide.

Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
Rather than having a function to "make" Message, do the required
actions in the '__init__' function.

This includes minor changes to the unit tests per this change.

Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
Resolve PyLint issues:

 * Invalid variables names
 * Missing docstrings
 * Badly wrapped lines

Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
This package is deprecated and is not available in Python 3. Remove the
tests.

In addition, resolve some immediate PyLint warnings.

Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
Allow user to provide mbox path to 'main' function as an argument to
the executable.

Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
@rth
Copy link
Copy Markdown
Author

rth commented Nov 28, 2016

@stephenfin I was also planning to look into Python 3 support. Would you have any suggestions as to which parts of the tests suite are worth expanding (if you still remember, one year later)? Thanks!

@rth rth merged commit 11b1fd5 into master Nov 28, 2016
@rth rth deleted the stephenfin-pr branch November 28, 2016 14:59
@stephenfin
Copy link
Copy Markdown

@stephenfin I was also planning to look into Python 3 support. Would you have any suggestions as to which parts of the tests suite are worth expanding (if you still remember, one year later)? Thanks!

I'm afraid not - it's been a while. I imagine lots of test cases wouldn't go astray, however.

@rth
Copy link
Copy Markdown
Author

rth commented Nov 28, 2016

@stephenfin True, thanks for the response! By the way, it looks like your PR was mostly PY3 compatible, apart from a single xrange call in unit tests.

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.

2 participants