Remove unnecessary UTF-8 coding declarations from Python files
🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:
- Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that don’t follow the guidelines won’t be answered.
- Confirm that you’ve read the guidelines in your comment.
Overview
The # -*- coding: utf-8 -*- header was required in Python 2 to declare a source file's encoding. Python 3 defaults to UTF-8, making these declarations unnecessary. 151 files still have them.
Complexity: Low
Target branch: release-v0.19.x
Context
133 of the 151 files are Django migration files under kolibri/core/*/migrations/. The remaining 18 are across docs/conf.py, setup.py, build_tools/i18n/, and various core/plugin modules.
The Change
Remove the # -*- coding: utf-8 -*- line from all Python files that contain it. No other changes to these files are needed.
How to Get There
Find all affected files with:
grep -rl '# -\*- coding: utf-8 -\*-' kolibri/ docs/ setup.py build_tools/
Acceptance Criteria
- [ ] No Python files in the repository contain
# -*- coding: utf-8 -*- - [ ] No other changes to affected files
- [ ] All existing tests pass
🤖 This issue was written with AI assistance, under supervision, review and final edits by [@rtibbles] 🤖
Hi. I'd be happy to work on this, if possible. Thanks.
Hi @manocormen - I'll assign you to this issue for now, and then we can revisit the third - although other contributors may pick it up in the mean time.
hi @rtibbles ,can i work on this issue?
Hi! 👋
Thanks so much for your interest! This issue is already assigned. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues. If there are no unassigned 'help wanted' issues available, please wait until new ones are added.
We really appreciate your willingness to help. 😊
Are you preparing for Google Summer of Code? See our GSoC guidelines.
Fixed in #14215 thank you for your contribution @manocormen!