Skip to content
14 changes: 11 additions & 3 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ignore-patterns=
#init-hook=

# Use multiple processes to speed up Pylint.
# jobs=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is a bunch of commented out changes; just make sure to remove them before you're done.

jobs=2

# List of plugins (as comma separated values of python modules names) to load,
Expand Down Expand Up @@ -50,6 +51,7 @@ 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

# Enable the message, report, category or checker with the given id(s). You can
Expand Down Expand Up @@ -117,7 +119,8 @@ spelling-store-unknown-words=no
[MISCELLANEOUS]

# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO
# notes=FIXME,XXX,TODO
notes=FIXME,XXX


[TYPECHECK]
Expand Down Expand Up @@ -200,6 +203,7 @@ redefining-builtins-modules=six.moves,future.builtins
[FORMAT]

# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
# expected-line-ending-format=
expected-line-ending-format=LF

# Regexp for a line that is allowed to be longer than the limit.
Expand Down Expand Up @@ -272,9 +276,11 @@ class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
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
Expand All @@ -294,7 +300,8 @@ function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$

# Good variable names which should always be accepted, separated by a comma
good-names=r,g,b,i,j,k,n,ex,Run,_
# good-names=i,j,k,ex,Run,_
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
Expand Down Expand Up @@ -391,6 +398,7 @@ valid-metaclass-classmethod-first-arg=mcs
max-args=5

# Maximum number of attributes for a class (see R0902).
# max-attributes=7
max-attributes=11

# Maximum number of boolean expressions in a if statement
Expand All @@ -415,7 +423,7 @@ max-returns=6
max-statements=50

# Minimum number of public methods for a class (see R0903).
min-public-methods=2
min-public-methods=1


[EXCEPTIONS]
Expand Down
44 changes: 44 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,50 @@ This example demonstrates the library with the single built-in DotStar on the
pixels = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1)
pixels[0] = (10, 0, 0)


This example demonstrates the library with the DotStar Feather Wing and bounces Blinka.

`Feather M4 Express <https://www.adafruit.com/product/3857>`_ and
`DotStar FeatherWing <https://www.adafruit.com/product/3449>`_.

.. code-block:: python
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this example would be better to have in a separate example file. The example in the readme should be short and simple. Other examples can do fancier things.


import board
import adafruit_dotstar
import time


import adafruit_dotstar
dotstar = adafruit_dotstar.DotStar(board.D13, board.D11, 72,
pixel_order=adafruit_dotstar.BGR,
brightness=0.3, auto_write=False)

blinka = (
(0, 0x0f0716, 0x504069, 0x482e63, 0, 0),
(0, 0x3d1446, 0x502b74, 0x622f8c, 0, 0),
(0, 0x2e021b, 0x2e021b, 0x2e021b, 0, 0),
(0, 0, 0x2e021b, 0x2e021b, 0, 0),
(0, 0x591755, 0x912892, 0x3f205c, 0x282828, 0x301844),
(0x65206b, 0x932281, 0x6e318f, 0x6d2b7e, 0x7e2686, 0x8c2c8f),
(0x7c2d8c, 0xa21c81, 0x6b308e, 0x74257b, 0x7b2482, 0x742f8d),
(0x23051a, 0x5c0f45, 0x81227b, 0x551a5b, 0x691b5d, 0x4d0c39),
)
offset = 0
direction = 1
while True:
dotstar.fill(0)
for y, row in enumerate(blinka):
for x, value in enumerate(row):
n = x * 12 + (y + offset)
dotstar[n] = row[x]
dotstar.show()
time.sleep(0.1)
offset += direction
if offset > 4 or offset < 0:
direction = -direction
offset += direction


Contributing
============

Expand Down
Loading