Add pre-commit
This commit is contained in:
@@ -15,3 +15,7 @@ repos:
|
|||||||
- id: poetry-lock
|
- id: poetry-lock
|
||||||
- id: poetry-export
|
- id: poetry-export
|
||||||
args: ["-f", "requirements.txt", "-o", "requirements.txt"]
|
args: ["-f", "requirements.txt", "-o", "requirements.txt"]
|
||||||
|
- repo: https://github.com/psf/black
|
||||||
|
rev: 23.1.0
|
||||||
|
hooks:
|
||||||
|
- id: black
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -2,4 +2,4 @@
|
|||||||
publish:
|
publish:
|
||||||
poetry publish --build --repository gitea
|
poetry publish --build --repository gitea
|
||||||
clean:
|
clean:
|
||||||
find . -type f -name "*.py[co]" -delete -or -type d -name "__pycache__" -delete -or -type -name "dist" -delete
|
find . -type f -name "*.py[co]" -delete -or -type d -name "__pycache__" -delete -or -type -name "dist" -delete
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Projector is a personal tool I user to control my _Panasonic PT-RW330_ projector
|
|||||||
|
|
||||||
## Build wheels
|
## Build wheels
|
||||||
|
|
||||||
Building the project can be done using poetry.
|
Building the project can be done using poetry.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ poetry build
|
$ poetry build
|
||||||
@@ -32,4 +32,4 @@ Put projector and scalar in sleep mode:
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ projectorpi --sleep
|
$ projectorpi --sleep
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ class SerialDevice:
|
|||||||
self.prefix = ""
|
self.prefix = ""
|
||||||
|
|
||||||
def send_command(self, command: str) -> str:
|
def send_command(self, command: str) -> str:
|
||||||
|
|
||||||
with Serial(self.serial_port, self.baudrate, timeout=3) as s:
|
with Serial(self.serial_port, self.baudrate, timeout=3) as s:
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
print(self.prefix, "send:", command)
|
print(self.prefix, "send:", command)
|
||||||
|
|||||||
Reference in New Issue
Block a user