[INFRA] Python's coding directive is not honored #7569
Labels
bug
Something isn't working and you are sure it's a bug!
good first issue
Good first issue for beginners
license eye
Milestone
Please answer these questions before submitting your issue.
Bug
When running the tool on a large number of Python files, we noticed that, if a Python file happens to have the
coding
directive, the tool seems unaware of it and inserts the copyright statement before thecoding
directive, thereby pushing thatcoding
directive further down in the Python file, which makes it useless. thecoding
directive must either be in the 1st or 2nd line of a Python file:You can find more information on the
coding
directive here: https://www.python.org/dev/peps/pep-0263/#defining-the-encoding, where there is an exact regexp as well. Thanks!Requirement or improvement
The text was updated successfully, but these errors were encountered: