Skip to content

Commit f54c741

Browse files
committed
disable pylint and black in each file
1 parent 794f577 commit f54c741

File tree

11 files changed

+61
-42
lines changed

11 files changed

+61
-42
lines changed

adafruit_asyncio.py

-35
This file was deleted.

asyncio/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
#
55
# MicroPython uasyncio module
66
# MIT license; Copyright (c) 2019 Damien P. George
7+
#
8+
# This code comes from MicroPython, and has not been run through black or pylint there.
9+
# Altering these files significantly would make merging difficult, so we will not use
10+
# pylint or black.
11+
# pylint: skip-file
12+
# fmt: off
713

814
from .core import *
915

asyncio/core.py

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
#
55
# MicroPython uasyncio module
66
# MIT license; Copyright (c) 2019 Damien P. George
7+
#
8+
# This code comes from MicroPython, and has not been run through black or pylint there.
9+
# Altering these files significantly would make merging difficult, so we will not use
10+
# pylint or black.
11+
# pylint: skip-file
12+
# fmt: off
713

814
from adafruit_ticks import ticks_ms as ticks, ticks_diff, ticks_add
915
import sys, select

asyncio/event.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,22 @@
44
#
55
# MicroPython uasyncio module
66
# MIT license; Copyright (c) 2019-2020 Damien P. George
7+
#
8+
# This code comes from MicroPython, and has not been run through black or pylint there.
9+
# Altering these files significantly would make merging difficult, so we will not use
10+
# pylint or black.
11+
# pylint: skip-file
12+
# fmt: off
713

814
from . import core
915

1016
# Event class for primitive events that can be waited on, set, and cleared
1117
class Event:
1218
def __init__(self):
1319
self.state = False # False=unset; True=set
14-
self.waiting = core.TaskQueue() # Queue of Tasks waiting on completion of this event
20+
self.waiting = (
21+
core.TaskQueue()
22+
) # Queue of Tasks waiting on completion of this event
1523

1624
def is_set(self):
1725
return self.state

asyncio/funcs.py

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
#
55
# MicroPython uasyncio module
66
# MIT license; Copyright (c) 2019-2020 Damien P. George
7+
#
8+
# This code comes from MicroPython, and has not been run through black or pylint there.
9+
# Altering these files significantly would make merging difficult, so we will not use
10+
# pylint or black.
11+
# pylint: skip-file
12+
# fmt: off
713

814
from . import core
915

asyncio/lock.py

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
#
55
# MicroPython uasyncio module
66
# MIT license; Copyright (c) 2019-2020 Damien P. George
7+
#
8+
# This code comes from MicroPython, and has not been run through black or pylint there.
9+
# Altering these files significantly would make merging difficult, so we will not use
10+
# pylint or black.
11+
# pylint: skip-file
12+
# fmt: off
713

814
from . import core
915

asyncio/manifest.py

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
#
33
# SPDX-License-Identifier: MIT
44
#
5+
#
6+
# This code comes from MicroPython, and has not been run through black or pylint there.
7+
# Altering these files significantly would make merging difficult, so we will not use
8+
# pylint or black.
9+
# pylint: skip-file
10+
# fmt: off
11+
512
# This list of frozen files doesn't include task.py because that's provided by the C module.
613
freeze(
714
"..",

asyncio/stream.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
#
55
# MicroPython uasyncio module
66
# MIT license; Copyright (c) 2019-2020 Damien P. George
7+
#
8+
# This code comes from MicroPython, and has not been run through black or pylint there.
9+
# Altering these files significantly would make merging difficult, so we will not use
10+
# pylint or black.
11+
# pylint: skip-file
12+
# fmt: off
713

814
from . import core
915

@@ -83,7 +89,9 @@ async def open_connection(host, port):
8389
from uerrno import EINPROGRESS
8490
import usocket as socket
8591

86-
ai = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)[0] # TODO this is blocking!
92+
ai = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)[
93+
0
94+
] # TODO this is blocking!
8795
s = socket.socket(ai[0], ai[1], ai[2])
8896
s.setblocking(False)
8997
ss = Stream(s)

asyncio/task.py

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
#
55
# MicroPython uasyncio module
66
# MIT license; Copyright (c) 2019-2020 Damien P. George
7+
#
8+
# This code comes from MicroPython, and has not been run through black or pylint there.
9+
# Altering these files significantly would make merging difficult, so we will not use
10+
# pylint or black.
11+
# pylint: skip-file
12+
# fmt: off
713

814
# This file contains the core TaskQueue based on a pairing heap, and the core Task class.
915
# They can optionally be replaced by C implementations.

docs/api.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
:py:mod:`~asyncio`
12

23
.. If you created a package, create one automodule per module in the package.
34
45
.. If your library file(s) are nested in a directory (e.g. /adafruit_foo/foo.py)
56
.. use this format as the module name: "adafruit_foo.foo"
67
7-
.. automodule:: adafruit_asyncio
8+
.. automodule:: asyncio
89
:members:
10+
11+
.. toctree::
12+
:hidden:

setup.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@
5757
],
5858
# What does your project relate to?
5959
keywords="adafruit blinka circuitpython micropython asyncio async",
60-
6160
# You can just specify the packages manually here if your project is
6261
# simple. Or you can use find_packages().
63-
# TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER,
64-
# CHANGE `py_modules=['...']` TO `packages=['...']`
65-
py_modules=["adafruit_asyncio"],
62+
packages=["asyncio"],
6663
)

0 commit comments

Comments
 (0)