Merge pull request #1772 from jepler/update-pylint-skip-old-guides

Update pylint and skip old guides
This commit is contained in:
Kattni 2021-08-11 16:17:44 -04:00 committed by GitHub
commit e0e218beb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
156 changed files with 1066 additions and 339 deletions

View file

@ -50,9 +50,9 @@ jobs:
- name: Versions - name: Versions
run: | run: |
python3 --version python3 --version
- name: Pip install pylint, black, & Sphinx - name: Pip install pylint
run: | run: |
pip install --force-reinstall pylint==1.9.2 pip install --force-reinstall pylint==2.7.1
- name: Checkout Current Repo - name: Checkout Current Repo
uses: actions/checkout@v2 uses: actions/checkout@v2

1
.mailmap Normal file
View file

@ -0,0 +1 @@
Anne Barela <mydigitalhome@gmail.com>

View file

@ -0,0 +1 @@
3D_Printed_LED_Microphone_Flag/3D_Printed_LED_Microphone_Flag.py 137: Consider using tuple unpacking for swapping variables (consider-swap-variables)

View file

@ -0,0 +1,2 @@
ABC_Soundboards_for_NeoTrellis/code.py 169: Comparison 'currently_playing['voice'] != None' should be 'currently_playing['voice'] is not None' (singleton-comparison)
ABC_Soundboards_for_NeoTrellis/code.py 186: Comparison 'currently_playing['voice'] != None' should be 'currently_playing['voice'] is not None' (singleton-comparison)

View file

@ -0,0 +1 @@
Adafruit_MAX98357/I2S_Test_Script.py 30: Unnecessary "else" after "continue" (no-else-continue)

View file

@ -0,0 +1 @@
Adafruit_UDA1334A/I2S_Test_Script.py 30: Unnecessary "else" after "continue" (no-else-continue)

View file

@ -0,0 +1 @@
BLE_Client_Server/client.py 77: Consider merging these comparisons with "in" to 'color_index in (0, 28)' (consider-using-in)

View file

@ -0,0 +1,2 @@
BLE_Heart_Rate_Trainer/ble_heart_rate_trainer.py 154: Comparison to literal (literal-comparison)
BLE_Heart_Rate_Trainer/ble_heart_rate_trainer.py 158: Comparison to literal (literal-comparison)

View file

@ -0,0 +1,2 @@
BLE_Host_Computer/ble_eval_server.py 22: Catching too general exception Exception (broad-except)
BLE_Host_Computer/ble_eval_server.py 21: Use of eval (eval-used)

View file

@ -0,0 +1,4 @@
Bluetooth_Restroom_Keys/code.py 84: Catching too general exception Exception (broad-except)
Bluetooth_Restroom_Keys/code.py 6: standard import "from array import array" should be placed before "from adafruit_ble import BLERadio" (wrong-import-order)
Bluetooth_Restroom_Keys/code.py 11: standard import "from math import pi, sin" should be placed before "from adafruit_ble import BLERadio" (wrong-import-order)
Bluetooth_Restroom_Keys/code.py 13: standard import "from time import sleep" should be placed before "from adafruit_ble import BLERadio" (wrong-import-order)

View file

@ -0,0 +1 @@
Bluetooth_Room_Lights/code.py 4: Line too long (101/100) (line-too-long)

View file

@ -175,4 +175,4 @@ while True:
if MODE == 1: if MODE == 1:
animations.animate() animations.animate()
if MODE == 4: if MODE == 4:
animations.freeze() animations.freeze()

View file

@ -0,0 +1,45 @@
BrainCraft_Google_Assistant/gv_buttontotalk.py 29: Import "import click" should be placed at the top of the module (wrong-import-position)
BrainCraft_Google_Assistant/gv_buttontotalk.py 30: Import "import grpc" should be placed at the top of the module (wrong-import-position)
BrainCraft_Google_Assistant/gv_buttontotalk.py 31: Import "import google.auth.transport.grpc" should be placed at the top of the module (wrong-import-position)
BrainCraft_Google_Assistant/gv_buttontotalk.py 32: Import "import google.auth.transport.requests" should be placed at the top of the module (wrong-import-position)
BrainCraft_Google_Assistant/gv_buttontotalk.py 33: Import "import google.oauth2.credentials" should be placed at the top of the module (wrong-import-position)
BrainCraft_Google_Assistant/gv_buttontotalk.py 35: Import "from google.assistant.embedded.v1alpha2 import embedded_assistant_pb2, embedded_assistant_pb2_grpc" should be placed at the top of the module (wrong-import-position)
BrainCraft_Google_Assistant/gv_buttontotalk.py 39: Import "from tenacity import retry, stop_after_attempt, retry_if_exception" should be placed at the top of the module (wrong-import-position)
BrainCraft_Google_Assistant/gv_buttontotalk.py 55: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
BrainCraft_Google_Assistant/gv_buttontotalk.py 82: Class 'SampleAssistant' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
BrainCraft_Google_Assistant/gv_buttontotalk.py 132: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
BrainCraft_Google_Assistant/gv_buttontotalk.py 137: Method should have "self" as first argument (no-self-argument)
BrainCraft_Google_Assistant/gv_buttontotalk.py 148: Too many branches (13/12) (too-many-branches)
BrainCraft_Google_Assistant/gv_buttontotalk.py 351: Too many local variables (39/15) (too-many-locals)
BrainCraft_Google_Assistant/gv_buttontotalk.py 426: Catching too general exception Exception (broad-except)
BrainCraft_Google_Assistant/gv_buttontotalk.py 484: Catching too general exception Exception (broad-except)
BrainCraft_Google_Assistant/gv_buttontotalk.py 485: Use lazy % formatting in logging functions (logging-not-lazy)
BrainCraft_Google_Assistant/gv_buttontotalk.py 530: Use lazy % formatting in logging functions (logging-not-lazy)
BrainCraft_Google_Assistant/gv_buttontotalk.py 536: Unused variable 'i' (unused-variable)
BrainCraft_Google_Assistant/gv_buttontotalk.py 379: Unused argument 'args' (unused-argument)
BrainCraft_Google_Assistant/gv_buttontotalk.py 379: Unused argument 'kwargs' (unused-argument)
BrainCraft_Google_Assistant/gv_buttontotalk.py 522: Unused variable 'onoff' (unused-variable)
BrainCraft_Google_Assistant/gv_buttontotalk.py 529: Unused variable 'blink' (unused-variable)
BrainCraft_Google_Assistant/gv_buttontotalk.py 351: Too many branches (15/12) (too-many-branches)
BrainCraft_Google_Assistant/gv_buttontotalk.py 351: Too many statements (81/50) (too-many-statements)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'api_endpoint' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'credentials' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'project_id' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'device_model_id' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'device_id' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'device_config' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'lang' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'display' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'verbose' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'input_audio_file' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'output_audio_file' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'audio_sample_rate' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'audio_sample_width' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'audio_iter_size' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'audio_block_size' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'audio_flush_size' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'grpc_deadline' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 586: No value for argument 'once' in function call (no-value-for-parameter)
BrainCraft_Google_Assistant/gv_buttontotalk.py 23: standard import "import sys" should be placed before "import pathlib2 as pathlib" (wrong-import-order)
BrainCraft_Google_Assistant/gv_buttontotalk.py 24: standard import "import time" should be placed before "import pathlib2 as pathlib" (wrong-import-order)
BrainCraft_Google_Assistant/gv_buttontotalk.py 25: standard import "import uuid" should be placed before "import pathlib2 as pathlib" (wrong-import-order)

View file

@ -0,0 +1 @@
BusyBox_Sign/code.py 1: Unused import time (unused-import)

View file

@ -0,0 +1 @@
Buzzing_Mindfulness_Bracelet/Buzzing_Mindfulness_Bracelet.py 21: Simplify chained comparison between the operands (chained-comparison)

View file

@ -0,0 +1,8 @@
CLUE_Altimeter/clue_altimeter.py 26: Access to a protected member _pressure of a client class (protected-access)
CLUE_Altimeter/clue_altimeter.py 27: Access to a protected member _pressure of a client class (protected-access)
CLUE_Altimeter/clue_altimeter.py 28: Access to a protected member _pressure of a client class (protected-access)
CLUE_Altimeter/clue_altimeter.py 29: Access to a protected member _pressure of a client class (protected-access)
CLUE_Altimeter/clue_altimeter.py 30: Access to a protected member _pressure of a client class (protected-access)
CLUE_Altimeter/clue_altimeter.py 121: Redefining name 'now' from outer scope (line 172) (redefined-outer-name)
CLUE_Altimeter/clue_altimeter.py 110: Unused argument 'current_sea_level_pressure' (unused-argument)
CLUE_Altimeter/clue_altimeter.py 7: Unused bitmap_font imported from adafruit_bitmap_font (unused-import)

View file

@ -0,0 +1,2 @@
CLUE_Heart_Rate_Trainer/clue_heart_rate_trainer.py 91: Comparison to literal (literal-comparison)
CLUE_Heart_Rate_Trainer/clue_heart_rate_trainer.py 93: Comparison to literal (literal-comparison)

View file

@ -0,0 +1,7 @@
CLUE_Light_Painter/bmp2led.py 14: Unnecessary pass statement (unnecessary-pass)
CLUE_Light_Painter/bmp2led.py 392: Unnecessary "else" after "raise" (no-else-raise)
CLUE_Light_Painter/bmp2led.py 393: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
CLUE_Light_Painter/bmp2led.py 395: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
CLUE_Light_Painter/bmp2led.py 167: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
CLUE_Light_Painter/code.py 317: Comparison to literal (literal-comparison)
CLUE_Light_Painter/code.py 361: Unnecessary "else" after "break" (no-else-break)

View file

@ -0,0 +1 @@
CLUE_Metronome/clue_metronome.py 155: Comparison to literal (literal-comparison)

View file

@ -0,0 +1 @@
CLUE_Milk_Checker/code.py 3: Unused import terminalio (unused-import)

View file

@ -0,0 +1,4 @@
CLUE_Rock_Paper_Scissors/advanced/rps_comms.py 160: Unnecessary "else" after "break" (no-else-break)
CLUE_Rock_Paper_Scissors/advanced/rps_comms.py 229: Dangerous default value {} as argument (dangerous-default-value)
CLUE_Rock_Paper_Scissors/advanced/rps_comms.py 229: Dangerous default value {} as argument (dangerous-default-value)
CLUE_Rock_Paper_Scissors/advanced/rps_display.py 133: Import outside toplevel (adafruit_imageload) (import-outside-toplevel)

View file

@ -0,0 +1,4 @@
CLUE_Rock_Paper_Scissors/advanced/rps_comms.py 160: Unnecessary "else" after "break" (no-else-break)
CLUE_Rock_Paper_Scissors/advanced/rps_comms.py 229: Dangerous default value {} as argument (dangerous-default-value)
CLUE_Rock_Paper_Scissors/advanced/rps_comms.py 229: Dangerous default value {} as argument (dangerous-default-value)
CLUE_Rock_Paper_Scissors/advanced/rps_display.py 133: Import outside toplevel (adafruit_imageload) (import-outside-toplevel)

View file

@ -0,0 +1,3 @@
CLUE_Sensor_Plotter/plot_source.py 225: Unnecessary use of a comprehension (unnecessary-comprehension)
CLUE_Sensor_Plotter/plot_source.py 245: Consider using a generator instead 'tuple(ana.value * self._conversion_factor for ana in self._analogin)' (consider-using-generator)
CLUE_Sensor_Plotter/clue-plotter.py 223: Unnecessary "elif" after "break" (no-else-break)

View file

@ -0,0 +1,2 @@
CP101_StateMachines/classes/code.py 206: Class 'StateMachine' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
CP101_StateMachines/classes/code.py 268: Class 'State' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)

View file

@ -0,0 +1,2 @@
CP101_StateMachines/classes/code.py 206: Class 'StateMachine' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
CP101_StateMachines/classes/code.py 268: Class 'State' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)

View file

@ -0,0 +1 @@
CPB_Volume_BLE/cpb_volume_ble.py 78: Unnecessary "else" after "continue" (no-else-continue)

View file

@ -0,0 +1 @@
CPX_DAC_Guide/adafruit_logo_vector.py 11: Bad option value 'bad-continuation' (bad-option-value)

View file

@ -0,0 +1 @@
CPX_Simon_Game/code.py 60: Unnecessary "elif" after "break" (no-else-break)

View file

@ -0,0 +1,48 @@
CPX_Simple_Simon/code.py 29: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 60: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 78: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 87: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 91: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 100: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 101: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 117: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 120: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 124: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 128: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 129: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 130: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 131: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 132: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 138: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 141: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 142: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 143: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 144: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 145: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 149: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 152: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 153: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 154: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 155: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 157: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 168: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 182: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 183: Trailing whitespace (trailing-whitespace)
CPX_Simple_Simon/code.py 34: Redefining name 'skill_level' from outer scope (line 160) (redefined-outer-name)
CPX_Simple_Simon/code.py 48: Redefining name 'skill_level' from outer scope (line 160) (redefined-outer-name)
CPX_Simple_Simon/code.py 72: Comparison 'button['freq'] == None' should be 'button['freq'] is None' (singleton-comparison)
CPX_Simple_Simon/code.py 79: Redefining name 'sequence' from outer scope (line 161) (redefined-outer-name)
CPX_Simple_Simon/code.py 79: Redefining name 'step' from outer scope (line 170) (redefined-outer-name)
CPX_Simple_Simon/code.py 94: More than one statement on a single line (multiple-statements)
CPX_Simple_Simon/code.py 95: More than one statement on a single line (multiple-statements)
CPX_Simple_Simon/code.py 96: More than one statement on a single line (multiple-statements)
CPX_Simple_Simon/code.py 97: More than one statement on a single line (multiple-statements)
CPX_Simple_Simon/code.py 98: More than one statement on a single line (multiple-statements)
CPX_Simple_Simon/code.py 99: More than one statement on a single line (multiple-statements)
CPX_Simple_Simon/code.py 100: More than one statement on a single line (multiple-statements)
CPX_Simple_Simon/code.py 93: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
CPX_Simple_Simon/code.py 93: Too many return statements (7/6) (too-many-return-statements)
CPX_Simple_Simon/code.py 112: Redefining name 'step' from outer scope (line 170) (redefined-outer-name)
CPX_Simple_Simon/code.py 127: Unused variable 'i' (unused-variable)
CPX_Simple_Simon/code.py 173: Comparison 'guess == None' should be 'guess is None' (singleton-comparison)
CPX_Simple_Simon/code.py 10: Unused import math (unused-import)

View file

@ -0,0 +1,2 @@
Christmas_Soundboard/code.py 154: Comparison 'currently_playing['voice'] != None' should be 'currently_playing['voice'] is not None' (singleton-comparison)
Christmas_Soundboard/code.py 174: Comparison 'currently_playing['voice'] != None' should be 'currently_playing['voice'] is not None' (singleton-comparison)

View file

@ -0,0 +1 @@
CircuitPython_Flying_Toasters/code.py 44: Simplify chained comparison between the operands (chained-comparison)

View file

@ -0,0 +1,2 @@
CircuitPython_JEplayer_mp3/code.py 237: Line too long (103/100) (line-too-long)
CircuitPython_JEplayer_mp3/code.py 496: Line too long (104/100) (line-too-long)

View file

@ -0,0 +1,4 @@
CircuitPython_Logger/ble_handler.py 16: Bad option value 'missing-super-argument' (bad-option-value)
CircuitPython_Logger/uart_handler.py 16: Bad option value 'missing-super-argument' (bad-option-value)
CircuitPython_Logger/file_handler.py 15: Bad option value 'missing-super-argument' (bad-option-value)
CircuitPython_Logger/aio_handler.py 15: Bad option value 'missing-super-argument' (bad-option-value)

