From 4eb4ceca36c7ce931ea65ac06d6ed08bf459fc66 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Thu, 3 Nov 2022 20:52:21 +0100 Subject: Try running pyupgrade on the code command run is "pyupgrade --py37-plus --keep-runtime-typing --keep-percent-format " pyupgrade will change assert_ to assertTrue. That was reverted since assertTrue does not exists in sqlalchemy fixtures Change-Id: Ie1ed2675c7b11d893d78e028aad0d1576baebb55 --- lib/sqlalchemy/engine/create.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sqlalchemy/engine/create.py') diff --git a/lib/sqlalchemy/engine/create.py b/lib/sqlalchemy/engine/create.py index 1ad8c90e7..c8736392f 100644 --- a/lib/sqlalchemy/engine/create.py +++ b/lib/sqlalchemy/engine/create.py @@ -115,7 +115,7 @@ def create_engine(url: Union[str, URL], **kwargs: Any) -> Engine: "is deprecated and will be removed in a future release. ", ), ) -def create_engine(url: Union[str, "_url.URL"], **kwargs: Any) -> Engine: +def create_engine(url: Union[str, _url.URL], **kwargs: Any) -> Engine: """Create a new :class:`_engine.Engine` instance. The standard calling form is to send the :ref:`URL ` as the @@ -806,11 +806,11 @@ def engine_from_config( """ - options = dict( - (key[len(prefix) :], configuration[key]) + options = { + key[len(prefix) :]: configuration[key] for key in configuration if key.startswith(prefix) - ) + } options["_coerce_config"] = True options.update(kwargs) url = options.pop("url") -- cgit v1.2.1