Skip to content

feat: add colours to text output#368

Merged
mkniewallner merged 8 commits intofpgmaas:mainfrom
mkniewallner:feat/add-style-error-report
May 8, 2023
Merged

feat: add colours to text output#368
mkniewallner merged 8 commits intofpgmaas:mainfrom
mkniewallner:feat/add-style-error-report

Conversation

@mkniewallner
Copy link
Collaborator

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

Follow up on #357 to add colours to the terminal output, similarly to other tools like flake8, ruff or mypy.

A --no-ansi option is also added on the CLI to be able to disable this behaviour, for terminals that do not support ANSI characters, or if users want to opt-out from this.

On Windows, ANSI characters do not work out-of-the-box, so we leverage https://github.com/tartley/colorama to be able to display colours.

@mkniewallner mkniewallner requested a review from fpgmaas May 7, 2023 23:44
@codecov
Copy link

codecov bot commented May 7, 2023

Codecov Report

Merging #368 (d863894) into main (eaf9546) will decrease coverage by 0.3%.
The diff coverage is 89.2%.

@@           Coverage Diff           @@
##            main    #368     +/-   ##
=======================================
- Coverage   96.8%   96.6%   -0.3%     
=======================================
  Files         37      37             
  Lines       1029    1040     +11     
  Branches     206     207      +1     
=======================================
+ Hits         997    1005      +8     
- Misses        20      22      +2     
- Partials      12      13      +1     
Impacted Files Coverage Δ
deptry/imports/location.py 100.0% <ø> (ø)
deptry/cli.py 91.6% <40.0%> (-3.9%) ⬇️
deptry/core.py 98.0% <100.0%> (+<0.1%) ⬆️
deptry/reporters/text.py 100.0% <100.0%> (ø)
deptry/violations/misplaced_dev.py 100.0% <100.0%> (ø)
deptry/violations/missing.py 100.0% <100.0%> (ø)
deptry/violations/obsolete.py 100.0% <100.0%> (ø)
deptry/violations/transitive.py 100.0% <100.0%> (ø)

@mkniewallner mkniewallner added this to the 0.10 milestone May 8, 2023
@mkniewallner mkniewallner merged commit e3608e5 into fpgmaas:main May 8, 2023
@mkniewallner mkniewallner deleted the feat/add-style-error-report branch May 8, 2023 12:25
@fpgmaas fpgmaas mentioned this pull request May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants