Merge pull request #483 from pimoroni/patch-python-linting

Python: Show source of linting errors.
This commit is contained in:
Philip Howard 2022-08-03 09:26:22 +01:00 committed by GitHub
commit 2855159921
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -17,14 +17,14 @@ jobs:
- name: Lint micropython/modules_py
shell: bash
run: |
python3 -m flake8 --ignore E501 micropython/modules_py
python3 -m flake8 --show-source --ignore E501 micropython/modules_py
- name: Lint micropython/examples
shell: bash
run: |
python3 -m flake8 --ignore E501 micropython/examples
python3 -m flake8 --show-source --ignore E501 micropython/examples
- name: Lint .py tools in C++ examples
shell: bash
run: |
python3 -m flake8 --ignore E501 examples
python3 -m flake8 --show-source --ignore E501 examples

View File

@ -29,7 +29,7 @@ def value_to_char(value):
return chosen_char * 2 # Double chars to - sort of - correct aspect ratio
while(True):
while True:
print("Capturing...")
time.sleep(0.1)

View File

@ -16,7 +16,7 @@ ty = 0
x = 0
y = 0
while(True):
while True:
delta = flo.get_motion()
if delta is not None:
x = delta[0]

View File

@ -16,7 +16,7 @@ import usocket as socket
log = logging.getLogger('WEB')
type_gen = type((lambda: (yield))())
type_gen = type((lambda: (yield))()) # noqa: E275
# uasyncio v3 is shipped with MicroPython 1.13, and contains some subtle
# but breaking changes. See also https://github.com/peterhinch/micropython-async/blob/master/v3/README.md