View file

@ -0,0 +1,3 @@
CircuitPython_MacroPad_NKRO/boot.py 57: Trailing whitespace (trailing-whitespace)
CircuitPython_MacroPad_NKRO/code.py 31: Line too long (117/100) (line-too-long)
CircuitPython_MacroPad_NKRO/code.py 57: Trailing whitespace (trailing-whitespace)

View file

@ -0,0 +1 @@
CircuitPython_Made_Easy_On_CPX/cpx_acceleration_neopixels.py 6: Unnecessary "else" after "continue" (no-else-continue)

View file

@ -0,0 +1,3 @@
CircuitPython_Painter/main.py 98: Unnecessary "else" after "raise" (no-else-raise)
CircuitPython_Painter/main.py 99: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
CircuitPython_Painter/main.py 101: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)

View file

@ -0,0 +1,4 @@
CircuitPython_PyPaint/code.py 32: Class 'Color' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
CircuitPython_PyPaint/code.py 51: Class 'TouchscreenPoller' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
CircuitPython_PyPaint/code.py 108: Class 'CursorPoller' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
CircuitPython_PyPaint/code.py 149: Class 'Paint' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)

View file

@ -0,0 +1,4 @@
CircuitPython_Pyloton/pyloton.py 173: Line too long (126/100) (line-too-long)
CircuitPython_Pyloton/pyloton.py 547: Using a conditional statement with a constant value (using-constant-test)
CircuitPython_Pyloton/pyloton.py 552: Using a conditional statement with a constant value (using-constant-test)
CircuitPython_Pyloton/pyloton.py 557: Using a conditional statement with a constant value (using-constant-test)

View file

@ -0,0 +1 @@
CircuitPython_Quick_Starts/UART_Test_Script.py 32: Unnecessary "else" after "continue" (no-else-continue)

View file

@ -0,0 +1,13 @@
CircuitPython_Simple_Wordclock/code.py 63: Simplify chained comparison between the operands (chained-comparison)
CircuitPython_Simple_Wordclock/code.py 65: Simplify chained comparison between the operands (chained-comparison)
CircuitPython_Simple_Wordclock/code.py 67: Simplify chained comparison between the operands (chained-comparison)
CircuitPython_Simple_Wordclock/code.py 69: Simplify chained comparison between the operands (chained-comparison)
CircuitPython_Simple_Wordclock/code.py 71: Simplify chained comparison between the operands (chained-comparison)
CircuitPython_Simple_Wordclock/code.py 73: Simplify chained comparison between the operands (chained-comparison)
CircuitPython_Simple_Wordclock/code.py 75: Simplify chained comparison between the operands (chained-comparison)
CircuitPython_Simple_Wordclock/code.py 77: Simplify chained comparison between the operands (chained-comparison)
CircuitPython_Simple_Wordclock/code.py 79: Simplify chained comparison between the operands (chained-comparison)
CircuitPython_Simple_Wordclock/code.py 81: Simplify chained comparison between the operands (chained-comparison)
CircuitPython_Simple_Wordclock/code.py 86: Simplify chained comparison between the operands (chained-comparison)
CircuitPython_Simple_Wordclock/set_clock.py 18: Bad option value 'bad-whitespace' (bad-option-value)
CircuitPython_Simple_Wordclock/set_clock.py 31: Bad option value 'bad-whitespace' (bad-option-value)

View file

@ -0,0 +1,3 @@
CircuitPython_Slider/code.py 142: Assigning the same variable 'mode' to itself (self-assigning-variable)
CircuitPython_Slider/code.py 156: Assigning the same variable 'mode' to itself (self-assigning-variable)
CircuitPython_Slider/code.py 166: Redundant comparison - mode == mode (comparison-with-itself)

View file

@ -0,0 +1,4 @@
CircuitPython_TVBGone/gemma_main.py 9: Reimport 'pwmio' (imported line 7) (reimported)
CircuitPython_TVBGone/gemma_main.py 9: Imports from package pwmio are not grouped (ungrouped-imports)
CircuitPython_TVBGone/cpx_main.py 7: Reimport 'pwmio' (imported line 5) (reimported)
CircuitPython_TVBGone/cpx_main.py 7: Imports from package pwmio are not grouped (ungrouped-imports)

View file

@ -0,0 +1 @@
CircuitPython_Templates/cap_touch_pin_script/code.py 7: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)

View file

@ -0,0 +1,2 @@
CircuitPython_Touch_Deck/code.py 141: Using the global statement (global-statement)
CircuitPython_Touch_Deck/code.py 143: Access to a protected member _cell_content_list of a client class (protected-access)

View file

@ -0,0 +1 @@
CircuitPython_qrio/repl/code.py 10: Unused import ssl (unused-import)

View file

@ -0,0 +1,2 @@
CircuitPython_qrio/usb_hid/code.py 20: Unused adafruit_minimqtt.adafruit_minimqtt imported as MQTT (unused-import)
CircuitPython_qrio/usb_hid/code.py 24: Unused Keycode imported from adafruit_hid.keycode (unused-import)

View file

@ -0,0 +1,10 @@
CircuitPython_sdcardio_sdioio/benchmark.py 7: More than one statement on a single line (multiple-statements)
CircuitPython_sdcardio_sdioio/benchmark.py 19: More than one statement on a single line (multiple-statements)
CircuitPython_sdcardio_sdioio/benchmark.py 4: Unused import mount_sd (unused-import)
CircuitPython_sdcardio_sdioio/show_bitmaps.py 5: Unused import digitalio (unused-import)
CircuitPython_sdcardio_sdioio/show_bitmaps.py 7: Unused import mount_sd (unused-import)
CircuitPython_sdcardio_sdioio/log_temperature.py 6: Unused import mount_sd (unused-import)
CircuitPython_sdcardio_sdioio/list_files.py 3: Unused import mount_sd (unused-import)
CircuitPython_sdcardio_sdioio/play_mp3s.py 12: No exception type(s) specified (bare-except)
CircuitPython_sdcardio_sdioio/play_mp3s.py 15: Import "from audiomp3 import MP3Decoder" should be placed at the top of the module (wrong-import-position)
CircuitPython_sdcardio_sdioio/play_mp3s.py 6: Unused import mount_sd (unused-import)

View file

@ -0,0 +1 @@
Compost_Friend/code.py 87: Simplify chained comparison between the operands (chained-comparison)

View file

@ -0,0 +1,2 @@
Daily_Cheer_Automaton/CircuitPython/code.py 125: Bad option value 'bad-whitespace' (bad-option-value)
Daily_Cheer_Automaton/CircuitPython/code.py 137: Bad option value 'bad-whitespace' (bad-option-value)

View file

@ -0,0 +1,2 @@
Daily_Cheer_Automaton/CircuitPython/code.py 125: Bad option value 'bad-whitespace' (bad-option-value)
Daily_Cheer_Automaton/CircuitPython/code.py 137: Bad option value 'bad-whitespace' (bad-option-value)

View file

@ -0,0 +1,7 @@
EInk_Autostereograms/boot.py 21: Comparison 'button != None' should be 'button is not None' (singleton-comparison)
EInk_Autostereograms/code.py 52: Useless return at end of function or method (useless-return)
EInk_Autostereograms/code.py 138: Useless return at end of function or method (useless-return)
EInk_Autostereograms/code.py 155: Useless return at end of function or method (useless-return)
EInk_Autostereograms/code.py 165: Useless return at end of function or method (useless-return)
EInk_Autostereograms/code.py 284: Simplify chained comparison between the operands (chained-comparison)
EInk_Autostereograms/code.py 193: Useless return at end of function or method (useless-return)

View file

