Skip to content

Commit f8c30fe

Browse files
committed
Apply black formatter
1 parent 9827df7 commit f8c30fe

File tree

7 files changed

+166
-149
lines changed

7 files changed

+166
-149
lines changed

aiosignal/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from frozenlist import FrozenList
22

3-
__version__ = '1.1.3a2'
3+
__version__ = "1.1.3a2"
44

5-
__all__ = ('Signal',)
5+
__all__ = ("Signal",)
66

77

88
class Signal(FrozenList):
@@ -14,16 +14,16 @@ class Signal(FrozenList):
1414
arguments.
1515
"""
1616

17-
__slots__ = ('_owner',)
17+
__slots__ = ("_owner",)
1818

1919
def __init__(self, owner):
2020
super().__init__()
2121
self._owner = owner
2222

2323
def __repr__(self):
24-
return '<Signal owner={}, frozen={}, {!r}>'.format(self._owner,
25-
self.frozen,
26-
list(self))
24+
return "<Signal owner={}, frozen={}, {!r}>".format(
25+
self._owner, self.frozen, list(self)
26+
)
2727

2828
async def send(self, *args, **kwargs):
2929
"""

aiosignal/__init__.pyi

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,11 @@ from typing import Any, Generic, TypeVar
22

33
from frozenlist import FrozenList
44

5-
__all__ = ('Signal',)
6-
7-
8-
_T = TypeVar('_T')
5+
__all__ = ("Signal",)
96

7+
_T = TypeVar("_T")
108

119
class Signal(FrozenList[_T], Generic[_T]):
12-
1310
def __init__(self, owner: Any) -> None: ...
14-
1511
def __repr__(self) -> str: ...
16-
1712
async def send(self, *args: Any, **kwargs: Any) -> None: ...

docs/conf.py

Lines changed: 94 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,22 @@
1919

2020

2121
_docs_path = os.path.dirname(__file__)
22-
_version_path = os.path.abspath(os.path.join(_docs_path,
23-
'..', 'aiosignal', '__init__.py'))
24-
with io.open(_version_path, 'r', encoding='latin1') as fp:
22+
_version_path = os.path.abspath(
23+
os.path.join(_docs_path, "..", "aiosignal", "__init__.py")
24+
)
25+
with io.open(_version_path, "r", encoding="latin1") as fp:
2526
try:
26-
_version_info = re.search(r"^__version__ = '"
27-
r"(?P<major>\d+)"
28-
r"\.(?P<minor>\d+)"
29-
r"\.(?P<patch>\d+)"
30-
r"(?P<tag>.*)?'$",
31-
fp.read(), re.M).groupdict()
27+
_version_info = re.search(
28+
r'^__version__ = "'
29+
r"(?P<major>\d+)"
30+
r"\.(?P<minor>\d+)"
31+
r"\.(?P<patch>\d+)"
32+
r'(?P<tag>.*)?"$',
33+
fp.read(),
34+
re.M,
35+
).groupdict()
3236
except IndexError:
33-
raise RuntimeError('Unable to determine version.')
37+
raise RuntimeError("Unable to determine version.")
3438

3539

3640
# -- General configuration ------------------------------------------------
@@ -42,51 +46,50 @@
4246
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4347
# ones.
4448
extensions = [
45-
'sphinx.ext.viewcode',
46-
'sphinx.ext.intersphinx',
47-
'sphinxcontrib.asyncio',
49+
"sphinx.ext.viewcode",
50+
"sphinx.ext.intersphinx",
51+
"sphinxcontrib.asyncio",
4852
]
4953

5054

5155
try:
5256
import sphinxcontrib.spelling # noqa
53-
extensions.append('sphinxcontrib.spelling')
57+
58+
extensions.append("sphinxcontrib.spelling")
5459
except ImportError:
5560
pass
5661

5762

5863
intersphinx_mapping = {
59-
'python': ('http://docs.python.org/3', None),
60-
'aiohttp':
61-
('https://docs.aiohttp.org/en/stable/', None),
62-
'frozenlist':
63-
('https://frozenlist.readthedocs.io/en/latest/', None),
64+
"python": ("http://docs.python.org/3", None),
65+
"aiohttp": ("https://docs.aiohttp.org/en/stable/", None),
66+
"frozenlist": ("https://frozenlist.readthedocs.io/en/latest/", None),
6467
}
6568

6669
# Add any paths that contain templates here, relative to this directory.
67-
templates_path = ['_templates']
70+
templates_path = ["_templates"]
6871

6972
# The suffix of source filenames.
70-
source_suffix = '.rst'
73+
source_suffix = ".rst"
7174

7275
# The encoding of source files.
7376
# source_encoding = 'utf-8-sig'
7477

7578
# The master toctree document.
76-
master_doc = 'index'
79+
master_doc = "index"
7780

7881
# General information about the project.
79-
project = 'aiosignal'
80-
copyright = '2013-2019, aiosignal contributors'
82+
project = "aiosignal"
83+
copyright = "2013-2019, aiosignal contributors"
8184

8285
# The version info for the project you're documenting, acts as replacement for
8386
# |version| and |release|, also used in various other places throughout the
8487
# built documents.
8588
#
8689
# The short X.Y version.
87-
version = '{major}.{minor}'.format(**_version_info)
90+
version = "{major}.{minor}".format(**_version_info)
8891
# The full version, including alpha/beta/rc tags.
89-
release = '{major}.{minor}.{patch}{tag}'.format(**_version_info)
92+
release = "{major}.{minor}.{patch}{tag}".format(**_version_info)
9093

9194
# The language for content autogenerated by Sphinx. Refer to documentation
9295
# for a list of supported languages.
@@ -100,7 +103,7 @@
100103

101104
# List of patterns, relative to source directory, that match files and
102105
# directories to ignore when looking for source files.
103-
exclude_patterns = ['_build']
106+
exclude_patterns = ["_build"]
104107

105108
# The reST default role (used for this markup: `text`) to use for all
106109
# documents.
@@ -121,7 +124,7 @@
121124
# pygments_style = 'sphinx'
122125

123126
# The default language to highlight source code in.
124-
highlight_language = 'python3'
127+
highlight_language = "python3"
125128

126129
# A list of ignored prefixes for module index sorting.
127130
# modindex_common_prefix = []
@@ -134,40 +137,52 @@
134137

135138
# The theme to use for HTML and HTML Help pages. See the documentation for
136139
# a list of builtin themes.
137-
html_theme = 'aiohttp_theme'
140+
html_theme = "aiohttp_theme"
138141

139142
# Theme options are theme-specific and customize the look and feel of a theme
140143
# further. For a list of options available for each theme, see the
141144
# documentation.
142145
html_theme_options = {
143-
'logo': None,
144-
'description': 'aiosignal: a list of registered asynchronous callbacks.',
145-
'canonical_url': 'http://aiosignal.readthedocs.io/en/stable/',
146-
'github_user': 'aio-libs',
147-
'github_repo': 'aiosignal',
148-
'github_button': True,
149-
'github_type': 'star',
150-
'github_banner': True,
151-
'badges': [{'image': 'https://github.com/aio-libs/aiosignal/workflows/CI/badge.svg',
152-
'target': 'https://github.com/aio-libs/aiosignal/actions?query=workflow%3ACI',
153-
'height': '20',
154-
'alt': 'GitHub CI status for master branch'},
155-
{'image': 'https://codecov.io/github/aio-libs/aiosignal/coverage.svg?branch=master',
156-
'target': 'https://codecov.io/github/aio-libs/aiosignal',
157-
'height': '20',
158-
'alt': 'Code coverage status'},
159-
{'image': 'https://badge.fury.io/py/aiosignal.svg',
160-
'target': 'https://badge.fury.io/py/aiosignal',
161-
'height': '20',
162-
'alt': 'Latest PyPI package version'},
163-
{'image': 'https://img.shields.io/discourse/topics?server=https%3A%2F%2Faio-libs.discourse.group%2F',
164-
'target': 'https://aio-libs.discourse.group/',
165-
'height': '20',
166-
'alt': 'Discourse group for io-libs'},
167-
{'image': 'https://badges.gitter.im/Join%20Chat.svg',
168-
'target': 'https://gitter.im/aio-libs/Lobby',
169-
'height': '20',
170-
'alt': 'Chat on Gitter'}],
146+
"logo": None,
147+
"description": "aiosignal: a list of registered asynchronous callbacks.",
148+
"canonical_url": "http://aiosignal.readthedocs.io/en/stable/",
149+
"github_user": "aio-libs",
150+
"github_repo": "aiosignal",
151+
"github_button": True,
152+
"github_type": "star",
153+
"github_banner": True,
154+
"badges": [
155+
{
156+
"image": "https://github.com/aio-libs/aiosignal/workflows/CI/badge.svg",
157+
"target": "https://github.com/aio-libs/aiosignal/actions?query=workflow%3ACI",
158+
"height": "20",
159+
"alt": "GitHub CI status for master branch",
160+
},
161+
{
162+
"image": "https://codecov.io/github/aio-libs/aiosignal/coverage.svg?branch=master",
163+
"target": "https://codecov.io/github/aio-libs/aiosignal",
164+
"height": "20",
165+
"alt": "Code coverage status",
166+
},
167+
{
168+
"image": "https://badge.fury.io/py/aiosignal.svg",
169+
"target": "https://badge.fury.io/py/aiosignal",
170+
"height": "20",
171+
"alt": "Latest PyPI package version",
172+
},
173+
{
174+
"image": "https://img.shields.io/discourse/topics?server=https%3A%2F%2Faio-libs.discourse.group%2F",
175+
"target": "https://aio-libs.discourse.group/",
176+
"height": "20",
177+
"alt": "Discourse group for io-libs",
178+
},
179+
{
180+
"image": "https://badges.gitter.im/Join%20Chat.svg",
181+
"target": "https://gitter.im/aio-libs/Lobby",
182+
"height": "20",
183+
"alt": "Chat on Gitter",
184+
},
185+
],
171186
}
172187

173188
# Add any paths that contain custom themes here, relative to this directory.
@@ -209,8 +224,10 @@
209224

210225
# Custom sidebar templates, maps document names to template names.
211226
html_sidebars = {
212-
'**': [
213-
'about.html', 'navigation.html', 'searchbox.html',
227+
"**": [
228+
"about.html",
229+
"navigation.html",
230+
"searchbox.html",
214231
]
215232
}
216233

@@ -245,18 +262,16 @@
245262
# html_file_suffix = None
246263

247264
# Output file base name for HTML help builder.
248-
htmlhelp_basename = 'aiosignaldoc'
265+
htmlhelp_basename = "aiosignaldoc"
249266

250267

251268
# -- Options for LaTeX output ---------------------------------------------
252269

253270
latex_elements = {
254271
# The paper size ('letterpaper' or 'a4paper').
255272
# 'papersize': 'letterpaper',
256-
257273
# The font size ('10pt', '11pt' or '12pt').
258274
# 'pointsize': '10pt',
259-
260275
# Additional stuff for the LaTeX preamble.
261276
# 'preamble': '',
262277
}
@@ -265,8 +280,13 @@
265280
# (source start file, target name, title,
266281
# author, documentclass [howto, manual, or own class]).
267282
latex_documents = [
268-
('index', 'aiosignal.tex', 'aiosignal Documentation',
269-
'aiosignal contributors', 'manual'),
283+
(
284+
"index",
285+
"aiosignal.tex",
286+
"aiosignal Documentation",
287+
"aiosignal contributors",
288+
"manual",
289+
),
270290
]
271291

272292
# The name of an image file (relative to this directory) to place at the top of
@@ -294,10 +314,7 @@
294314

295315
# One entry per manual page. List of tuples
296316
# (source start file, name, description, authors, manual section).
297-
man_pages = [
298-
('index', 'aiosignal', 'aiosignal Documentation',
299-
['aiosignal'], 1)
300-
]
317+
man_pages = [("index", "aiosignal", "aiosignal Documentation", ["aiosignal"], 1)]
301318

302319
# If true, show URL addresses after external links.
303320
# man_show_urls = False
@@ -309,9 +326,15 @@
309326
# (source start file, target name, title, author,
310327
# dir menu entry, description, category)
311328
texinfo_documents = [
312-
('index', 'aiosignal', 'aiosignal Documentation',
313-
'aiosignal contributors', 'aiosignal', 'One line description of project.',
314-
'Miscellaneous'),
329+
(
330+
"index",
331+
"aiosignal",
332+
"aiosignal Documentation",
333+
"aiosignal contributors",
334+
"aiosignal",
335+
"One line description of project.",
336+
"Miscellaneous",
337+
),
315338
]
316339

317340
# Documents to append as an appendix to all manuals.

setup.cfg

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ max-line-length=79
1111
zip_ok = false
1212

1313
[flake8]
14-
ignore = N801,N802,N803,E226,W504,E252
15-
max-line-length=79
14+
ignore = N801,N802,N803,E203,E226,E305,W504,E252,E301,E302,E704,W503,W504,F811
15+
max-line-length = 88
1616

1717
[isort]
18-
multi_line_output=3
18+
line_length=88
1919
include_trailing_comma=True
20+
multi_line_output=3
2021
force_grid_wrap=0
21-
use_parentheses=True
22+
combine_as_imports=True
2223

2324
known_third_party=pytest
2425
known_first_party=aiosignal

0 commit comments

Comments
 (0)