Skip to content

Commit 0ae5af0

Browse files
authored
Merge pull request #288 from EasyPost/lint-target
fix: lint target
2 parents d7f6bd7 + 01f9d83 commit 0ae5af0

File tree

4 files changed

+15
-20
lines changed

4 files changed

+15
-20
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
python-version: '3.11'
1818
- name: Install Dependencies
1919
run: make install
20-
- name: Check format
21-
run: make format-check
20+
- name: Lint
21+
run: make lint
2222
run-tests:
2323
runs-on: ubuntu-latest
2424
strategy:
@@ -39,7 +39,7 @@ jobs:
3939
uses: coverallsapp/github-action@master
4040
with:
4141
github-token: ${{ secrets.GITHUB_TOKEN }}
42-
path-to-lcov: "./coverage.lcov"
42+
path-to-lcov: './coverage.lcov'
4343
- name: Run security analysis
4444
run: make scan
4545
docs:

Makefile

+9-9
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,9 @@ coverage:
3333
docs:
3434
$(VIRTUAL_BIN)/pdoc $(PROJECT_NAME) -o docs
3535

36-
## format - Runs all formatting tools against the project
37-
format: black isort
38-
39-
## format-check - Checks if the project is formatted correctly against all formatting rules
40-
format-check: black-check isort-check lint mypy
36+
## flake8 - Lint the project with flake8
37+
flake8:
38+
$(VIRTUAL_BIN)/flake8 $(PROJECT_NAME)/ $(TEST_DIR)/ --append-config examples/style_guides/python/.flake8
4139

4240
## install - Install the project locally
4341
install: | update-examples-submodule
@@ -57,9 +55,11 @@ isort:
5755
isort-check:
5856
$(VIRTUAL_BIN)/isort $(PROJECT_NAME)/ $(TEST_DIR)/ --settings-file examples/style_guides/python/pyproject.toml --check-only
5957

60-
## lint - Lint the project
61-
lint:
62-
$(VIRTUAL_BIN)/flake8 $(PROJECT_NAME)/ $(TEST_DIR)/ --append-config examples/style_guides/python/.flake8
58+
## lint - Run linters on the project
59+
lint: black-check isort-check flake8 mypy scan
60+
61+
## lint-fix - Runs all formatting tools against the project
62+
lint-fix: black isort
6363

6464
## mypy - Run mypy type checking on the project
6565
mypy:
@@ -82,4 +82,4 @@ scan:
8282
test:
8383
$(VIRTUAL_BIN)/pytest
8484

85-
.PHONY: help black black-check build clean coverage docs format format-check install isort isort-check lint mypy publish release scan test update-examples-submodule
85+
.PHONY: help black black-check build clean coverage docs flake8 install isort isort-check lint lint-fix mypy publish release scan test

README.md

+2-7
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,10 @@ make install
8484

8585
# Lint project
8686
make lint
87-
88-
# Format project
89-
make format
87+
make lint-fix
9088

9189
# Run tests
9290
EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... make test
93-
94-
# Run test coverage
9591
EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... make coverage
9692

9793
# Run security analysis
@@ -101,8 +97,7 @@ make scan
10197
make docs
10298

10399
# Update submodules
104-
git submodule init
105-
git submodule update --remote
100+
make update-examples-submodule
106101
```
107102

108103
### Testing

examples

0 commit comments

Comments
 (0)