diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6084104..ed8ae34 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,3 +15,7 @@ repos: - id: poetry-lock - id: poetry-export args: ["-f", "requirements.txt", "-o", "requirements.txt"] + - repo: https://github.com/psf/black + rev: 23.1.0 + hooks: + - id: black diff --git a/Makefile b/Makefile index f754bc5..dd19abc 100644 --- a/Makefile +++ b/Makefile @@ -2,4 +2,4 @@ publish: poetry publish --build --repository gitea clean: - find . -type f -name "*.py[co]" -delete -or -type d -name "__pycache__" -delete -or -type -name "dist" -delete \ No newline at end of file + find . -type f -name "*.py[co]" -delete -or -type d -name "__pycache__" -delete -or -type -name "dist" -delete diff --git a/README.md b/README.md index 26132af..3bdb955 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Projector is a personal tool I user to control my _Panasonic PT-RW330_ projector ## Build wheels -Building the project can be done using poetry. +Building the project can be done using poetry. ```shell $ poetry build @@ -32,4 +32,4 @@ Put projector and scalar in sleep mode: ```shell $ projectorpi --sleep -``` \ No newline at end of file +``` diff --git a/src/projectorpi/serialdevice.py b/src/projectorpi/serialdevice.py index f7cd215..ad03caf 100644 --- a/src/projectorpi/serialdevice.py +++ b/src/projectorpi/serialdevice.py @@ -12,7 +12,6 @@ class SerialDevice: self.prefix = "" def send_command(self, command: str) -> str: - with Serial(self.serial_port, self.baudrate, timeout=3) as s: if self.verbose: print(self.prefix, "send:", command)