Skip to content

Commit 1db71cc

Browse files
committed
Add ruff isort
1 parent 9a2a49c commit 1db71cc

File tree

6 files changed

+13
-3
lines changed

6 files changed

+13
-3
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ repos:
1313
rev: v0.3.4
1414
hooks:
1515
- id: ruff-format
16+
- id: ruff
17+
args: ["--fix"]
1618
- repo: https://github.com/fsfe/reuse-tool
1719
rev: v3.0.1
1820
hooks:

adafruit_bme680.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@
3030
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
3131
"""
3232

33+
import math
3334
import struct
3435
import time
35-
import math
36+
3637
from micropython import const
3738

3839

@@ -46,8 +47,8 @@ def delay_microseconds(nusec):
4647

4748
import typing # pylint: disable=unused-import
4849

49-
from circuitpython_typing import ReadableBuffer
5050
from busio import I2C, SPI
51+
from circuitpython_typing import ReadableBuffer
5152
from digitalio import DigitalInOut
5253

5354
except ImportError:

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
#
55
# SPDX-License-Identifier: MIT
66

7+
import datetime
78
import os
89
import sys
9-
import datetime
1010

1111
sys.path.insert(0, os.path.abspath(".."))
1212

examples/bme680_simpletest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
# SPDX-License-Identifier: MIT
33

44
import time
5+
56
import board
7+
68
import adafruit_bme680
79

810
# Create sensor object, communicating over the board's default I2C bus

examples/bme680_spi.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
# SPDX-License-Identifier: MIT
33

44
import time
5+
56
import board
67
import digitalio
8+
79
import adafruit_bme680
810

911
# Create sensor object, communicating over the board's default SPI bus

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ dynamic = ["dependencies", "optional-dependencies"]
4444
[tool.ruff]
4545
target-version = "py38"
4646

47+
[tool.ruff.lint]
48+
select = ["I"]
49+
4750
[tool.ruff.format]
4851
line-ending = "lf"
4952

0 commit comments

Comments
 (0)