Skip to content

Commit 187d494

Browse files
committed
fix set literal and format
1 parent 0d62e61 commit 187d494

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

adafruit_tt21100.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def touches(self) -> List[dict]:
8888
with self._i2c as i2c:
8989
i2c.readinto(self._data_len)
9090
# Empty queue
91-
if self._data_len[0] in (0, 2):
91+
if self._data_len[0] in {0, 2}:
9292
return []
9393
i2c.readinto(self._bytes, end=self._data_len[0])
9494

docs/conf.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
# -*- coding: utf-8 -*-
2-
31
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
42
#
53
# SPDX-License-Identifier: MIT
64

5+
import datetime
76
import os
87
import sys
9-
import datetime
108

119
sys.path.insert(0, os.path.abspath(".."))
1210

@@ -52,9 +50,7 @@
5250
creation_year = "2022"
5351
current_year = str(datetime.datetime.now().year)
5452
year_duration = (
55-
current_year
56-
if current_year == creation_year
57-
else creation_year + " - " + current_year
53+
current_year if current_year == creation_year else creation_year + " - " + current_year
5854
)
5955
copyright = year_duration + " Scott Shawcroft"
6056
author = "Scott Shawcroft"

examples/tt21100_paint.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77
"""
88

99
import bitmaptools
10-
import busio
1110
import board
11+
import busio
1212
import displayio
13+
1314
import adafruit_tt21100
1415

1516
# Create library object using our Bus I2C & SPI port
@@ -33,6 +34,4 @@
3334
y = point["y"]
3435
x = display.width - point["x"]
3536
size = point["pressure"] - 20
36-
bitmaptools.fill_region(
37-
pixels, x - size, y - size, x + size, y + size, point["id"] + 1
38-
)
37+
bitmaptools.fill_region(pixels, x - size, y - size, x + size, y + size, point["id"] + 1)

examples/tt21100_simpletest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
"""
99

1010
import time
11-
import busio
11+
1212
import board
13+
import busio
14+
1315
import adafruit_tt21100
1416

1517
# Create library object (named "tt") using a Bus I2C port

0 commit comments

Comments
 (0)