New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 compatiblity for ps-matrix (argparse, print, dict) #54

Merged
merged 2 commits into from May 31, 2018

Conversation

Projects
None yet
2 participants
@rakhimov
Contributor

rakhimov commented May 29, 2018

This is initial cleanup for ps-matrix with Python 3 goodies.

One unfortunate problem is that ps-matrix chose -h flag for hand-column,
but it is reserved for help,
so better think of an alternative.
I currently set it to -p for pocket as a workaround.
There doesn't seem to be any tests for this module.

epilog='The columns need to be space separated.',
formatter_class=ap.ArgumentDefaultsHelpFormatter)
parser.add_argument(
'-p', # '-h' conflicts w/ --help, so '-p' is for pocket.

This comment has been minimized.

@andrewprock

andrewprock May 31, 2018

Owner

For the purposes of maintaining compatibility with other scripts we should disable the -h default.

See: https://stackoverflow.com/a/14951061/132401

rakhimov added some commits May 29, 2018

Replace getopt with argparse in ps-matrix
Print statements are turned into functions for consistency.
Cleanup ps-matrix with prospector (pylint, pep8)
This is for a better compatibility with python 3.
@rakhimov

This comment has been minimized.

Contributor

rakhimov commented May 31, 2018

'-h' is set back to represent '--hand-column'.
For help, the previous '-?' is restored.

@andrewprock andrewprock merged commit fe40d02 into andrewprock:master May 31, 2018

@rakhimov rakhimov deleted the rakhimov:ps-matrix branch May 31, 2018

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