From 9f7bc012a40171186ce199b6975d001d735d78bb Mon Sep 17 00:00:00 2001 From: Dylan Herrada <33632497+dherrada@users.noreply.github.com> Date: Wed, 27 Jan 2021 19:04:08 -0500 Subject: [PATCH 1/6] Moved from pulseio.PWMOut to pwmio.PWMOut --- adafruit_rgbled.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adafruit_rgbled.py b/adafruit_rgbled.py index 5cafe21..cb46dd0 100644 --- a/adafruit_rgbled.py +++ b/adafruit_rgbled.py @@ -20,7 +20,7 @@ * Adafruit's SimpleIO library: https://github.com/adafruit/Adafruit_CircuitPython_SimpleIO """ -from pulseio import PWMOut +from pwmio import PWMOut from simpleio import map_range __version__ = "0.0.0-auto.0" @@ -33,15 +33,15 @@ class RGBLED: :param red_pin: The physical pin connected to a red LED anode. :type ~microcontroller.Pin: Microcontroller's red_pin. - :type pulseio.PWMOut: PWMOut object associated with red_pin. + :type pwmio.PWMOut: PWMOut object associated with red_pin. :type PWMChannel: PCA9685 PWM channel associated with red_pin. :param green_pin: The physical pin connected to a green LED anode. :type ~microcontroller.Pin: Microcontroller's green_pin. - :type pulseio.PWMOut: PWMOut object associated with green_pin. + :type pwmio.PWMOut: PWMOut object associated with green_pin. :type PWMChannel: PCA9685 PWM channel associated with green_pin. :param blue_pin: The physical pin connected to a blue LED anode. :type ~microcontroller.Pin: Microcontroller's blue_pin. - :type pulseio.PWMOut: PWMOut object associated with blue_pin. + :type pwmio.PWMOut: PWMOut object associated with blue_pin. :type PWMChannel: PCA9685 PWM channel associated with blue_pin. :param bool invert_pwm: False if the RGB LED is common cathode, true if the RGB LED is common anode. From 556a7c85667908b66329a734b88c9021c35632cb Mon Sep 17 00:00:00 2001 From: dherrada Date: Wed, 3 Feb 2021 16:38:51 -0500 Subject: [PATCH 2/6] Hardcoded Black and REUSE versions Signed-off-by: dherrada --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aab5f1c..07f886c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,11 +4,11 @@ repos: - repo: https://github.com/python/black - rev: stable + rev: 20.8b1 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool - rev: latest + rev: v0.12.1 hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks From 5c6ef4f7f8acbaa206b245396570cd5832978f4c Mon Sep 17 00:00:00 2001 From: dherrada Date: Tue, 2 Mar 2021 16:46:17 -0500 Subject: [PATCH 3/6] Removed pylint process from github workflow Signed-off-by: dherrada --- .github/workflows/build.yml | 8 ++------ .pre-commit-config.yaml | 15 +++++++++++++++ .pylintrc | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59baa53..621d5ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,18 +42,14 @@ jobs: # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.) run: | source actions-ci/install.sh - - name: Pip install pylint, Sphinx, pre-commit + - name: Pip install Sphinx, pre-commit run: | - pip install --force-reinstall pylint Sphinx sphinx-rtd-theme pre-commit + pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit - name: Library version run: git describe --dirty --always --tags - name: Pre-commit hooks run: | pre-commit run --all-files - - name: PyLint - run: | - pylint $( find . -path './adafruit*.py' ) - ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" )) - name: Build assets run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . - name: Archive bundles diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 07f886c..354c761 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,3 +17,18 @@ repos: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace +- repo: https://github.com/pycqa/pylint + rev: pylint-2.7.1 + hooks: + - id: pylint + name: pylint (library code) + types: [python] + exclude: "^(docs/|examples/|setup.py$)" +- repo: local + hooks: + - id: pylint_examples + name: pylint (examples code) + description: Run pylint rules on "examples/*.py" files + entry: /usr/bin/env bash -c + args: ['([[ ! -d "examples" ]] || for example in $(find . -path "./examples/*.py"); do pylint --disable=missing-docstring,invalid-name $example; done)'] + language: system diff --git a/.pylintrc b/.pylintrc index 5c31f66..9ed669e 100644 --- a/.pylintrc +++ b/.pylintrc @@ -250,7 +250,7 @@ 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=4 From c3f980529a186fe446954581599101c88eff7cea Mon Sep 17 00:00:00 2001 From: dherrada Date: Tue, 2 Mar 2021 17:17:50 -0500 Subject: [PATCH 4/6] Re-added pylint install to build.yml Signed-off-by: dherrada --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 621d5ef..3baf502 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,9 +42,9 @@ jobs: # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.) run: | source actions-ci/install.sh - - name: Pip install Sphinx, pre-commit + - name: Pip install pylint, Sphinx, pre-commit run: | - pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit + pip install --force-reinstall pylint Sphinx sphinx-rtd-theme pre-commit - name: Library version run: git describe --dirty --always --tags - name: Pre-commit hooks From dbbde2ba4d2633bbbd1324de379e6b4440f74cfc Mon Sep 17 00:00:00 2001 From: Dylan Herrada <33632497+dherrada@users.noreply.github.com> Date: Wed, 27 Jan 2021 19:04:08 -0500 Subject: [PATCH 5/6] Moved from pulseio.PWMOut to pwmio.PWMOut --- adafruit_rgbled.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/adafruit_rgbled.py b/adafruit_rgbled.py index 5cafe21..cb46dd0 100644 --- a/adafruit_rgbled.py +++ b/adafruit_rgbled.py @@ -20,7 +20,7 @@ * Adafruit's SimpleIO library: https://github.com/adafruit/Adafruit_CircuitPython_SimpleIO """ -from pulseio import PWMOut +from pwmio import PWMOut from simpleio import map_range __version__ = "0.0.0-auto.0" @@ -33,15 +33,15 @@ class RGBLED: :param red_pin: The physical pin connected to a red LED anode. :type ~microcontroller.Pin: Microcontroller's red_pin. - :type pulseio.PWMOut: PWMOut object associated with red_pin. + :type pwmio.PWMOut: PWMOut object associated with red_pin. :type PWMChannel: PCA9685 PWM channel associated with red_pin. :param green_pin: The physical pin connected to a green LED anode. :type ~microcontroller.Pin: Microcontroller's green_pin. - :type pulseio.PWMOut: PWMOut object associated with green_pin. + :type pwmio.PWMOut: PWMOut object associated with green_pin. :type PWMChannel: PCA9685 PWM channel associated with green_pin. :param blue_pin: The physical pin connected to a blue LED anode. :type ~microcontroller.Pin: Microcontroller's blue_pin. - :type pulseio.PWMOut: PWMOut object associated with blue_pin. + :type pwmio.PWMOut: PWMOut object associated with blue_pin. :type PWMChannel: PCA9685 PWM channel associated with blue_pin. :param bool invert_pwm: False if the RGB LED is common cathode, true if the RGB LED is common anode. From eb5dc3472f29ec07403b26933945d9667f64a70d Mon Sep 17 00:00:00 2001 From: Kattni Date: Tue, 6 Apr 2021 14:59:25 -0400 Subject: [PATCH 6/6] Update conf.py --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index e34b856..c73f9b6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,7 +25,7 @@ # Uncomment the below if you use native CircuitPython modules such as # digitalio, micropython and busio. List the modules you use. Without it, the # autodoc module docs will fail to generate with a warning. -autodoc_mock_imports = ["pulseio"] +autodoc_mock_imports = ["pwmio"] intersphinx_mapping = {