@ -0,0 +1,8 @@
EInk_Bonnet_Event_Calendar/event_calendar.py 84: Redefining name 'current_time' from outer scope (line 199) (redefined-outer-name)
EInk_Bonnet_Event_Calendar/event_calendar.py 72: Too many local variables (19/15) (too-many-locals)
EInk_Bonnet_Event_Calendar/event_calendar.py 195: Redefining name 'now' from outer scope (line 239) (redefined-outer-name)
EInk_Bonnet_Event_Calendar/event_calendar.py 202: Redefining name 'calendar_id' from outer scope (line 242) (redefined-outer-name)
EInk_Bonnet_Event_Calendar/event_calendar.py 205: Redefining name 'events' from outer scope (line 69) (redefined-outer-name)
EInk_Bonnet_Event_Calendar/event_calendar.py 204: Unused variable 'page_token' (unused-variable)
EInk_Bonnet_Event_Calendar/event_calendar.py 221: Redefining name 'calendar_ids' from outer scope (line 240) (redefined-outer-name)
EInk_Bonnet_Event_Calendar/event_calendar.py 9: standard import "import textwrap" should be placed before "from googleapiclient.discovery import build" (wrong-import-order)

View file

@ -0,0 +1,2 @@
EInk_Bonnet_Weather_Station/weather.py 32: Line too long (159/100) (line-too-long)
EInk_Bonnet_Weather_Station/weather.py 59: Undefined variable 'url' (undefined-variable)

View file

@ -0,0 +1,2 @@
FeatherCAN_CircuitPython/sender-ack.py 51: Unnecessary "else" after "break" (no-else-break)
FeatherCAN_CircuitPython/sender-ack.py 52: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)

View file

@ -0,0 +1,6 @@
Foul_Fowl/main.py 64: Comparison to literal (literal-comparison)
Foul_Fowl/main.py 122: Comparison to literal (literal-comparison)
Foul_Fowl/main.py 266: Comparison to literal (literal-comparison)
Foul_Fowl/main.py 275: Comparison to literal (literal-comparison)
Foul_Fowl/main.py 282: Comparison to literal (literal-comparison)
Foul_Fowl/main.py 285: Comparison to literal (literal-comparison)

View file

@ -0,0 +1,7 @@
FunHouse_HA_Companion/code.py 72: Using the global statement (global-statement)
FunHouse_HA_Companion/code.py 90: Unused argument 'userdata' (unused-argument)
FunHouse_HA_Companion/code.py 90: Unused argument 'result' (unused-argument)
FunHouse_HA_Companion/code.py 90: Unused argument 'payload' (unused-argument)
FunHouse_HA_Companion/code.py 97: Unused argument 'client' (unused-argument)
FunHouse_HA_Companion/code.py 102: Unused argument 'client' (unused-argument)
FunHouse_HA_Companion/code.py 120: Redefining name 'output' from outer scope (line 172) (redefined-outer-name)

View file

@ -0,0 +1,2 @@
FunHouse_LIFX/code.py 117: Comparison to literal (literal-comparison)
FunHouse_LIFX/code.py 136: Comparison to literal (literal-comparison)

View file

@ -0,0 +1,8 @@
FunHouse_Motion_Outlet/code.py 64: Trailing whitespace (trailing-whitespace)
FunHouse_Motion_Outlet/code.py 113: Trailing whitespace (trailing-whitespace)
FunHouse_Motion_Outlet/code.py 23: Using the global statement (global-statement)
FunHouse_Motion_Outlet/code.py 43: Unused argument 'userdata' (unused-argument)
FunHouse_Motion_Outlet/code.py 43: Unused argument 'result' (unused-argument)
FunHouse_Motion_Outlet/code.py 43: Unused argument 'payload' (unused-argument)
FunHouse_Motion_Outlet/code.py 49: Unused argument 'client' (unused-argument)
FunHouse_Motion_Outlet/code.py 53: Unused argument 'client' (unused-argument)

View file

@ -0,0 +1,8 @@
FunHouse_Pet_Bowl_Sensor/code.py 106: Line too long (101/100) (line-too-long)
FunHouse_Pet_Bowl_Sensor/code.py 31: Redefining name 'bowl_state' from outer scope (line 112) (redefined-outer-name)
FunHouse_Pet_Bowl_Sensor/code.py 38: Unused argument 'client' (unused-argument)
FunHouse_Pet_Bowl_Sensor/code.py 38: Unused argument 'userdata' (unused-argument)
FunHouse_Pet_Bowl_Sensor/code.py 38: Unused argument 'result' (unused-argument)
FunHouse_Pet_Bowl_Sensor/code.py 38: Unused argument 'payload' (unused-argument)
FunHouse_Pet_Bowl_Sensor/code.py 42: Unused argument 'client' (unused-argument)
FunHouse_Pet_Bowl_Sensor/code.py 59: Redefining name 'water_level' from outer scope (line 108) (redefined-outer-name)

View file

@ -0,0 +1 @@
Grand_Central_Soundboard/code.py 46: Simplify chained comparison between the operands (chained-comparison)

View file

@ -0,0 +1,2 @@
HalloWing_Cat_Toy/code.py 258: Simplify chained comparison between the operands (chained-comparison)
HalloWing_Cat_Toy/code.py 262: Simplify chained comparison between the operands (chained-comparison)

View file

@ -0,0 +1,4 @@
Hallowing_Lightsaber/lightsaber_standard.py 113: Comparison to literal (literal-comparison)
Hallowing_Lightsaber/lightsaber_standard.py 134: Comparison to literal (literal-comparison)
Hallowing_Lightsaber/lightsaber_unicorn.py 166: Comparison to literal (literal-comparison)
Hallowing_Lightsaber/lightsaber_unicorn.py 187: Comparison to literal (literal-comparison)

View file

@ -0,0 +1,5 @@
IoT_Environment_Sensor/gps.py 22: Class 'Gps' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
IoT_Environment_Sensor/air_quality.py 24: Class 'AirQualitySensor' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
IoT_Environment_Sensor/aio.py 41: Class 'AIO' inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
IoT_Environment_Sensor/aio.py 120: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
IoT_Environment_Sensor/aio.py 142: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)

View file

@ -0,0 +1 @@
IoT_NeoPixel_Sign/code.py 47: Using the global statement (global-statement)

162
IoT_NeoPixel_Sign/code.py Executable file → Normal file
View file

