Skip to content

Commit

Permalink
Remove unused imports and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
theyosh committed Jul 18, 2024
1 parent 6c88bac commit 2ccfbdd
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion hardware/button/ldr_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __run(self):
self._device["internal_state"] = self.PRESSED if count <= (self.__CAPACITOR * 10000) else self.RELEASED
sleep(0.1)

except KeyboardInterrupt as ex:
except KeyboardInterrupt:
self.stop()

# print(f"Fetch CTRL-c... and now what..? For now.. press again Ctrl-C .. ({ex})")
Expand Down
3 changes: 0 additions & 3 deletions hardware/webcam/hlslive_webcam.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

logger = terrariumLogging.logging.getLogger(__name__)

from io import BytesIO
import subprocess

from . import terrariumWebcam
from terrariumUtils import terrariumUtils

Expand Down
1 change: 0 additions & 1 deletion terrariumArea.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

logger = terrariumLogging.logging.getLogger(__name__)

from operator import itemgetter
import copy
import datetime
import time
Expand Down
2 changes: 1 addition & 1 deletion terrariumAudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def volume(__cls__, hw, value=None):
# Try to 'overload' the volume by 20%. Can work for some sound cards
value = int(max(0, min(120, 120 * (value / 100))))
mixer.setvolume(value, alsaaudio.MIXER_CHANNEL_ALL)
except alsaaudio.ALSAAudioError as ex:
except alsaaudio.ALSAAudioError:
try:
# When the 'overloaded' value is to high, fall back to normal max volume
value = int(max(0, min(100, value)))
Expand Down
2 changes: 1 addition & 1 deletion terrariumNotification.py
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ def load_setup(self, setup_data):
self.connection = mqtt.Client(
mqtt.CallbackAPIVersion.VERSION1, client_id=f"TerrariumPI {self.setup['version']}"
)
except Exception as ex:
except Exception:
# Old version
self.connection = mqtt.Client(client_id=f"TerrariumPI {self.setup['version']}")

Expand Down
1 change: 0 additions & 1 deletion weather/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def update(self):
self._device["last_update"] is None
or (datetime.now() - self._device["last_update"]).total_seconds() > self.__UPDATE_TIMEOUT
):
start = time.time()
logger.debug(f"Loading online weather data from source: {self.address}")

if self._load_data():
Expand Down

0 comments on commit 2ccfbdd

Please sign in to comment.