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

[Feature request] open(encoding='utf-8') #6

Open
Kristinita opened this issue Mar 27, 2017 · 1 comment
Open

[Feature request] open(encoding='utf-8') #6

Kristinita opened this issue Mar 27, 2017 · 1 comment

Comments

@Kristinita
Copy link

1. Request

It would be nice, if package_reviewer will make an error, if function open don't have encoding='utf-8'.

2. Justification

I use Cyrillic symbols. In some packages I get similar behavior.

Cyrillic

I fix it, if I add encoding='utf-8'. Example:

with open(fSandBox, "a") as myfile:

I change to

with open(fSandBox, "a", encoding='utf-8') as myfile:

It fixed problem. I fix it in 4 Sublime Text packages:

Maybe we have it in other Sublime Text packages, hence I think, that it would be nice, if package_reviewer review it.

3. Desirable behavior

Package developer run package_reviewer → if open function doesn't have encoding='utf-8', developer get error in terminal.

Thanks.

@FichteFoll
Copy link
Member

This can only be a warning because the actual semantics of opening a file cannot be known, but it's a possibility once I start analyzing the AST. I have a couple plans for that but don't see myself working on it any time soon.

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

No branches or pull requests

2 participants