Skip to content

update pre-commit conifiguration to avoid using the local escape hatch #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,30 @@

repos:
- repo: https://github.com/python/black
rev: 20.8b1
rev: 21.9b0
hooks:
- id: black
- repo: https://github.com/fsfe/reuse-tool
rev: v0.12.1
rev: v0.13.0
hooks:
- id: reuse
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.0.1
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/pylint
rev: pylint-2.7.1
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v3.0.0a4
hooks:
- id: pylint
name: pylint (library code)
types: [python]
exclude: "^(docs/|examples/|setup.py$)"
- repo: local
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v3.0.0a4
hooks:
- id: pylint_examples
- id: pylint
name: pylint (examples code)
description: Run pylint rules on "examples/*.py" files
entry: /usr/bin/env bash -c
args: ['([[ ! -d "examples" ]] || for example in $(find . -path "./examples/*.py"); do pylint --disable=missing-docstring,invalid-name,consider-using-f-string $example; done)']
language: system
args: ['--disable=missing-docstring,invalid-name,consider-using-f-string']
files: '^examples/.*\.py$'
4 changes: 3 additions & 1 deletion adafruit_gps.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,9 @@ class GPS_GtopI2C(GPS):
def __init__(
self, i2c_bus, *, address=_GPSI2C_DEFAULT_ADDRESS, debug=False, timeout=5
):
import adafruit_bus_device.i2c_device as i2c_device # pylint: disable=import-outside-toplevel
from adafruit_bus_device import ( # pylint: disable=import-outside-toplevel
i2c_device,
)

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