@ -1,81 +1,81 @@
import ssl import ssl
import board import board
import neopixel import neopixel
import adafruit_requests import adafruit_requests
import socketpool import socketpool
import wifi import wifi
from adafruit_io.adafruit_io import IO_HTTP from adafruit_io.adafruit_io import IO_HTTP
from adafruit_pixel_framebuf import PixelFramebuffer from adafruit_pixel_framebuf import PixelFramebuffer
# adafruit_circuitpython_adafruitio usage with native wifi networking # adafruit_circuitpython_adafruitio usage with native wifi networking
# Neopixel matrix configuration # Neopixel matrix configuration
PIXEL_PIN = board.IO6 PIXEL_PIN = board.IO6
PIXEL_WIDTH = 12 PIXEL_WIDTH = 12
PIXEL_HEIGHT = 12 PIXEL_HEIGHT = 12
# secrets.py has SSID/password and adafruit.io # secrets.py has SSID/password and adafruit.io
try: try:
from secrets import secrets from secrets import secrets
except ImportError: except ImportError:
print("WiFi secrets are kept in secrets.py, please add them there!") print("WiFi secrets are kept in secrets.py, please add them there!")
raise raise
AIO_USERNAME = secrets["aio_username"] AIO_USERNAME = secrets["aio_username"]
AIO_KEY = secrets["aio_key"] AIO_KEY = secrets["aio_key"]
# LED matrix creation # LED matrix creation
PIXELS = neopixel.NeoPixel( PIXELS = neopixel.NeoPixel(
PIXEL_PIN, PIXEL_WIDTH * PIXEL_HEIGHT, brightness=0.5, auto_write=False, PIXEL_PIN, PIXEL_WIDTH * PIXEL_HEIGHT, brightness=0.5, auto_write=False,
) )
PIXEL_FRAMEBUF = PixelFramebuffer( PIXEL_FRAMEBUF = PixelFramebuffer(
PIXELS, PIXELS,
PIXEL_WIDTH, PIXEL_WIDTH,
PIXEL_HEIGHT, PIXEL_HEIGHT,
alternating=True, alternating=True,
rotation=1, rotation=1,
reverse_x=True reverse_x=True
) )
# Adafruit.io feeds setup # Adafruit.io feeds setup
QUOTE_FEED = "sign-quotes.signtext" QUOTE_FEED = "sign-quotes.signtext"
COLOR_FEED = "sign-quotes.signcolor" COLOR_FEED = "sign-quotes.signcolor"
CURRENT_TEXT = "Merry Christmas!" CURRENT_TEXT = "Merry Christmas!"
CURRENT_COLOR = 0xFFFFFF CURRENT_COLOR = 0xFFFFFF
# Helper function to get updated data from Adafruit.io # Helper function to get updated data from Adafruit.io
def update_data(): def update_data():
global CURRENT_TEXT, CURRENT_COLOR global CURRENT_TEXT, CURRENT_COLOR
print("Updating data from Adafruit IO") print("Updating data from Adafruit IO")
try: try:
quote_feed = IO.get_feed(QUOTE_FEED) quote_feed = IO.get_feed(QUOTE_FEED)
quotes_data = IO.receive_data(quote_feed["key"]) quotes_data = IO.receive_data(quote_feed["key"])
CURRENT_TEXT = quotes_data["value"] CURRENT_TEXT = quotes_data["value"]
color_feed = IO.get_feed(COLOR_FEED) color_feed = IO.get_feed(COLOR_FEED)
color_data = IO.receive_data(color_feed["key"]) color_data = IO.receive_data(color_feed["key"])
CURRENT_COLOR = int(color_data["value"][1:], 16) CURRENT_COLOR = int(color_data["value"][1:], 16)
# pylint: disable=broad-except # pylint: disable=broad-except
except Exception as error: except Exception as error:
print(error) print(error)
# Connect to WiFi # Connect to WiFi
print("Connecting to %s" % secrets["ssid"]) print("Connecting to %s" % secrets["ssid"])
wifi.radio.connect(secrets["ssid"], secrets["password"]) wifi.radio.connect(secrets["ssid"], secrets["password"])
print("Connected to %s!" % secrets["ssid"]) print("Connected to %s!" % secrets["ssid"])
# Setup Adafruit IO connection # Setup Adafruit IO connection
POOL = socketpool.SocketPool(wifi.radio) POOL = socketpool.SocketPool(wifi.radio)
REQUESTS = adafruit_requests.Session(POOL, ssl.create_default_context()) REQUESTS = adafruit_requests.Session(POOL, ssl.create_default_context())
# Initialize an Adafruit IO HTTP API object # Initialize an Adafruit IO HTTP API object
IO = IO_HTTP(AIO_USERNAME, AIO_KEY, REQUESTS) IO = IO_HTTP(AIO_USERNAME, AIO_KEY, REQUESTS)
while True: while True:
update_data() update_data()
print("Displaying", CURRENT_TEXT, "in", hex(CURRENT_COLOR)) print("Displaying", CURRENT_TEXT, "in", hex(CURRENT_COLOR))
for i in range(12 * len(CURRENT_TEXT) + PIXEL_WIDTH): for i in range(12 * len(CURRENT_TEXT) + PIXEL_WIDTH):
PIXEL_FRAMEBUF.fill(0x000000) PIXEL_FRAMEBUF.fill(0x000000)
PIXEL_FRAMEBUF.pixel(0, 0, 0x000000) PIXEL_FRAMEBUF.pixel(0, 0, 0x000000)
PIXEL_FRAMEBUF.text(CURRENT_TEXT, PIXEL_WIDTH - i, 3, CURRENT_COLOR) PIXEL_FRAMEBUF.text(CURRENT_TEXT, PIXEL_WIDTH - i, 3, CURRENT_COLOR)
PIXEL_FRAMEBUF.display() PIXEL_FRAMEBUF.display()

View file

@ -0,0 +1,9 @@
ItsyBitsy_DotStar_Necklace/code.py 107: Unnecessary semicolon (unnecessary-semicolon)
ItsyBitsy_DotStar_Necklace/code.py 111: Unnecessary semicolon (unnecessary-semicolon)
ItsyBitsy_DotStar_Necklace/code.py 167: Unnecessary semicolon (unnecessary-semicolon)
ItsyBitsy_DotStar_Necklace/code.py 171: Unnecessary semicolon (unnecessary-semicolon)
ItsyBitsy_DotStar_Necklace/code.py 181: Unnecessary semicolon (unnecessary-semicolon)
ItsyBitsy_DotStar_Necklace/code.py 93: Redefining name 'packet' from outer scope (line 240) (redefined-outer-name)
ItsyBitsy_DotStar_Necklace/code.py 160: Unused variable 'value' (unused-variable)
ItsyBitsy_DotStar_Necklace/code.py 16: Unused ColorPacket imported from adafruit_bluefruit_connect.color_packet (unused-import)
ItsyBitsy_DotStar_Necklace/code.py 4: standard import "import random" should be placed before "import adafruit_dotstar" (wrong-import-order)

View file

@ -0,0 +1,10 @@
ItsyBitsy_Infinity_Collar/code.py 2: Trailing whitespace (trailing-whitespace)
ItsyBitsy_Infinity_Collar/code.py 51: Line too long (116/100) (line-too-long)
ItsyBitsy_Infinity_Collar/code.py 61: Trailing whitespace (trailing-whitespace)
ItsyBitsy_Infinity_Collar/code.py 113: Line too long (102/100) (line-too-long)
ItsyBitsy_Infinity_Collar/code.py 67: Using the global statement (global-statement)
ItsyBitsy_Infinity_Collar/code.py 66: Unused argument 'anim' (unused-argument)
ItsyBitsy_Infinity_Collar/code.py 85: Using the global statement (global-statement)
ItsyBitsy_Infinity_Collar/code.py 120: Access to a protected member _advance_interval of a client class (protected-access)
ItsyBitsy_Infinity_Collar/code.py 123: Access to a protected member _advance_interval of a client class (protected-access)
ItsyBitsy_Infinity_Collar/code.py 6: standard import "import random" should be placed before "import board" (wrong-import-order)

View file

@ -0,0 +1 @@
Jar_Minder_v2/code.py 105: Consider using a generator instead 'tuple(int(x.strip()) for x in a)' (consider-using-generator)

View file

@ -0,0 +1 @@
Kitty_Paw_Keypad/code.py 60: Line too long (115/100) (line-too-long)

View file

@ -0,0 +1,10 @@
Light_Paintstick_HalloWing/light_paintstick_hallowing.py 61: Unnecessary pass statement (unnecessary-pass)
Light_Paintstick_HalloWing/light_paintstick_hallowing.py 135: Unnecessary "else" after "raise" (no-else-raise)
Light_Paintstick_HalloWing/light_paintstick_hallowing.py 136: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
Light_Paintstick_HalloWing/light_paintstick_hallowing.py 138: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
Light_Paintstick_HalloWing/light_paintstick_hallowing.py 63: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
Light_Paintstick_HalloWing/light_paintstick_cpx.py 87: Unnecessary pass statement (unnecessary-pass)
Light_Paintstick_HalloWing/light_paintstick_cpx.py 161: Unnecessary "else" after "raise" (no-else-raise)
Light_Paintstick_HalloWing/light_paintstick_cpx.py 162: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
Light_Paintstick_HalloWing/light_paintstick_cpx.py 164: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)
Light_Paintstick_HalloWing/light_paintstick_cpx.py 89: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)

View file

