From 1e1a38e7801f410f244e4bbb44ec795ae152e04e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 6 Jan 2019 01:14:26 -0500 Subject: Run black -l 79 against all source files This is a straight reformat run using black as is, with no edits applied at all. The black run will format code consistently, however in some cases that are prevalent in SQLAlchemy code it produces too-long lines. The too-long lines will be resolved in the following commit that will resolve all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9 --- lib/sqlalchemy/inspection.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/sqlalchemy/inspection.py') diff --git a/lib/sqlalchemy/inspection.py b/lib/sqlalchemy/inspection.py index 3a03e2507..7c2ff97c5 100644 --- a/lib/sqlalchemy/inspection.py +++ b/lib/sqlalchemy/inspection.py @@ -32,6 +32,7 @@ in a forwards-compatible way. """ from . import util, exc + _registrars = util.defaultdict(list) @@ -66,13 +67,11 @@ def inspect(subject, raiseerr=True): else: reg = ret = None - if raiseerr and ( - reg is None or ret is None - ): + if raiseerr and (reg is None or ret is None): raise exc.NoInspectionAvailable( "No inspection system is " - "available for object of type %s" % - type_) + "available for object of type %s" % type_ + ) return ret @@ -81,10 +80,11 @@ def _inspects(*types): for type_ in types: if type_ in _registrars: raise AssertionError( - "Type %s is already " - "registered" % type_) + "Type %s is already " "registered" % type_ + ) _registrars[type_] = fn_or_cls return fn_or_cls + return decorate -- cgit v1.2.1