Skip to content
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

Address Pylint new unspecified-encoding warning #1532

Merged
merged 1 commit into from Aug 23, 2021

Conversation

MVrachev
Copy link
Collaborator

@MVrachev MVrachev commented Aug 23, 2021

Description of the changes being introduced by the pull request:

A new warning appeared from pylint when calling "tox -e lint" on the
"develop" branch with id "unspecified-encoding".
I read about the warning and it makes sense, so maybe we shouldn't ignore it?
I chose UTF8 as a parameter because it made sense to me at least.

Read more about the warning here:
pylint-dev/pylint#3826

Signed-off-by: Martin Vrachev mvrachev@vmware.com

Please verify and check that the pull request fulfills the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

A new warning appeared from pylint when calling "tox -e lint" on the
"develop" branch with id "unspecified-encoding",
I read about the warning and it make sense.

Read more about the warning here:
pylint-dev/pylint#3826

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Copy link
Contributor

@sechkova sechkova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recommended solution by PEP 597, encoding='locale' is not available before python 3.10 so I guess utf-8 "makes sense".

Copy link
Member

@jku jku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. In other code (like Metadata API) we're explicitly encoding data to utf-8 (bytes) then using binary mode to write -- but this seems like a fine fix for these cases.

@jku jku merged commit f4ffb9d into theupdateframework:develop Aug 23, 2021
@MVrachev MVrachev deleted the pylint-warning branch August 25, 2021 18:27
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.

None yet

3 participants