Skip to content

Commit

Permalink
disable pylint and black in each file
Browse files Browse the repository at this point in the history
  • Loading branch information
dhalbert committed Nov 10, 2021
1 parent 794f577 commit f54c741
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 42 deletions.
35 changes: 0 additions & 35 deletions adafruit_asyncio.py

This file was deleted.

6 changes: 6 additions & 0 deletions asyncio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
#
# MicroPython uasyncio module
# MIT license; Copyright (c) 2019 Damien P. George
#
# This code comes from MicroPython, and has not been run through black or pylint there.
# Altering these files significantly would make merging difficult, so we will not use
# pylint or black.
# pylint: skip-file
# fmt: off

from .core import *

Expand Down
6 changes: 6 additions & 0 deletions asyncio/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
#
# MicroPython uasyncio module
# MIT license; Copyright (c) 2019 Damien P. George
#
# This code comes from MicroPython, and has not been run through black or pylint there.
# Altering these files significantly would make merging difficult, so we will not use
# pylint or black.
# pylint: skip-file
# fmt: off

from adafruit_ticks import ticks_ms as ticks, ticks_diff, ticks_add
import sys, select
Expand Down
10 changes: 9 additions & 1 deletion asyncio/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@
#
# MicroPython uasyncio module
# MIT license; Copyright (c) 2019-2020 Damien P. George
#
# This code comes from MicroPython, and has not been run through black or pylint there.
# Altering these files significantly would make merging difficult, so we will not use
# pylint or black.
# pylint: skip-file
# fmt: off

from . import core

# Event class for primitive events that can be waited on, set, and cleared
class Event:
def __init__(self):
self.state = False # False=unset; True=set
self.waiting = core.TaskQueue() # Queue of Tasks waiting on completion of this event
self.waiting = (
core.TaskQueue()
) # Queue of Tasks waiting on completion of this event

def is_set(self):
return self.state
Expand Down
6 changes: 6 additions & 0 deletions asyncio/funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
#
# MicroPython uasyncio module
# MIT license; Copyright (c) 2019-2020 Damien P. George
#
# This code comes from MicroPython, and has not been run through black or pylint there.
# Altering these files significantly would make merging difficult, so we will not use
# pylint or black.
# pylint: skip-file
# fmt: off

from . import core

Expand Down
6 changes: 6 additions & 0 deletions asyncio/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
#
# MicroPython uasyncio module
# MIT license; Copyright (c) 2019-2020 Damien P. George
#
# This code comes from MicroPython, and has not been run through black or pylint there.
# Altering these files significantly would make merging difficult, so we will not use
# pylint or black.
# pylint: skip-file
# fmt: off

from . import core

Expand Down
7 changes: 7 additions & 0 deletions asyncio/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
#
# SPDX-License-Identifier: MIT
#
#
# This code comes from MicroPython, and has not been run through black or pylint there.
# Altering these files significantly would make merging difficult, so we will not use
# pylint or black.
# pylint: skip-file
# fmt: off

# This list of frozen files doesn't include task.py because that's provided by the C module.
freeze(
"..",
Expand Down
10 changes: 9 additions & 1 deletion asyncio/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
#
# MicroPython uasyncio module
# MIT license; Copyright (c) 2019-2020 Damien P. George
#
# This code comes from MicroPython, and has not been run through black or pylint there.
# Altering these files significantly would make merging difficult, so we will not use
# pylint or black.
# pylint: skip-file
# fmt: off

from . import core

Expand Down Expand Up @@ -83,7 +89,9 @@ async def open_connection(host, port):
from uerrno import EINPROGRESS
import usocket as socket

ai = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)[0] # TODO this is blocking!
ai = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)[
0
] # TODO this is blocking!
s = socket.socket(ai[0], ai[1], ai[2])
s.setblocking(False)
ss = Stream(s)
Expand Down
6 changes: 6 additions & 0 deletions asyncio/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
#
# MicroPython uasyncio module
# MIT license; Copyright (c) 2019-2020 Damien P. George
#
# This code comes from MicroPython, and has not been run through black or pylint there.
# Altering these files significantly would make merging difficult, so we will not use
# pylint or black.
# pylint: skip-file
# fmt: off

# This file contains the core TaskQueue based on a pairing heap, and the core Task class.
# They can optionally be replaced by C implementations.
Expand Down
6 changes: 5 additions & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
:py:mod:`~asyncio`

.. If you created a package, create one automodule per module in the package.
.. If your library file(s) are nested in a directory (e.g. /adafruit_foo/foo.py)
.. use this format as the module name: "adafruit_foo.foo"
.. automodule:: adafruit_asyncio
.. automodule:: asyncio
:members:

.. toctree::
:hidden:
5 changes: 1 addition & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@
],
# What does your project relate to?
keywords="adafruit blinka circuitpython micropython asyncio async",

# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
# TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER,
# CHANGE `py_modules=['...']` TO `packages=['...']`
py_modules=["adafruit_asyncio"],
packages=["asyncio"],
)

0 comments on commit f54c741

Please sign in to comment.