Skip to content

Commit 38e3647

Browse files
committed
add precommit to github actions
1 parent 65ff912 commit 38e3647

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

.github/workflows/pre-commit.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-python@v3
14+
- uses: pre-commit/[email protected]

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"python.linting.flake8Enabled": true,
33
"python.linting.flake8Args": [
44
"--max-line-length=120",
5-
"--ignore=E402,F841,F401,E302,E305",
5+
"--ignore=E402,F841,F401,E302,E305"
66
],
77
"python.linting.enabled": true,
88
"python.linting.pydocstyleEnabled": true,

custom_components/ble_monitor/ble_parser/sensirion.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,9 @@ def parse_sensirion(self, data, complete_local_name, source_mac, rssi):
6767
_LOGGER.debug("Advertisement Type %s not supported ", advertisementType)
6868
return None
6969

70-
71-
'''
72-
The following functions are based on Sensirion_GadgetBle_Lib.cpp from https://github.com/Sensirion/arduino-ble-gadget/
73-
support from other devices should be easily added by looking at GadgetBle::setDataType and updating _parse_data_type
74-
accordingly. Note that the device name also has to be added to the SENSIRION_DEVICES list.
75-
'''
70+
# The following functions are based on Sensirion_GadgetBle_Lib.cpp from https://github.com/Sensirion/arduino-ble-gadget/
71+
# support from other devices should be easily added by looking at GadgetBle::setDataType and updating _parse_data_type
72+
# accordingly. Note that the device name also has to be added to the SENSIRION_DEVICES list.
7673

7774

7875
def _parse_data_type(advSampleType, byte_data):

custom_components/ble_monitor/const.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
# MiBeacon V4/V5 uses 32 character long key
9696
AES128KEY32_REGEX = "(?i)^[A-F0-9]{32}$"
9797

98-
"""Fixed constants."""
98+
# Fixed constants
9999

100100
# Sensor measurement limits to exclude erroneous spikes from the results (temperature in °C)
101101
CONF_TMIN = -40.0

0 commit comments

Comments
 (0)