Skip to content

Commit 9fe80bf

Browse files
committed
ci(travis): black and flake8 checks during test
1 parent 1ce680f commit 9fe80bf

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: python
22
python:
33
- "3.6"
44
- "3.7"
5+
- "3.8"
56
dist: xenial
67
sudo: true
78
install:

commitizen/cz/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from typing import Optional, List, Tuple
21
from abc import ABCMeta, abstractmethod
2+
from typing import List, Optional, Tuple
33

4-
from prompt_toolkit.styles import merge_styles, Style
4+
from prompt_toolkit.styles import Style, merge_styles
55

66

77
class BaseCommitizen(metaclass=ABCMeta):

scripts/test

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
pytest --cov-report term-missing --cov=commitizen tests/
1+
export PREFIX=""
2+
if [ -d 'venv' ] ; then
3+
export PREFIX="venv/bin/"
4+
fi
5+
6+
${PREFIX}pytest --cov-report term-missing --cov=commitizen tests/
7+
${PREFIX}black commitizen tests --check
8+
${PREFIX}flake8 --max-line-length=88 commitizen/ tests/

tests/test_conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"tag_format": None,
4343
"bump_message": None,
4444
"files": ["commitizen/__version__.py", "pyproject.toml"],
45-
"style": [["pointer", "reverse"], ["question", "underline"]]
45+
"style": [["pointer", "reverse"], ["question", "underline"]],
4646
}
4747

4848
_new_config = {
@@ -51,14 +51,14 @@
5151
"tag_format": None,
5252
"bump_message": None,
5353
"files": ["commitizen/__version__.py", "pyproject.toml"],
54-
"style": [["pointer", "reverse"], ["question", "underline"]]
54+
"style": [["pointer", "reverse"], ["question", "underline"]],
5555
}
5656

5757
_read_conf = {
5858
"name": "cz_jira",
5959
"version": "1.0.0",
6060
"files": ["commitizen/__version__.py", "pyproject.toml"],
61-
"style": [["pointer", "reverse"], ["question", "underline"]]
61+
"style": [["pointer", "reverse"], ["question", "underline"]],
6262
}
6363

6464

0 commit comments

Comments
 (0)