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

[BUG] Missing or unnecessary utf-8 header in .py files #613

Closed
dblock opened this issue Nov 21, 2023 · 6 comments
Closed

[BUG] Missing or unnecessary utf-8 header in .py files #613

dblock opened this issue Nov 21, 2023 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@dblock
Copy link
Member

dblock commented Nov 21, 2023

What is the bug?

In #557 we added UTF-8 headers, but lost them in bcfef11 again. Do we need them?

What is the expected behavior?

Either have them or don't have them, and add a linter that ensures headers are present/not present in all files.

@dblock dblock added bug Something isn't working untriaged Need triage labels Nov 21, 2023
@dblock dblock added bug Something isn't working good first issue Good for newcomers and removed bug Something isn't working untriaged Need triage labels Nov 21, 2023
@samuelorji
Copy link
Contributor

can i pick this up ?

@jayaddison
Copy link
Contributor

Is there some background information about why coding declarations are required in this codebase? My understanding is that UTF-8 is the default for Python source files (ref).

@dblock
Copy link
Member Author

dblock commented Nov 22, 2023

@jayaddison You actually have a point, these might not be required at all. I think when I did #557 I was lazy and didn't actually check and added them because they were in some places. @samuelorji feel free to remove them if that's right. We should probably ensure we have tests that have some UTF-8 in them and that it's decoded properly.

I updated the issue title/description accordingly.

@dblock dblock changed the title [BUG] Missing utf-8 header in .py files [BUG] Missing or unnecessary utf-8 header in .py files Nov 22, 2023
@jayaddison
Copy link
Contributor

Thanks @dblock - yep, unless there is a specific reason to specify UTF-8 for forwards-looking reasons (not that I'd expect Python to change the default any time soon), or for some editor/environmental reason that requires it, I think fewer moving parts (in particular, not needing a lintcheck) could make sense.

I won't touch the code myself given that there's interest from others in it, though I'll try to remember to check back on this in a few weeks/months.

@dblock
Copy link
Member Author

dblock commented Nov 22, 2023

Looks like @samuelorji is picking this up, but don't let us stop you from contributing any time you can @jayaddison!

@jayaddison
Copy link
Contributor

@dblock I think this can now be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants