Skip to content

Commit b323581

Browse files
authored
style: format with Black and sort object lists (#143)
* dev: Black and iSort tools added and formatted * fix: change flake8 CI step to lint
1 parent fb5edf4 commit b323581

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+886
-865
lines changed

.flake8

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length = 120
3+
extend-ignore = E203

.github/workflows/ci.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: 'CI'
1+
name: "CI"
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
77

88
jobs:
9-
flake8:
9+
lint:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
@@ -15,14 +15,19 @@ jobs:
1515
with:
1616
python-version: 3.9
1717
- name: install dependencies
18-
run: python -m pip install flake8
18+
run: python -m pip install -r requirements-dev.txt -e .
1919
- name: lint with flake8
2020
run: flake8 --statistics easypost/ tests/ examples/
21+
- name: Check formatting with Black
22+
run: black easypost/ tests/ examples/ --check
23+
- name: Check formatting with iSort
24+
run: isort easypost/ tests/ examples/ --check-only
2125
run-tests:
2226
runs-on: ubuntu-latest
2327
strategy:
2428
matrix:
25-
pythonversion: ['2.7', '3.5', '3.6', '3.7', '3.8', '3.9', 'pypy-2.7', 'pypy-3.6']
29+
pythonversion:
30+
["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy-2.7", "pypy-3.6"]
2631
steps:
2732
- uses: actions/checkout@v2
2833
- name: set up python

0 commit comments

Comments
 (0)