Skip to content

Commit 031af6c

Browse files
authored
Merge pull request #12 from adafruit/fix_build_yml
Fix build yml and update other infrastructure files
2 parents 2d58d33 + 6102f72 commit 031af6c

File tree

7 files changed

+13
-60
lines changed

7 files changed

+13
-60
lines changed

.github/workflows/build.yml

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

5-
name: GitHub Release Actions
5+
name: Build CI
66

7-
on:
8-
release:
9-
types: [published]
7+
on: [pull_request, push]
108

119
jobs:
12-
upload-release-assets:
10+
test:
1311
runs-on: ubuntu-latest
1412
steps:
15-
- name: Run GitHub Release CI workflow
16-
uses: adafruit/workflows-circuitpython-libs/release-gh@main
17-
with:
18-
github-token: ${{ secrets.GITHUB_TOKEN }}
13+
- name: Run Build CI workflow
14+
uses: adafruit/workflows-circuitpython-libs/build@main

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@
44

55
repos:
66
- repo: https://github.com/python/black
7-
rev: 22.3.0
7+
rev: 23.3.0
88
hooks:
99
- id: black
1010
- repo: https://github.com/fsfe/reuse-tool
11-
rev: v0.14.0
11+
rev: v1.1.2
1212
hooks:
1313
- id: reuse
1414
- repo: https://github.com/pre-commit/pre-commit-hooks
15-
rev: v4.2.0
15+
rev: v4.4.0
1616
hooks:
1717
- id: check-yaml
1818
- id: end-of-file-fixer
1919
- id: trailing-whitespace
2020
- repo: https://github.com/pycqa/pylint
21-
rev: v2.11.1
21+
rev: v2.17.4
2222
hooks:
2323
- id: pylint
2424
name: pylint (library code)
2525
types: [python]
2626
args:
27-
- --disable=consider-using-f-string,duplicate-code
27+
- --disable=consider-using-f-string
2828
exclude: "^(docs/|examples/|tests/|setup.py$)"
2929
- id: pylint
3030
name: pylint (example code)

.pylintrc

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs=1
2626

2727
# List of plugins (as comma separated values of python modules names) to load,
2828
# usually to register additional checkers.
29-
load-plugins=
29+
load-plugins=pylint.extensions.no_self_use
3030

3131
# Pickle collected data for later comparisons.
3232
persistent=yes
@@ -54,8 +54,8 @@ confidence=
5454
# --enable=similarities". If you want to run only the classes checker, but have
5555
# no Warning level messages displayed, use"--disable=all --enable=classes
5656
# --disable=W"
57-
# disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call
58-
disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,bad-continuation,pointless-string-statement,unspecified-encoding
57+
# disable=import-error,raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,deprecated-str-translate-call
58+
disable=raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,import-error,pointless-string-statement,unspecified-encoding
5959

6060
# Enable the message, report, category or checker with the given id(s). You can
6161
# either give multiple identifier separated by comma (,) or put this option
@@ -225,12 +225,6 @@ max-line-length=100
225225
# Maximum number of lines in a module
226226
max-module-lines=1000
227227

228-
# List of optional constructs for which whitespace checking is disabled. `dict-
229-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
230-
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
231-
# `empty-line` allows space-only lines.
232-
no-space-check=trailing-comma,dict-separator
233-
234228
# Allow the body of a class to be on the same line as the declaration if body
235229
# contains single statement.
236230
single-line-class-stmt=no
@@ -257,48 +251,29 @@ min-similarity-lines=12
257251

258252
[BASIC]
259253

260-
# Naming hint for argument names
261-
argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
262-
263254
# Regular expression matching correct argument names
264255
argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
265256

266-
# Naming hint for attribute names
267-
attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
268-
269257
# Regular expression matching correct attribute names
270258
attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
271259

272260
# Bad variable names which should always be refused, separated by a comma
273261
bad-names=foo,bar,baz,toto,tutu,tata
274262

275-
# Naming hint for class attribute names
276-
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
277-
278263
# Regular expression matching correct class attribute names
279264
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
280265

281-
# Naming hint for class names
282-
# class-name-hint=[A-Z_][a-zA-Z0-9]+$
283-
class-name-hint=[A-Z_][a-zA-Z0-9_]+$
284-
285266
# Regular expression matching correct class names
286267
# class-rgx=[A-Z_][a-zA-Z0-9]+$
287268
class-rgx=[A-Z_][a-zA-Z0-9_]+$
288269

289-
# Naming hint for constant names
290-
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
291-
292270
# Regular expression matching correct constant names
293271
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
294272

295273
# Minimum line length for functions/classes that require docstrings, shorter
296274
# ones are exempt.
297275
docstring-min-length=-1
298276

299-
# Naming hint for function names
300-
function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
301-
302277
# Regular expression matching correct function names
303278
function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
304279

@@ -309,21 +284,12 @@ good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_
309284
# Include a hint for the correct naming format with invalid-name
310285
include-naming-hint=no
311286

312-
# Naming hint for inline iteration names
313-
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
314-
315287
# Regular expression matching correct inline iteration names
316288
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
317289

318-
# Naming hint for method names
319-
method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
320-
321290
# Regular expression matching correct method names
322291
method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
323292

324-
# Naming hint for module names
325-
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
326-
327293
# Regular expression matching correct module names
328294
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
329295

@@ -339,9 +305,6 @@ no-docstring-rgx=^_
339305
# to this list to register other decorators that produce valid properties.
340306
property-classes=abc.abstractproperty
341307

342-
# Naming hint for variable names
343-
variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
344-
345308
# Regular expression matching correct variable names
346309
variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
347310

adafruit_displayio_flipclock/flip_clock.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ def __init__(
9191
darker_level: float = 0.6,
9292
medium_level: float = 0.8,
9393
) -> None:
94-
9594
# initialize parent Widget object
9695
super().__init__(
9796
width=tile_width * 4 + COLON_SPACE,

adafruit_displayio_flipclock/flip_digit.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ def __init__(
116116
darker_level: float = 0.6,
117117
medium_level: float = 0.8,
118118
) -> None:
119-
120119
# initialize parent Widget object
121120
super().__init__(width=tile_width, height=tile_height * 2)
122121

@@ -236,14 +235,12 @@ def value(self, new_value: int) -> None:
236235
"""
237236
# ignore new_value if it's the same as current
238237
if new_value != self.value:
239-
240238
# if the new value is valid
241239
if (
242240
isinstance(new_value, int)
243241
and 0 <= new_value <= 9
244242
and new_value in FlipDigit.VALID_CHARACTERS
245243
):
246-
247244
# store current value to use later
248245
_old_value = self.value
249246

examples/displayio_flipclock_hours_and_minutes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@
122122
clock.first_pair = str(next_hour)
123123

124124
else: # not ready to wrap minutes yet
125-
126125
# set minute value on the flip clock
127126
clock.second_pair = str(next_minute)
128127
time.sleep(0.1)

examples/displayio_flipclock_simpletest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@
9292
clock.first_pair = "13"
9393

9494
while True:
95-
9695
# increment first pair number
9796
cur_val = clock.first_pair
9897
next_val = int(cur_val) + 1

0 commit comments

Comments
 (0)