Skip to content

Commit dbd21f1

Browse files
authored
Format with black and isort (#70)
* format with black and isort * move isort config to pyproject.toml
1 parent 4ebe743 commit dbd21f1

File tree

11 files changed

+391
-290
lines changed

11 files changed

+391
-290
lines changed

.github/workflows/lint.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: lint
2+
3+
on:
4+
pull_request:
5+
branches: [master, main]
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: "3.10"
16+
- name: Install Tools
17+
run: |
18+
python -m pip install --upgrade pip
19+
python -m pip install black flake8 isort mypy
20+
- name: Black
21+
run: |
22+
black .
23+
- name: isort
24+
run: |
25+
isort .

bin/stack-config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import pathlib
55
import sys
66

7-
87
prefix = pathlib.Path(__file__).parent.parent.resolve()
98
external = prefix / 'external'
109
sys.path = [prefix.as_posix(), external.as_posix()] + sys.path

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
[build-system]
22
requires = ["setuptools", "wheel"]
33
build-backend = "setuptools.build_meta"
4+
5+
[tool.isort]
6+
profile = "black"
7+
skip = ["external/"]

stackinator/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import logging
22
import re
33

4+
VERSION = "1.1-dev0"
5+
root_logger = logging.getLogger("stackinator")
46

5-
VERSION = '1.1-dev0'
6-
root_logger = logging.getLogger('stackinator')
7-
8-
stackinator_version_info = tuple(re.split(r'\.|-', VERSION))
7+
stackinator_version_info = tuple(re.split(r"\.|-", VERSION))

0 commit comments

Comments
 (0)