Skip to content

Commit

Permalink
Enable pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Oct 14, 2020
1 parent 1d86ffd commit d9cc902
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
fail-fast: false
matrix:
include:
- tox_env: lint
- tox_env: py36
- tox_env: py37
- tox_env: py38
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v3.2.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
language_version: python3
Empty file modified ansi2html/converter.py
100755 → 100644
Empty file.
1 change: 1 addition & 0 deletions tests/ansicolor_eix.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@

<span class="ansi38-252 ansi40">Found 5 matches.</span>


</pre>
</body>

Expand Down
2 changes: 1 addition & 1 deletion tests/ansicolor_eix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
[1] "betagarden" /home/sping/__playground/betagarden

Found 5 matches.


Empty file modified tests/test_ansi2html.py
100755 → 100644
Empty file.
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tox]
minversion = 3.9.0
envlist =
lint
py{36,37,38,39}
packaging

Expand All @@ -15,6 +16,16 @@ sitepackages = False
commands =
python -m unittest tests/test_ansi2html.py

[testenv:lint]
description = Runs all linting tasks
commands =
# to run a single linter you can do "pre-commit run flake8"
python -m pre_commit run {posargs:--all}
deps = pre-commit>=1.18.1
extras =
skip_install = true
usedevelop = false

[testenv:packaging]
description =
Do packaging/distribution. If tag is not present or PEP440 compliant upload to
Expand Down

0 comments on commit d9cc902

Please sign in to comment.