]> Repositories - Adafruit_Blinka-hackapet.git/commitdiff
Merge remote-tracking branch 'adafruit/main'
authorRyan L <ryestar101@gmail.com>
Tue, 12 Sep 2023 21:15:52 +0000 (22:15 +0100)
committerRyan L <ryestar101@gmail.com>
Tue, 12 Sep 2023 21:15:52 +0000 (22:15 +0100)
31 files changed:
.github/ISSUE_TEMPLATE/bug_report.yml [new file with mode: 0644]
.github/ISSUE_TEMPLATE/config.yml [new file with mode: 0644]
.github/ISSUE_TEMPLATE/feature_request.md [new file with mode: 0644]
.github/ISSUE_TEMPLATE/feature_request.md.license [new file with mode: 0644]
.github/ISSUE_TEMPLATE/new_board_request.md [new file with mode: 0644]
.github/ISSUE_TEMPLATE/new_board_request.md.license [new file with mode: 0644]
.github/release-drafter.yml [new file with mode: 0644]
.github/workflows/release-drafter.yml [new file with mode: 0644]
.pre-commit-config.yaml
.pylintrc
requirements.txt
setup.py
src/adafruit_blinka/board/hardkernel/odroidn2.py
src/adafruit_blinka/microcontroller/am335x/sysfs_pwmout.py
src/adafruit_blinka/microcontroller/amlogic/a311d/pulseio/PulseIn.py
src/adafruit_blinka/microcontroller/amlogic/meson_g12_common/pulseio/PulseIn.py
src/adafruit_blinka/microcontroller/bcm283x/pulseio/PulseIn.py
src/adafruit_blinka/microcontroller/ftdi_mpsse/mpsse/spi.py
src/adafruit_blinka/microcontroller/generic_linux/libgpiod_pin.py
src/adafruit_blinka/microcontroller/generic_linux/sysfs_pin.py
src/adafruit_blinka/microcontroller/generic_micropython/spi.py
src/adafruit_blinka/microcontroller/nova/__init__.py
src/adafruit_blinka/microcontroller/nxp_lpc4330/pwmout.py
src/adafruit_blinka/microcontroller/rp2040/spi.py
src/adafruit_blinka/microcontroller/rp2040/uart.py
src/board.py
src/digitalio.py
src/microcontroller/__init__.py
src/microcontroller/pin.py
src/usb_hid.py
test/src/testing/universal/i2c.py

diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644 (file)
index 0000000..3e24c9c
--- /dev/null
@@ -0,0 +1,50 @@
+# SPDX-FileCopyrightText: 2023 Melissa LeBlanc-Williams for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
+
+name: 🐞 Bug Report
+description: Create a bug report to help us improve
+labels:
+  - bug
+body:
+  - type: markdown
+    attributes:
+      value: >-
+        Thanks for taking the time to fill out this bug report!
+        Now that you have encountered a bug... you can file a report for it.
+  - type: input
+    id: board
+    attributes:
+      label: Board Name
+      description: Which board are you using?
+      placeholder: e.g. Raspberry Pi 4
+    validations:
+      required: false
+  - type: textarea
+    id: steps
+    attributes:
+      label: Steps
+      description: Please mention the steps needed to replicate the issue.
+      placeholder: |
+        1. SSH into the board...
+        2. Enter the following folder...
+        3. Run the following command...
+    validations:
+      required: true
+  - type: textarea
+    id: description
+    attributes:
+      label: Description
+      description: Optionally, describe the bug in more detail.
+      placeholder: |
+        - Error while using...
+        - Only happens when...
+        - Might be related to #64...
+  - type: textarea
+    id: more-info
+    attributes:
+      label: Additional information
+      description: >-
+        Optionally, add any other information like screenshot of the page.
+        If you have already done some debugging, mention it here.
+        If you have some code or logs, you can paste it here.
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644 (file)
index 0000000..9521274
--- /dev/null
@@ -0,0 +1,11 @@
+# SPDX-FileCopyrightText: 2023 Melissa LeBlanc-Williams for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
+
+contact_links:
+  - name: 🔗 Adafruit Forum
+    url: https://forums.adafruit.com/
+    about: Official Adafruit technical support forum. Good for getting help on getting a project working.
+  - name: 🔗 Adafruit Discord
+    url: https://adafru.it/discord
+    about: Unofficial chat with many helpful folks and normally prompt replies.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644 (file)
index 0000000..0353e69
--- /dev/null
@@ -0,0 +1,11 @@
+---
+name: 🚀 Feature Request
+about: Suggest an idea for this project
+title: ''
+labels: 'enhancement'
+assignees: ''
+
+---
+
+<!-- We keep adding new features and enhancements to Blinka 🚀
+and would love ❤ to see what new challenge you have got for us... 🙂 -->
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md.license b/.github/ISSUE_TEMPLATE/feature_request.md.license
new file mode 100644 (file)
index 0000000..780b7a6
--- /dev/null
@@ -0,0 +1,3 @@
+# SPDX-FileCopyrightText: 2023 Melissa LeBlanc-Williams for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
diff --git a/.github/ISSUE_TEMPLATE/new_board_request.md b/.github/ISSUE_TEMPLATE/new_board_request.md
new file mode 100644 (file)
index 0000000..6190a2c
--- /dev/null
@@ -0,0 +1,11 @@
+---
+name: 🚀 New Board Request
+about: Request Support for a New Board
+title: ''
+labels: 'New Board Request'
+assignees: ''
+
+---
+
+<!-- We keep growing Blinka 🚀 and would love ❤ to
+ see what new boards you would like supported... 🙂 -->
diff --git a/.github/ISSUE_TEMPLATE/new_board_request.md.license b/.github/ISSUE_TEMPLATE/new_board_request.md.license
new file mode 100644 (file)
index 0000000..780b7a6
--- /dev/null
@@ -0,0 +1,3 @@
+# SPDX-FileCopyrightText: 2023 Melissa LeBlanc-Williams for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
new file mode 100644 (file)
index 0000000..70b453a
--- /dev/null
@@ -0,0 +1,18 @@
+# SPDX-FileCopyrightText: 2023 Melissa LeBlanc-Williams, written for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
+
+categories:
+  - title: "New Boards"
+    collapse-after: 1
+    labels:
+      - "New Board Request"
+change-template: "- $TITLE #$NUMBER by @$AUTHOR"
+template: |
+  ## What's Changed
+
+  $CHANGES
+
+  To use in CPython, `pip3 install adafruit-blinka`.
+
+  Read the [docs](https://circuitpython.readthedocs.io/projects/blinka/en/latest/) for info on how to use it.
diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml
new file mode 100644 (file)
index 0000000..bc9d42f
--- /dev/null
@@ -0,0 +1,25 @@
+# SPDX-FileCopyrightText: 2023 Melissa LeBlanc-Williams, written for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
+
+name: Release Drafter
+
+on:
+  push:
+    branches:
+      - main
+
+permissions:
+  contents: read
+
+jobs:
+  update_release_draft:
+    permissions:
+        # write permission is required to create a github release
+        contents: write
+        pull-requests: read
+    runs-on: ubuntu-latest
+    steps:
+      - uses: release-drafter/release-drafter@v5
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
index 08256d87f234093a2845e281d9940a89c41e9e78..033f2594bb1698052d9175183a1e10c394a9da5d 100644 (file)
@@ -4,22 +4,21 @@
 
 repos:
 -   repo: https://github.com/python/black
-    rev: 22.3.0
+    rev: 23.3.0
     hooks:
     - id: black
-      additional_dependencies: ['click==8.0.4']
 -   repo: https://github.com/fsfe/reuse-tool
-    rev: v0.12.1
+    rev: v1.1.2
     hooks:
     - id: reuse
 -   repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v2.3.0
+    rev: v4.4.0
     hooks:
     -   id: check-yaml
     -   id: end-of-file-fixer
     -   id: trailing-whitespace
 -   repo: https://github.com/pycqa/pylint
-    rev: v2.11.1
+    rev: v2.17.4
     hooks:
     -   id: pylint
         name: pylint (library code)
index 0267cf0a49f44a724cd6a55fe33eb14a99b10349..eab7cc0a2a89ee716ff2895d303be3cb4753e886 100644 (file)
--- a/.pylintrc
+++ b/.pylintrc
@@ -1,6 +1,7 @@
 # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
 #
 # SPDX-License-Identifier: Unlicense
+
 [MASTER]
 
 # A comma-separated list of package or module names from where C extensions may
@@ -8,11 +9,11 @@
 # run arbitrary code
 extension-pkg-whitelist=hid
 
-# Add files or directories to the blacklist. They should be base names, not
+# Add files or directories to the ignore-list. They should be base names, not
 # paths.
 ignore=CVS
 
-# Add files or directories matching the regex patterns to the blacklist. The
+# Add files or directories matching the regex patterns to the ignore-list. The
 # regex matches against base names, not paths.
 ignore-patterns=
 
@@ -22,11 +23,10 @@ ignore-patterns=
 
 # Use multiple processes to speed up Pylint.
 jobs=1
-# jobs=2
 
 # List of plugins (as comma separated values of python modules names) to load,
 # usually to register additional checkers.
-load-plugins=
+load-plugins=pylint.extensions.no_self_use
 
 # Pickle collected data for later comparisons.
 persistent=yes
@@ -54,8 +54,8 @@ confidence=
 # --enable=similarities". If you want to run only the classes checker, but have
 # no Warning level messages displayed, use"--disable=all --enable=classes
 # --disable=W"
-# 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
-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,invalid-name
+# disable=import-error,raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,deprecated-str-translate-call
+disable=raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,import-error,pointless-string-statement,unspecified-encoding,import-outside-toplevel,too-many-branches,too-many-statements,too-many-public-methods,invalid-name
 
 # Enable the message, report, category or checker with the given id(s). You can
 # either give multiple identifier separated by comma (,) or put this option
@@ -225,12 +225,6 @@ max-line-length=100
 # Maximum number of lines in a module
 max-module-lines=1000
 
-# List of optional constructs for which whitespace checking is disabled. `dict-
-# separator` is used to allow tabulation in dicts, etc.: {1  : 1,\n222: 2}.
-# `trailing-comma` allows a space between comma and closing bracket: (a, ).
-# `empty-line` allows space-only lines.
-no-space-check=trailing-comma,dict-separator
-
 # Allow the body of a class to be on the same line as the declaration if body
 # contains single statement.
 single-line-class-stmt=no
@@ -249,46 +243,30 @@ ignore-comments=yes
 ignore-docstrings=yes
 
 # Ignore imports when computing similarities.
-ignore-imports=no
+ignore-imports=yes
 
 # Minimum lines number of a similarity.
-min-similarity-lines=80
+min-similarity-lines=12
 
 
 [BASIC]
 
-# Naming hint for argument names
-argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
-
 # Regular expression matching correct argument names
 argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
 
-# Naming hint for attribute names
-attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
-
 # Regular expression matching correct attribute names
 attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
 
 # Bad variable names which should always be refused, separated by a comma
 bad-names=foo,bar,baz,toto,tutu,tata
 
-# Naming hint for class attribute names
-class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
-
 # Regular expression matching correct class attribute names
 class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
 
-# Naming hint for class names
-# class-name-hint=[A-Z_][a-zA-Z0-9]+$
-class-name-hint=[A-Z_][a-zA-Z0-9_]+$
-
 # Regular expression matching correct class names
 # class-rgx=[A-Z_][a-zA-Z0-9]+$
 class-rgx=[A-Z_][a-zA-Z0-9_]+$
 
-# Naming hint for constant names
-const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
-
 # Regular expression matching correct constant names
 const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
 
@@ -296,9 +274,6 @@ const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
 # ones are exempt.
 docstring-min-length=-1
 
-# Naming hint for function names
-function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
-
 # Regular expression matching correct function names
 function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
 
@@ -309,21 +284,12 @@ good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_
 # Include a hint for the correct naming format with invalid-name
 include-naming-hint=no
 
-# Naming hint for inline iteration names
-inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
-
 # Regular expression matching correct inline iteration names
 inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
 
-# Naming hint for method names
-method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
-
 # Regular expression matching correct method names
 method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
 
-# Naming hint for module names
-module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
-
 # Regular expression matching correct module names
 module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
 
@@ -339,9 +305,6 @@ no-docstring-rgx=^_
 # to this list to register other decorators that produce valid properties.
 property-classes=abc.abstractproperty
 
-# Naming hint for variable names
-variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
-
 # Regular expression matching correct variable names
 variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
 
@@ -433,4 +396,4 @@ min-public-methods=1
 
 # Exceptions that will emit a warning when being caught. Defaults to
 # "Exception"
-overgeneral-exceptions=Exception
+overgeneral-exceptions=builtins.Exception
index 329c2f0c265e55698254d80c0f9a71b849158a60..e6eb339a49dd3f7b22c29283cff1dc6f7d524fa7 100755 (executable)
@@ -1,4 +1,4 @@
-Adafruit-PlatformDetect>=3.13.0
+Adafruit-PlatformDetect>=3.52.0
 Adafruit-PureIO>=1.1.7
 Jetson.GPIO; platform_machine=='aarch64'
 RPi.GPIO; platform_machine=='armv7l' or platform_machine=='armv6l'
index c94ab3cbe92278699d5b8c386da66444e16f503a..aa64498086ce634ceaabd2abef4b94f7d7a68216 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -82,7 +82,7 @@ setup(
     },
     include_package_data=True,
     install_requires=[
-        "Adafruit-PlatformDetect>=3.13.0",
+        "Adafruit-PlatformDetect>=3.52.0",
         "Adafruit-PureIO>=1.1.7",
         "pyftdi>=0.40.0",
         "adafruit-circuitpython-typing",
index 4abce5b46aeb83716cde3703d490b1723835798a..9a0492680ed3b4f2505a71340cfc628f273dc24d 100644 (file)
@@ -58,9 +58,15 @@ for it in pin.i2cPorts:
     globals()["SCL" + str(it[0])] = it[1]
     globals()["SDA" + str(it[0])] = it[2]
 
+SCL = None
+SDA = None
 # Set second i2c bus as default for backward compatibility.
-SCL = pin.i2cPorts[1][1]
-SDA = pin.i2cPorts[1][2]
+if len(pin.i2cPorts) > 1:
+    SCL = pin.i2cPorts[1][1]
+    SDA = pin.i2cPorts[1][2]
+elif len(pin.i2cPorts) > 0:
+    SCL = pin.i2cPorts[0][1]
+    SDA = pin.i2cPorts[0][2]
 
 SCLK = pin.SPI0_SCLK
 MOSI = pin.SPI0_MOSI
index 776f9bb479e269ae713af2144ae7f9c52984479c..dd96c53b36fa8ec458cd944b1d663b6203e8389e 100644 (file)
@@ -14,6 +14,7 @@ try:
 except ImportError:
     raise RuntimeError("No PWM outputs defined for this board") from ImportError
 
+
 # pylint: disable=unnecessary-pass
 class PWMError(IOError):
     """Base class for PWM errors."""
index caf0d62b147d6468a8b98fa829d064936767ca3d..4f7ae362ddf449d2b9b5f610e0a3227b02188af8 100644 (file)
@@ -14,6 +14,7 @@ DEBUG = False
 queues = []
 procs = []
 
+
 # The message queues live outside of python space, and must be formally cleaned!
 def final():
     """In case the program is cancelled or quit, we need to clean up the PulseIn
@@ -29,6 +30,7 @@ def final():
 
 atexit.register(final)
 
+
 # pylint: disable=c-extension-no-member
 class PulseIn:
     """PulseIn Class to read PWM signals"""
index ae82f1cc38933ed648fa1e26b75cc8b65065473a..73397add500ecfde440621e7a91f66408be60725 100644 (file)
@@ -13,6 +13,7 @@ DEBUG = False
 queues = []
 procs = []
 
+
 # The message queues live outside of python space, and must be formally cleaned!
 def final():
     """In case the program is cancelled or quit, we need to clean up the PulseIn
@@ -28,6 +29,7 @@ def final():
 
 atexit.register(final)
 
+
 # pylint: disable=c-extension-no-member
 class PulseIn:
     """PulseIn Class to read PWM signals"""
index caf0d62b147d6468a8b98fa829d064936767ca3d..4f7ae362ddf449d2b9b5f610e0a3227b02188af8 100644 (file)
@@ -14,6 +14,7 @@ DEBUG = False
 queues = []
 procs = []
 
+
 # The message queues live outside of python space, and must be formally cleaned!
 def final():
     """In case the program is cancelled or quit, we need to clean up the PulseIn
@@ -29,6 +30,7 @@ def final():
 
 atexit.register(final)
 
+
 # pylint: disable=c-extension-no-member
 class PulseIn:
     """PulseIn Class to read PWM signals"""
index 66bb8fd2e8bad86324bc7e715dd38f2c1446b0bd..d5f1e917925c7a90f0d2a7f8997a70c676304798 100644 (file)
@@ -8,6 +8,7 @@ from adafruit_blinka.microcontroller.ftdi_mpsse.mpsse.url import (
     get_ft2232h_url,
 )
 
+
 # pylint: disable=protected-access
 class SPI:
     """Custom SPI Class for FTDI MPSSE"""
index a5a517260654ac6e68c6561a45f524bea2f4730b..0bb89bebafddc1a6408a5163204b1f8e436436a6 100644 (file)
@@ -10,6 +10,7 @@ except ImportError:
         "https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/blob/master/libgpiod.sh"
     ) from ImportError
 
+
 # pylint: disable=too-many-branches,too-many-statements
 class Pin:
     """Pins dont exist in CPython so...lets make our own!"""
index 8ce1a65c64cec926c3672a19c2ba933573f50a24..86c9a5fd69cda0d07100bfd0afce1b8a08467585 100644 (file)
@@ -11,6 +11,7 @@ import os
 import errno
 import time
 
+
 # pylint: disable=unnecessary-pass
 class GPIOError(IOError):
     """Base class for GPIO errors."""
index b89795151c53398dac78330a93edc3f0ac3b6f7a..ce20d044f26a3ebcb3fda22ce38a8320035bf583 100755 (executable)
@@ -4,6 +4,7 @@
 """SPI Class for Generic MicroPython"""
 from machine import SPI as _SPI
 
+
 # pylint: disable=protected-access, no-self-use
 class SPI:
     """SPI Class for Generic MicroPython"""
index 484637075e1dd742ec1b5bad86967c52eb7bdbde..d6ab78cff0a6e7b7fae2153bf41203b57742add9 100644 (file)
@@ -19,7 +19,9 @@ class Connection:
     def __init__(self):
         """Virtually private constructor."""
         if Connection.__instance is not None:
-            raise Exception("This class is a singleton!")
+            raise Exception(  # pylint: disable=broad-exception-raised
+                "This class is a singleton!"
+            )
 
         # pylint: disable=import-outside-toplevel
         from binhoHostAdapter import binhoHostAdapter
index cab12589c92d420f26e35b7fb76da51016886840..cc6718478404aac24380de1d0ebbd7e4c9b85719 100644 (file)
@@ -10,6 +10,7 @@ try:
 except ImportError:
     raise RuntimeError("No PWM outputs defined for this board") from ImportError
 
+
 # pylint: disable=unnecessary-pass
 class PWMError(IOError):
     """Base class for PWM errors."""
index 4480a883f59acc16d88fbe3c3bc335e8b89b8a93..bf59dd7991c7b6dda3f1fdb6de6b8889649c1bfe 100644 (file)
@@ -6,6 +6,7 @@ from machine import SPI as _SPI
 from machine import Pin
 from microcontroller.pin import spiPorts
 
+
 # pylint: disable=protected-access, no-self-use
 class SPI:
     """Custom SPI Class for RP2040"""
index 61c93ce3a44d19011bc02719c1be7d4c568d4298..22642efdf7a851132cc386f337b44d819ba6278f 100644 (file)
@@ -6,6 +6,7 @@ from machine import UART as _UART
 from machine import Pin
 from microcontroller.pin import uartPorts
 
+
 # pylint: disable=protected-access, no-self-use
 class UART:
     """Custom UART Class for RP2040"""
index cfaad6cecab5bf664aa0b979cbbc5885be69f77d..8d68aac45d7abb321f0c560f2b974486f34d757e 100644 (file)
@@ -364,8 +364,12 @@ elif board_id is None:
         f"""
         {package[0]} version {package[1]} was unable to identify the board and/or
         microcontroller running the {platform.system()} platform. Please be sure you
-        have the latest packages running:
+        have the latest packages by running:
         'pip3 install --upgrade adafruit-blinka adafruit-platformdetect'
+
+        If you are running the latest package, your board may not yet be supported. Please
+        open a New Issue on GitHub at https://github.com/adafruit/Adafruit_Blinka/issues and
+        select New Board Request.
         """
     )
 
index 657e7da5d47bae9fc955ff43d75a0c8f707da910..5dfadf61e79232ab1a2000b452fe28d6e01bc1d7 100644 (file)
@@ -21,7 +21,7 @@ elif detector.chip.AM33XX:
     from adafruit_blinka.microcontroller.am335x.pin import Pin
 elif detector.chip.AM65XX:
     from adafruit_blinka.microcontroller.am65xx.pin import Pin
-elif detector.chip.JH71x0:
+elif detector.chip.JH71X0:
     from adafruit_blinka.microcontroller.starfive.JH71x0.pin import Pin
 elif detector.chip.DRA74X:
     from adafruit_blinka.microcontroller.dra74x.pin import Pin
index d04d2ee15c28d4de535b2da61acd7537cd6a1113..2bc4736589b82025b93f558009b0c01aa66e9323 100644 (file)
@@ -46,7 +46,7 @@ elif chip_id == ap_chip.AM33XX:
     from adafruit_blinka.microcontroller.am335x import *
 elif chip_id == ap_chip.AM65XX:
     from adafruit_blinka.microcontroller.am65xx import *
-elif chip_id == ap_chip.JH71x0:
+elif chip_id == ap_chip.JH71X0:
     from adafruit_blinka.microcontroller.starfive.JH71x0 import *
 elif chip_id == ap_chip.SUN4I:
     from adafruit_blinka.microcontroller.allwinner.a20 import *
index fdd77ddef20d159f3baa6862a2c00affbf6d0282..362fe436a62cd100eb3977ce61d7a856b098f639 100644 (file)
@@ -31,7 +31,7 @@ elif chip_id == ap_chip.AM33XX:
     from adafruit_blinka.microcontroller.am335x.pin import *
 elif chip_id == ap_chip.AM65XX:
     from adafruit_blinka.microcontroller.am65xx.pin import *
-elif chip_id == ap_chip.JH71x0:
+elif chip_id == ap_chip.JH71X0:
     from adafruit_blinka.microcontroller.starfive.JH71x0.pin import *
 elif chip_id == ap_chip.SUN4I:
     from adafruit_blinka.microcontroller.allwinner.a20.pin import *
index 38e19b190528c8092248f07287f561c3b677c9f5..791647b288f15dd17c3d99df947b5831daf77934 100644 (file)
@@ -19,7 +19,7 @@ import sys
 
 for module in ["dwc2", "libcomposite"]:
     if Path("/proc/modules").read_text(encoding="utf-8").find(module) == -1:
-        raise Exception(
+        raise Exception(  # pylint: disable=broad-exception-raised
             "%s module not present in your kernel. did you insmod it?" % module
         )
 this = sys.modules[__name__]
index 0a3e478d58dddadc1e0dae3ea69f74928865d7ef..b30a9458d6caed466f4c87f5a66d27924126950b 100644 (file)
@@ -15,7 +15,6 @@ gc.collect()
 
 class TestBME280Interactive(TestCase):
     def test_read_value(self):
-
         import board
 
         gc.collect()