We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Specifying an --enc argument results in an error (see below). Therefore, the encoding used to read / write files cannot be changed.
--enc
Call python -m licenseheaders --enc utf8 -f
python -m licenseheaders --enc utf8 -f
An error is raised : TypeError: open() argument 'encoding' must be str or None, not list
TypeError: open() argument 'encoding' must be str or None, not list
See https://github.com/johann-petrak/licenseheaders/blob/master/licenseheaders.py#L412 for reference. The add_argument method for the "--enc" parameter should be called without specifying nargs, as specifying it results in the encoding being wrappend in a list (even for nargs=1).
add_argument
nargs
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Specifying an
--enc
argument results in an error (see below). Therefore, the encoding used to read / write files cannot be changed.To repoduce :
Call
python -m licenseheaders --enc utf8 -f
An error is raised :
TypeError: open() argument 'encoding' must be str or None, not list
How to fix the bug
See https://github.com/johann-petrak/licenseheaders/blob/master/licenseheaders.py#L412 for reference. The
add_argument
method for the "--enc" parameter should be called without specifyingnargs
, as specifying it results in the encoding being wrappend in a list (even for nargs=1).The text was updated successfully, but these errors were encountered: