This makes black use trailing commas consistently across the codebase.
Without this, it uses certain trailing commas only in files that
contain fstrings (because this marks them as requiring Python 3.6+).
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
+[tool.black]
+target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
+
[tool.cibuildwheel]
build = "cp3[89]* cp310* cp311* cp312*"
test-command = "python -m tornado.test"
url: str,
access_token: Optional[str] = None,
post_args: Optional[Dict[str, Any]] = None,
- **args: Any
+ **args: Any,
) -> Any:
"""Fetches the given URL auth an OAuth2 access token.
path: str,
access_token: Dict[str, Any],
post_args: Optional[Dict[str, Any]] = None,
- **args: Any
+ **args: Any,
) -> Any:
"""Fetches the given API path, e.g., ``statuses/user_timeline/btaylor``
path: str,
access_token: Optional[str] = None,
post_args: Optional[Dict[str, Any]] = None,
- **args: Any
+ **args: Any,
) -> Any:
"""Fetches the given relative API path, e.g., "/btaylor/picture"
def __init__(
self,
async_client_class: "Optional[Type[AsyncHTTPClient]]" = None,
- **kwargs: Any
+ **kwargs: Any,
) -> None:
# Initialize self._closed at the beginning of the constructor
# so that an exception raised here doesn't lead to confusing
self,
request: Union[str, "HTTPRequest"],
raise_error: bool = True,
- **kwargs: Any
+ **kwargs: Any,
) -> "Future[HTTPResponse]":
"""Executes a request, asynchronously returning an `HTTPResponse`.
deadline: Union[float, datetime.timedelta],
callback: Callable,
*args: Any,
- **kwargs: Any
+ **kwargs: Any,
) -> object:
"""Runs the ``callback`` at the time ``deadline`` from the I/O loop.
self,
executor: Optional[concurrent.futures.Executor],
func: Callable[..., _T],
- *args: Any
+ *args: Any,
) -> "Future[_T]":
"""Runs a function in a ``concurrent.futures.Executor``. If
``executor`` is ``None``, the IO loop's default executor will be used.
ssl_options: Union[Dict[str, Any], ssl.SSLContext],
server_hostname: Optional[str] = None,
server_side: Optional[bool] = None,
- **kwargs: Any
+ **kwargs: Any,
) -> ssl.SSLSocket:
"""Returns an ``ssl.SSLSocket`` wrapping the given socket.
self,
application: tornado.web.Application,
request: httputil.HTTPServerRequest,
- **kwargs: Any
+ **kwargs: Any,
) -> None:
super().__init__(application, request, **kwargs)
self.ws_connection = None # type: Optional[WebSocketProtocol]
max_message_size=self.params.max_message_size,
**self._get_compressor_options(
other_side, agreed_parameters, compression_options
- )
+ ),
)
def _write_frame(