Skip to content

Commit 5d15063

Browse files
committed
Add "make lint" to lint without auto-formatting
As on CI and with tox (but not having to build and create and use a tox environment). This may not be the best way to do it, since currently the project's makefiles are otherwise used only for things directly related to building and publishing. However, this seemed like a readily available way to run the moderately complex command that produces the same behavior as on CI or with tox, but outside a tox environment. It may be possible to improve on this in the future.
1 parent 9b9de11 commit 5d15063

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
.PHONY: all clean release force_release
1+
.PHONY: all lint clean release force_release
22

33
all:
44
@awk -F: '/^[[:alpha:]].*:/ && !/^all:/ {print $$1}' Makefile
55

6+
lint:
7+
SKIP=black-format pre-commit run --all-files --hook-stage manual
8+
69
clean:
710
rm -rf build/ dist/ .eggs/ .tox/
811

Diff for: README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,8 @@ To lint, and apply automatic code formatting, run:
148148
pre-commit run --all-files
149149
```
150150

151-
Code formatting can also be done by itself by running:
152-
153-
```
154-
black .
155-
```
151+
- Linting without modifying code can be done with: `make lint`
152+
- Auto-formatting without other lint checks can be done with: `black .`
156153

157154
To typecheck, run:
158155

0 commit comments

Comments
 (0)