lint: Set black target version to 3.8+
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+).
This commit is contained in:
parent
39346ce185
commit
90ae304f6f
|
@ -2,6 +2,9 @@
|
|||
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"
|
||||
|
|
|
@ -632,7 +632,7 @@ class OAuth2Mixin:
|
|||
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.
|
||||
|
||||
|
@ -761,7 +761,7 @@ class TwitterMixin(OAuthMixin):
|
|||
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``
|
||||
|
||||
|
@ -1096,7 +1096,7 @@ class FacebookGraphMixin(OAuth2Mixin):
|
|||
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"
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ class HTTPClient:
|
|||
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
|
||||
|
@ -250,7 +250,7 @@ class AsyncHTTPClient(Configurable):
|
|||
self,
|
||||
request: Union[str, "HTTPRequest"],
|
||||
raise_error: bool = True,
|
||||
**kwargs: Any
|
||||
**kwargs: Any,
|
||||
) -> "Future[HTTPResponse]":
|
||||
"""Executes a request, asynchronously returning an `HTTPResponse`.
|
||||
|
||||
|
|
|
@ -554,7 +554,7 @@ class IOLoop(Configurable):
|
|||
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.
|
||||
|
||||
|
@ -705,7 +705,7 @@ class IOLoop(Configurable):
|
|||
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.
|
||||
|
|
|
@ -645,7 +645,7 @@ def ssl_wrap_socket(
|
|||
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.
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ class WebSocketHandler(tornado.web.RequestHandler):
|
|||
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]
|
||||
|
@ -1015,7 +1015,7 @@ class WebSocketProtocol13(WebSocketProtocol):
|
|||
max_message_size=self.params.max_message_size,
|
||||
**self._get_compressor_options(
|
||||
other_side, agreed_parameters, compression_options
|
||||
)
|
||||
),
|
||||
)
|
||||
|
||||
def _write_frame(
|
||||
|
|
Loading…
Reference in New Issue