Skip to content

Commit 3a383c2

Browse files
authored
Merge branch 'master' into master
2 parents 41cb99e + 25ea19f commit 3a383c2

File tree

8 files changed

+20
-15
lines changed

8 files changed

+20
-15
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ jobs:
5050
- name: Pre-commit hooks
5151
run: |
5252
pre-commit run --all-files
53-
- name: PyLint
54-
run: |
55-
pylint $( find . -path './adafruit*.py' )
56-
([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" ))
5753
- name: Build assets
5854
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
5955
- name: Build docs

.pre-commit-config.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
repos:
66
- repo: https://github.com/python/black
7-
rev: 19.10b0
7+
rev: 20.8b1
88
hooks:
99
- id: black
1010
- repo: https://github.com/fsfe/reuse-tool
11-
rev: latest
11+
rev: v0.12.1
1212
hooks:
1313
- id: reuse
1414
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -17,3 +17,18 @@ repos:
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
22+
hooks:
23+
- id: pylint
24+
name: pylint (library code)
25+
types: [python]
26+
exclude: "^(docs/|examples/|setup.py$)"
27+
- repo: local
28+
hooks:
29+
- id: pylint_examples
30+
name: pylint (examples code)
31+
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 $example; done)']
34+
language: system

.pylintrc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ ignore-patterns=
2222
#init-hook=
2323

2424
# Use multiple processes to speed up Pylint.
25-
# jobs=1
26-
jobs=2
25+
jobs=1
2726

2827
# List of plugins (as comma separated values of python modules names) to load,
2928
# usually to register additional checkers.
@@ -250,10 +249,10 @@ ignore-comments=yes
250249
ignore-docstrings=yes
251250

252251
# Ignore imports when computing similarities.
253-
ignore-imports=no
252+
ignore-imports=yes
254253

255254
# Minimum lines number of a similarity.
256-
min-similarity-lines=4
255+
min-similarity-lines=12
257256

258257

259258
[BASIC]

adafruit_lsm6ds/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ class LSM6DS: # pylint: disable=too-many-instance-attributes
165165
166166
:param ~busio.I2C i2c_bus: The I2C bus the LSM6DSOX is connected to.
167167
:param address: The I2C address of the sensor
168-
169168
"""
170169

171170
# ROUnaryStructs:

adafruit_lsm6ds/ism330dhcx.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class ISM330DHCX(LSM6DS): # pylint: disable=too-many-instance-attributes
1616
1717
:param ~busio.I2C i2c_bus: The I2C bus the LSM6DS33 is connected to.
1818
:param address: The I2C address of the sensor
19-
2019
"""
2120

2221
CHIP_ID = 0x6B

adafruit_lsm6ds/lsm6ds33.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class LSM6DS33(LSM6DS): # pylint: disable=too-many-instance-attributes
1313
1414
:param ~busio.I2C i2c_bus: The I2C bus the LSM6DS33 is connected to.
1515
:param address: The I2C address of the sensor
16-
1716
"""
1817

1918
CHIP_ID = 0x69

adafruit_lsm6ds/lsm6dso32.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class LSM6DSO32(LSM6DS): # pylint: disable=too-many-instance-attributes
1313
1414
:param ~busio.I2C i2c_bus: The I2C bus the LSM6DSO32 is connected to.
1515
:param address: The I2C address of the sensor
16-
1716
"""
1817

1918
CHIP_ID = LSM6DS_CHIP_ID

adafruit_lsm6ds/lsm6dsox.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class LSM6DSOX(LSM6DS): # pylint: disable=too-many-instance-attributes
1313
1414
:param ~busio.I2C i2c_bus: The I2C bus the LSM6DSOX is connected to.
1515
:param address: The I2C address of the sensor
16-
1716
"""
1817

1918
CHIP_ID = LSM6DS_CHIP_ID

0 commit comments

Comments
 (0)