-
Notifications
You must be signed in to change notification settings - Fork 56
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
Linter highlighting #57
Conversation
ea48940
to
174adf4
Compare
174adf4
to
a6e8621
Compare
9d8e8b4
to
0d3b6a4
Compare
0d3b6a4
to
6de2677
Compare
ddec623
to
7f351a2
Compare
7f351a2
to
9f6df30
Compare
9f6df30
to
14c89a8
Compare
24b4c13
to
207aac9
Compare
13e7cf3
to
e7f8ba8
Compare
Here's example output from running coverage.py on the test suite and displaying edited lines with no coverage using cov_to_lint.py as the linter: $ cd ~/darker
$ git checkout 1.0.0
$ coverage run -m pytest -c /dev/null
$ darker --revision 0.1.0.. --check --lint cov_to_lint.py src |
40438e2
to
62b6b50
Compare
62b6b50
to
b78004a
Compare
e23e24d
to
dc504e2
Compare
bc17347
to
4730f3d
Compare
3d396a7
to
1d715f2
Compare
These parts will end up being refactored in #57 anyway.
42cf250
to
0c104c6
Compare
0c104c6
to
fa2bd11
Compare
862d271
to
db9262e
Compare
74fac25
to
43bd973
Compare
Refactor highlighting into its own module and use that also for ``--diff`` highlighting.
- split out code into `darker.highlighting.*` modules - register custom lexers as setuptools plugin entry points - refer to built-in and custom Pygments lexers with names instead of object instances - use `PythonLexer` directly instead of using the legacy `Python3Lexer` backwards-compatibility name - separate dummy and real `colorize()` implementations (for use without and with Pygments, respectively) - no need for "fake Pygments" module - more unit tests
43bd973
to
b86c5b1
Compare
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.67%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
This also refactors highlighting support into a separate module and uses that in
__main__.py
for--diff
output highlighting.