@ -0,0 +1,15 @@
Lobe_Cat_Detector/lobe-cat-detector.py 102: Unnecessary parens after 'if' keyword (superfluous-parens)
Lobe_Cat_Detector/lobe-cat-detector.py 123: Line too long (111/100) (line-too-long)
Lobe_Cat_Detector/lobe-cat-detector.py 136: Unnecessary parens after 'if' keyword (superfluous-parens)
Lobe_Cat_Detector/lobe-cat-detector.py 139: Unnecessary parens after 'if' keyword (superfluous-parens)
Lobe_Cat_Detector/lobe-cat-detector.py 149: Trailing whitespace (trailing-whitespace)
Lobe_Cat_Detector/lobe-cat-detector.py 153: Trailing whitespace (trailing-whitespace)
Lobe_Cat_Detector/lobe-cat-detector.py 84: Using the global statement (global-statement)
Lobe_Cat_Detector/lobe-cat-detector.py 98: Using the global statement (global-statement)
Lobe_Cat_Detector/lobe-cat-detector.py 164: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
Lobe_Cat_Detector/lobe-cat-detector.py 145: Unused variable 'name' (unused-variable)
Lobe_Cat_Detector/lobe-cat-detector.py 173: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
Lobe_Cat_Detector/lobe-cat-detector.py 177: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
Lobe_Cat_Detector/lobe-cat-detector.py 6: standard import "import io" should be placed before "import board" (wrong-import-order)
Lobe_Cat_Detector/lobe-cat-detector.py 9: standard import "import os" should be placed before "import board" (wrong-import-order)
Lobe_Cat_Detector/lobe-cat-detector.py 11: standard import "from datetime import datetime" should be placed before "import board" (wrong-import-order)

View file

@ -0,0 +1,39 @@
MacroPad_RPC_Home_Assistant/code.py 37: Line too long (135/100) (line-too-long)
MacroPad_RPC_Home_Assistant/code.py 57: Line too long (146/100) (line-too-long)
MacroPad_RPC_Home_Assistant/code.py 96: Line too long (109/100) (line-too-long)
MacroPad_RPC_Home_Assistant/code.py 31: Unnecessary pass statement (unnecessary-pass)
MacroPad_RPC_Home_Assistant/code.py 60: Redefining name 'key_number' from outer scope (line 80) (redefined-outer-name)
MacroPad_RPC_Home_Assistant/code.py 14: standard import "from secrets import secrets" should be placed before "import displayio" (wrong-import-order)
MacroPad_RPC_Home_Assistant/boot.py 3: Final newline missing (missing-final-newline)
MacroPad_RPC_Home_Assistant/boot.py 3: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MacroPad_RPC_Home_Assistant/rpc.py 58: Line too long (112/100) (line-too-long)
MacroPad_RPC_Home_Assistant/rpc.py 75: Trailing whitespace (trailing-whitespace)
MacroPad_RPC_Home_Assistant/rpc.py 116: Line too long (102/100) (line-too-long)
MacroPad_RPC_Home_Assistant/rpc.py 123: Trailing whitespace (trailing-whitespace)
MacroPad_RPC_Home_Assistant/rpc.py 126: Final newline missing (missing-final-newline)
MacroPad_RPC_Home_Assistant/rpc.py 126: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MacroPad_RPC_Home_Assistant/rpc.py 23: Unnecessary pass statement (unnecessary-pass)
MacroPad_RPC_Home_Assistant/rpc.py 39: Dangerous default value [] as argument (dangerous-default-value)
MacroPad_RPC_Home_Assistant/rpc.py 39: Dangerous default value {} as argument (dangerous-default-value)
MacroPad_RPC_Home_Assistant/rpc.py 106: Method could be a function (no-self-use)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 81: Line too long (127/100) (line-too-long)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 111: Final newline missing (missing-final-newline)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 111: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 15: Redefining name 'mqtt_client' from outer scope (line 8) (redefined-outer-name)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 16: Using the global statement (global-statement)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 15: Unused argument 'mqtt_client' (unused-argument)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 15: Unused argument 'userdata' (unused-argument)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 15: Unused argument 'flags' (unused-argument)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 15: Unused argument 'rc' (unused-argument)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 19: Redefining name 'mqtt_client' from outer scope (line 8) (redefined-outer-name)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 20: Using the global statement (global-statement)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 19: Unused argument 'mqtt_client' (unused-argument)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 19: Unused argument 'userdata' (unused-argument)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 19: Unused argument 'rc' (unused-argument)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 23: Redefining name 'message' from outer scope (line 23) (redefined-outer-name)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 23: Unused argument 'client' (unused-argument)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 28: Unnecessary pass statement (unnecessary-pass)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 32: Using global for 'mqtt_connect_info' but no assignment is done (global-variable-not-assigned)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 94: Using the global statement (global-statement)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 106: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
MacroPad_RPC_Home_Assistant/rpc_ha_server.py 110: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)

View file

@ -0,0 +1,6 @@
Macropad_2FA_TOTP/secrets.py 19: Final newline missing (missing-final-newline)
Macropad_2FA_TOTP/secrets.py 19: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
Macropad_2FA_TOTP/rtc_setter.py 35: Final newline missing (missing-final-newline)
Macropad_2FA_TOTP/rtc_setter.py 35: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
Macropad_2FA_TOTP/macropad_totp.py 77: Line too long (103/100) (line-too-long)
Macropad_2FA_TOTP/macropad_totp.py 169: Redefining name 'code' from outer scope (line 65) (redefined-outer-name)

View file

@ -0,0 +1,2 @@
MagTag_Cheerlights/code.py 26: Lambda may not be necessary (unnecessary-lambda)
MagTag_Cheerlights/code.py 32: Lambda may not be necessary (unnecessary-lambda)

View file

@ -0,0 +1 @@
MagTag_Christmas_Countdown/code.py 68: Line too long (102/100) (line-too-long)

View file

@ -0,0 +1 @@
MagTag_CircuitPython_Smart_Holiday_Lights/MagTag_Smart_Holiday_Lights.py 2: Unused import digitalio (unused-import)

View file

@ -0,0 +1,9 @@
MagTag_CovidTracking/code.py 7: Reimport 'alarm' (imported line 5) (reimported)
MagTag_CovidTracking/code.py 41: Lambda may not be necessary (unnecessary-lambda)
MagTag_CovidTracking/code.py 47: Lambda may not be necessary (unnecessary-lambda)
MagTag_CovidTracking/code.py 53: Lambda may not be necessary (unnecessary-lambda)
MagTag_CovidTracking/code.py 59: Lambda may not be necessary (unnecessary-lambda)
MagTag_CovidTracking/code.py 65: Lambda may not be necessary (unnecessary-lambda)
MagTag_CovidTracking/code.py 5: Unused import alarm (unused-import)
MagTag_CovidTracking/code.py 6: Unused import supervisor (unused-import)
MagTag_CovidTracking/code.py 7: Imports from package alarm are not grouped (ungrouped-imports)

View file

@ -0,0 +1 @@
MagTag_Covid_Vaccination/code.py 5: Line too long (133/100) (line-too-long)

View file

@ -0,0 +1,6 @@
MagTag_Flashcards/basic/code.py 3: Unused import terminalio (unused-import)
MagTag_Flashcards/basic/code.py 4: Unused import digitalio (unused-import)
MagTag_Flashcards/basic/code.py 5: standard import "import random" should be placed before "import terminalio" (wrong-import-order)
MagTag_Flashcards/chapters/code.py 1: Unused import time (unused-import)
MagTag_Flashcards/chapters/code.py 4: Unused import digitalio (unused-import)
MagTag_Flashcards/chapters/code.py 5: standard import "import random" should be placed before "import terminalio" (wrong-import-order)

View file

@ -0,0 +1,3 @@
MagTag_Flashcards/basic/code.py 3: Unused import terminalio (unused-import)
MagTag_Flashcards/basic/code.py 4: Unused import digitalio (unused-import)
MagTag_Flashcards/basic/code.py 5: standard import "import random" should be placed before "import terminalio" (wrong-import-order)

View file

@ -0,0 +1,3 @@
MagTag_Flashcards/chapters/code.py 1: Unused import time (unused-import)
MagTag_Flashcards/chapters/code.py 4: Unused import digitalio (unused-import)
MagTag_Flashcards/chapters/code.py 5: standard import "import random" should be placed before "import terminalio" (wrong-import-order)

View file

@ -0,0 +1 @@
MagTag_Google_Sheets/naughty_nice.py 108: Comparison to literal (literal-comparison)

View file

@ -0,0 +1 @@
MagTag_Kitchen_Timer/code.py 58: Unnecessary parens after 'if' keyword (superfluous-parens)

View file

@ -0,0 +1,131 @@
MagTag_NextBus/code.py 7: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 10: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 11: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 12: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 13: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 14: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 15: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 16: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 17: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 18: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 19: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 20: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 34: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 38: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 42: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 46: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 52: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 58: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 59: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 60: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 61: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 66: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 70: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 71: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 72: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 74: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 83: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 85: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 92: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 93: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 94: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 95: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 102: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 104: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 113: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 114: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 115: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 116: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 117: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 121: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 122: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 123: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 124: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 126: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 130: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 131: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 132: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 133: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 134: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 135: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 136: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 137: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 138: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 139: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 140: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 145: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 146: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 147: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 148: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 150: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 151: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 152: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 155: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 156: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 159: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 160: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 161: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 165: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 166: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 167: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 169: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 170: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 172: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 173: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 174: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 178: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 179: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 180: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 181: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 182: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 183: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 184: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 187: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 188: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 189: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 190: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 194: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 198: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 199: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 200: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 201: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 202: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 203: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 206: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 208: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 211: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 212: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 217: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 220: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 221: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 222: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 223: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 224: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 226: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 231: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 232: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 233: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 234: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 235: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 238: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 239: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 240: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 241: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 242: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 243: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 244: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 245: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 246: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 247: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 248: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 253: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 254: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 255: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 256: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 257: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 258: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 265: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 267: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 269: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 270: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)
MagTag_NextBus/code.py 271: Unexpected line ending format. There is 'CRLF' while it should be 'LF'. (unexpected-line-ending-format)

View file

