From 98eae4e181cb2d1bbc67ec834bfad29dcba7f461 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 5 Apr 2022 19:00:19 -0400 Subject: use code generation for scoped_session our decorator thing generates code in any case, so point it at the file itself to generate real code for the blocks rather than doing things dynamically. this will allow typing tools to have no problem whatsoever and we also reduce import time overhead. file size will be a lot bigger though, shrugs. syntax / dupe method / etc. checking will be accomplished by our existing linting / typing / formatting tools. As we are also using "from __future__ import annotations", we also no longer have to apply quotes to generated annotations. Change-Id: I20962cb65bda63ff0fb67357ab346e9b1ef4f108 --- lib/sqlalchemy/engine/base.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/engine') diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py index f3d30860a..5c446a91d 100644 --- a/lib/sqlalchemy/engine/base.py +++ b/lib/sqlalchemy/engine/base.py @@ -2672,14 +2672,18 @@ class Engine( @property def name(self) -> str: """String name of the :class:`~sqlalchemy.engine.interfaces.Dialect` - in use by this :class:`Engine`.""" + in use by this :class:`Engine`. + + """ return self.dialect.name @property def driver(self) -> str: """Driver name of the :class:`~sqlalchemy.engine.interfaces.Dialect` - in use by this :class:`Engine`.""" + in use by this :class:`Engine`. + + """ return self.dialect.driver -- cgit v1.2.1