Skip to content

Commit 4a7932f

Browse files
authored
Merge pull request #71 from theendlessriver13/update-pre-commit
update pre-commit conifiguration to avoid using the local escape hatch
2 parents ca3885a + ff798a1 commit 4a7932f

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

.pre-commit-config.yaml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,30 @@
44

55
repos:
66
- repo: https://github.com/python/black
7-
rev: 20.8b1
7+
rev: 21.9b0
88
hooks:
99
- id: black
1010
- repo: https://github.com/fsfe/reuse-tool
11-
rev: v0.12.1
11+
rev: v0.13.0
1212
hooks:
1313
- id: reuse
1414
- repo: https://github.com/pre-commit/pre-commit-hooks
15-
rev: v2.3.0
15+
rev: v4.0.1
1616
hooks:
1717
- id: check-yaml
1818
- id: end-of-file-fixer
1919
- id: trailing-whitespace
20-
- repo: https://github.com/pycqa/pylint
21-
rev: pylint-2.7.1
20+
- repo: https://github.com/pre-commit/mirrors-pylint
21+
rev: v3.0.0a4
2222
hooks:
2323
- id: pylint
2424
name: pylint (library code)
25-
types: [python]
2625
exclude: "^(docs/|examples/|setup.py$)"
27-
- repo: local
26+
- repo: https://github.com/pre-commit/mirrors-pylint
27+
rev: v3.0.0a4
2828
hooks:
29-
- id: pylint_examples
29+
- id: pylint
3030
name: pylint (examples code)
3131
description: Run pylint rules on "examples/*.py" files
32-
entry: /usr/bin/env bash -c
33-
args: ['([[ ! -d "examples" ]] || for example in $(find . -path "./examples/*.py"); do pylint --disable=missing-docstring,invalid-name,consider-using-f-string $example; done)']
34-
language: system
32+
args: ['--disable=missing-docstring,invalid-name,consider-using-f-string']
33+
files: '^examples/.*\.py$'

adafruit_gps.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,9 @@ class GPS_GtopI2C(GPS):
653653
def __init__(
654654
self, i2c_bus, *, address=_GPSI2C_DEFAULT_ADDRESS, debug=False, timeout=5
655655
):
656-
import adafruit_bus_device.i2c_device as i2c_device # pylint: disable=import-outside-toplevel
656+
from adafruit_bus_device import ( # pylint: disable=import-outside-toplevel
657+
i2c_device,
658+
)
657659

658660
super().__init__(None, debug) # init the parent with no UART
659661
self._i2c = i2c_device.I2CDevice(i2c_bus, address)

0 commit comments

Comments
 (0)