@ -1,77 +1,77 @@
""" """
NextBus class -- handles NextBus server queries and infers NextBus class -- handles NextBus server queries and infers
arrival times based on last-queried predictions and elapsed time. arrival times based on last-queried predictions and elapsed time.
""" """
# pylint: disable=bare-except, too-many-instance-attributes, too-many-arguments # pylint: disable=bare-except, too-many-instance-attributes, too-many-arguments
import re import re
import time import time
class NextBus(): class NextBus():
""" Class to handle NextBus prediction times for one route & stop. """ Class to handle NextBus prediction times for one route & stop.
""" """
def __init__(self, network, agency, route, stop, data=None, def __init__(self, network, agency, route, stop, data=None,
max_predictions=3, minimum_time=300): max_predictions=3, minimum_time=300):
""" Constructor expects a Requests-capable Network object, """ Constructor expects a Requests-capable Network object,
strings for transit agency, route, and stop ID, plus optional strings for transit agency, route, and stop ID, plus optional
per-stop data as defined by an application (e.g. text per-stop data as defined by an application (e.g. text
description, but could be an object or tuple of data, or None, description, but could be an object or tuple of data, or None,
or whatever's needed by the app), limits for the maximum number or whatever's needed by the app), limits for the maximum number
of future arrivals to predict (limited to server response, of future arrivals to predict (limited to server response,
typically 5) and minimum time below which arrivals are not shown typically 5) and minimum time below which arrivals are not shown
(to discourage unsafe bus-chasing). (to discourage unsafe bus-chasing).
""" """
self.network = network self.network = network
self.agency = agency self.agency = agency
self.route = route self.route = route
self.stop = stop self.stop = stop
self.data = data self.data = data
self.max_predictions = max_predictions self.max_predictions = max_predictions
self.minimum_time = minimum_time self.minimum_time = minimum_time
self.predictions = [] self.predictions = []
self.last_query_time = -1000 self.last_query_time = -1000
def fetch(self): def fetch(self):
""" Contact NextBus server and request predictions for one """ Contact NextBus server and request predictions for one
agency/route/stop. agency/route/stop.
""" """
try: try:
url = ('http://webservices.nextbus.com/service/publicXMLFeed?' + url = ('http://webservices.nextbus.com/service/publicXMLFeed?' +
'command=predictions&a=' + self.agency + 'command=predictions&a=' + self.agency +
'&r=' + self.route + '&s=' + self.stop) '&r=' + self.route + '&s=' + self.stop)
response = self.network.requests.get(url) response = self.network.requests.get(url)
if response.status_code == 200: if response.status_code == 200:
string = response.text string = response.text
self.last_query_time = time.monotonic() self.last_query_time = time.monotonic()
self.predictions = [] self.predictions = []
while len(self.predictions) < self.max_predictions: while len(self.predictions) < self.max_predictions:
# CircuitPython version of re library doesn't have findall. # CircuitPython version of re library doesn't have findall.
# Search for first instance of seconds="N" string and then # Search for first instance of seconds="N" string and then
# increment the string position based on match length. # increment the string position based on match length.
match = re.search('seconds=\"[0-9]*', string) match = re.search('seconds=\"[0-9]*', string)
if match: if match:
seconds = int(match.group(0)[9:]) # Remove 'seconds="' seconds = int(match.group(0)[9:]) # Remove 'seconds="'
if seconds >= self.minimum_time: if seconds >= self.minimum_time:
self.predictions.append(seconds) self.predictions.append(seconds)
string = string[match.end():] string = string[match.end():]
else: else:
break break
self.predictions.sort() self.predictions.sort()
except: except:
# If server query fails, we can keep extrapolating from the # If server query fails, we can keep extrapolating from the
# last set of predictions and try query again on next pass. # last set of predictions and try query again on next pass.
pass pass
def predict(self): def predict(self):
""" Extrapolate predictions based on last values queried from """ Extrapolate predictions based on last values queried from
NextBus server and time elapsed since last query. Predictions NextBus server and time elapsed since last query. Predictions
are returned as a list of integer seconds values. are returned as a list of integer seconds values.
""" """
times = [] times = []
for predict in self.predictions: for predict in self.predictions:
seconds = predict - (time.monotonic() - self.last_query_time) seconds = predict - (time.monotonic() - self.last_query_time)
if seconds >= self.minimum_time: if seconds >= self.minimum_time:
times.append(seconds) times.append(seconds)
return times return times

View file

@ -0,0 +1,2 @@
MagTag_Progress_Displays/year_progress_percent.py 10: Unused import time (unused-import)
MagTag_Progress_Displays/weblate_translated_percent.py 12: Unused import time (unused-import)

View file

@ -0,0 +1,5 @@
MagTag_SpaceX/code.py 83: Trailing whitespace (trailing-whitespace)
MagTag_SpaceX/code.py 25: Comparison 'val == None' should be 'val is None' (singleton-comparison)
MagTag_SpaceX/code.py 35: Redefining built-in 'min' (redefined-builtin)
MagTag_SpaceX/code.py 30: Comparison 'val2 == None' should be 'val2 is None' (singleton-comparison)
MagTag_SpaceX/code.py 47: Comparison 'val3 == None' should be 'val3 is None' (singleton-comparison)

View file

@ -1,99 +1,99 @@
# SpaceX Launch Display, by Anne Barela November 2020 # SpaceX Launch Display, by Anne Barela November 2020
# MIT License - for Adafruit Industries LLC # MIT License - for Adafruit Industries LLC
# See https://github.com/r-spacex/SpaceX-API for API info # See https://github.com/r-spacex/SpaceX-API for API info
import time import time
import terminalio import terminalio
from adafruit_magtag.magtag import MagTag from adafruit_magtag.magtag import MagTag
months = ["January", "February", "March", "April", "May", "June", "July", months = ["January", "February", "March", "April", "May", "June", "July",
"August", "September", "October", "November", "December"] "August", "September", "October", "November", "December"]
USE_24HR_TIME = True USE_24HR_TIME = True
# in seconds, we can refresh about 100 times on a battery # in seconds, we can refresh about 100 times on a battery
TIME_BETWEEN_REFRESHES = 24 * 60 * 60 # once a day delay TIME_BETWEEN_REFRESHES = 24 * 60 * 60 # once a day delay
# Set up data location and fields # Set up data location and fields
DATA_SOURCE = "https://api.spacexdata.com/v4/launches/next" DATA_SOURCE = "https://api.spacexdata.com/v4/launches/next"
DETAIL_LOCATION = ['details'] DETAIL_LOCATION = ['details']
NAME_LOCATION = ['name'] NAME_LOCATION = ['name']
DATE_LOCATION = ['date_local'] DATE_LOCATION = ['date_local']
# These functions take the JSON data keys and does checks to determine # These functions take the JSON data keys and does checks to determine
# how to display the data. They're used in the add_text blocks below # how to display the data. They're used in the add_text blocks below
def mission_transform(val): def mission_transform(val):
if val == None: if val == None:
val = "Unavailable" val = "Unavailable"
return "Mission: " + val return "Mission: " + val
def time_transform(val2): def time_transform(val2):
if val2 == None: if val2 == None:
return "When: Unavailable" return "When: Unavailable"
month = int(val2[5:7]) month = int(val2[5:7])
day = int(val2[8:10]) day = int(val2[8:10])
hour = int(val2[11:13]) hour = int(val2[11:13])
min = int(val2[14:16]) min = int(val2[14:16])
if USE_24HR_TIME: if USE_24HR_TIME:
timestring = "%d:%02d" % (hour, min) timestring = "%d:%02d" % (hour, min)
elif hour > 12: elif hour > 12:
timestring = "%d:%02d pm" % (hour-12, min) timestring = "%d:%02d pm" % (hour-12, min)
else: else:
timestring = "%d:%02d am" % (hour, min) timestring = "%d:%02d am" % (hour, min)
return "%s %d, at %s" % (months[month-1], day, timestring) return "%s %d, at %s" % (months[month-1], day, timestring)
def details_transform(val3): def details_transform(val3):
if val3 == None or not len(val3): if val3 == None or not len(val3):
return "Details: To Be Determined" return "Details: To Be Determined"
return "Details: " + val3[0:166] + "..." return "Details: " + val3[0:166] + "..."
# Set up the MagTag with the JSON data parameters # Set up the MagTag with the JSON data parameters
magtag = MagTag( magtag = MagTag(
url=DATA_SOURCE, url=DATA_SOURCE,
json_path=(NAME_LOCATION, DATE_LOCATION, DETAIL_LOCATION) json_path=(NAME_LOCATION, DATE_LOCATION, DETAIL_LOCATION)
) )
magtag.add_text( magtag.add_text(
text_font="/fonts/Lato-Bold-ltd-25.bdf", text_font="/fonts/Lato-Bold-ltd-25.bdf",
text_position=(10, 15), text_position=(10, 15),
is_data=False is_data=False
) )
# Display heading text below with formatting above # Display heading text below with formatting above
magtag.set_text("Next SpaceX Launch") magtag.set_text("Next SpaceX Launch")
# Formatting for the mission text # Formatting for the mission text
magtag.add_text( magtag.add_text(
text_font="/fonts/Arial-Bold-12.pcf", text_font="/fonts/Arial-Bold-12.pcf",
text_position=(10, 38), text_position=(10, 38),
text_transform=mission_transform text_transform=mission_transform
) )
# Formatting for the launch time text # Formatting for the launch time text
magtag.add_text( magtag.add_text(
text_font="/fonts/Arial-12.bdf", text_font="/fonts/Arial-12.bdf",
text_position=(10, 60), text_position=(10, 60),
text_transform=time_transform text_transform=time_transform
) )
# Formatting for the details text # Formatting for the details text
magtag.add_text( magtag.add_text(
text_font=terminalio.FONT, text_font=terminalio.FONT,
text_position=(10, 94), text_position=(10, 94),
line_spacing=0.8, line_spacing=0.8,
text_wrap=47, # wrap text at this count text_wrap=47, # wrap text at this count
text_transform=details_transform text_transform=details_transform
) )
try: try:
# Have the MagTag connect to the internet # Have the MagTag connect to the internet
magtag.network.connect() magtag.network.connect()
# This statement gets the JSON data and displays it automagically # This statement gets the JSON data and displays it automagically
value = magtag.fetch() value = magtag.fetch()
print("Response is", value) print("Response is", value)
except (ValueError, RuntimeError) as e: except (ValueError, RuntimeError) as e:
print("Some error occured, retrying! -", e) print("Some error occured, retrying! -", e)
# wait 2 seconds for display to complete # wait 2 seconds for display to complete
time.sleep(2) time.sleep(2)
magtag.exit_and_deep_sleep(TIME_BETWEEN_REFRESHES) magtag.exit_and_deep_sleep(TIME_BETWEEN_REFRESHES)

View file

@ -0,0 +1,2 @@
MagTag_Weather/magtag_weather.py 269: Trailing newlines (trailing-newlines)
MagTag_Weather/magtag_weather.py 7: standard import "from secrets import secrets" should be placed before "import terminalio" (wrong-import-order)

View file

@ -0,0 +1 @@
Magic_Nine_Ball/magic_nine_ball.py 38: Line too long (105/100) (line-too-long)

View file

@ -0,0 +1,3 @@
Make_It_Hot_Cold/hot.py 11: Useless return at end of function or method (useless-return)
Make_It_Hot_Cold/cold.py 11: Useless return at end of function or method (useless-return)
Make_It_Hot_Cold/cold.py 37: Simplify chained comparison between the operands (chained-comparison)

View file

@ -0,0 +1 @@
Make_It_Sense/cpx-ir-decode.py 99: Consider merging these comparisons with "in" to 'command in (111, 143)' (consider-using-in)

View file

@ -0,0 +1 @@
Make_It_Talk/say-temp.py 61: Simplify chained comparison between the operands (chained-comparison)

View file

@ -0,0 +1 @@
Make_It_Twist_Potentiometer/potentiometer-neopixels.py 10: Useless return at end of function or method (useless-return)

View file

@ -0,0 +1,3 @@
Mask_Efficacy/take_video.py 1: Unused import time (unused-import)
Mask_Efficacy/process_run.py 48: Line too long (117/100) (line-too-long)
Mask_Efficacy/process_run.py 23: Comparison 'frame_bin == True' should be 'frame_bin is True' if checking for the singleton value True, or 'bool(frame_bin)' if testing for truthiness (singleton-comparison)

2
Mask_Efficacy/process_run.py Executable file → Normal file
View file

@ -51,4 +51,4 @@ ax.set_ylabel("COUNT")
ax.plot([x[0] for x in frame_data]) ax.plot([x[0] for x in frame_data])
fig.savefig('run_{:03d}_plot.png'.format(RUN)) fig.savefig('run_{:03d}_plot.png'.format(RUN))
print("DONE.") print("DONE.")

View file

@ -0,0 +1 @@
Matrix_Portal_CO2_Monitor/co2_airmon.py 105: No exception type(s) specified (bare-except)

View file

@ -0,0 +1 @@
Matrix_Portal_Eyes/code.py 51: Consider using Python 3 style super() without arguments (super-with-arguments)

View file

@ -0,0 +1,4 @@
Matrix_Portal_Flow_Viewer/flow.py 112: No exception type(s) specified (bare-except)
Matrix_Portal_Flow_Viewer/flow.py 128: No exception type(s) specified (bare-except)
Matrix_Portal_Flow_Viewer/flow_viewer.py 105: No exception type(s) specified (bare-except)
Matrix_Portal_Flow_Viewer/flow_viewer.py 121: No exception type(s) specified (bare-except)

View file

@ -0,0 +1 @@
Matrix_Portal_Handbag/code.py 18: String statement has no effect (pointless-string-statement)

Some files were not shown because too many files have changed in this diff Show more