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

[INFRA] Python's coding directive is not honored #7569

Closed
3 tasks
mikhail-dr opened this issue Aug 25, 2021 · 0 comments · Fixed by apache/skywalking-eyes#68
Closed
3 tasks

[INFRA] Python's coding directive is not honored #7569

mikhail-dr opened this issue Aug 25, 2021 · 0 comments · Fixed by apache/skywalking-eyes#68
Labels
bug Something isn't working and you are sure it's a bug! good first issue Good first issue for beginners license eye

Comments

@mikhail-dr
Copy link

mikhail-dr commented Aug 25, 2021

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • [X ] Bug
  • Requirement
  • Feature or performance improvement

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 the coding directive, thereby pushing that coding directive further down in the Python file, which makes it useless. the coding directive must either be in the 1st or 2nd line of a Python file:

# coding=utf-8

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

  • Please describe your requirements or improvement suggestions.
@kezhenxu94 kezhenxu94 added bug Something isn't working and you are sure it's a bug! license eye labels Aug 25, 2021
@kezhenxu94 kezhenxu94 added this to the license-eye 0.2.0 milestone Aug 25, 2021
@kezhenxu94 kezhenxu94 added the good first issue Good first issue for beginners label Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working and you are sure it's a bug! good first issue Good first issue for beginners license eye
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants