Skip to content

Moved from pulseio.PWMOut to pwmio.PWMOut #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ jobs:
- 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
Expand Down
19 changes: 17 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions adafruit_rgbled.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down