diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-01-06 01:14:26 -0500 |
---|---|---|
committer | mike bayer <mike_mp@zzzcomputing.com> | 2019-01-06 17:34:50 +0000 |
commit | 1e1a38e7801f410f244e4bbb44ec795ae152e04e (patch) | |
tree | 28e725c5c8188bd0cfd133d1e268dbca9b524978 /lib/sqlalchemy/dialects/mysql/gaerdbms.py | |
parent | 404e69426b05a82d905cbb3ad33adafccddb00dd (diff) | |
download | sqlalchemy-1e1a38e7801f410f244e4bbb44ec795ae152e04e.tar.gz |
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
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/gaerdbms.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/gaerdbms.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/gaerdbms.py b/lib/sqlalchemy/dialects/mysql/gaerdbms.py index 806e4c874..117cd28a2 100644 --- a/lib/sqlalchemy/dialects/mysql/gaerdbms.py +++ b/lib/sqlalchemy/dialects/mysql/gaerdbms.py @@ -44,11 +44,10 @@ from sqlalchemy.util import warn_deprecated def _is_dev_environment(): - return os.environ.get('SERVER_SOFTWARE', '').startswith('Development/') + return os.environ.get("SERVER_SOFTWARE", "").startswith("Development/") class MySQLDialect_gaerdbms(MySQLDialect_mysqldb): - @classmethod def dbapi(cls): @@ -69,12 +68,15 @@ class MySQLDialect_gaerdbms(MySQLDialect_mysqldb): if _is_dev_environment(): from google.appengine.api import rdbms_mysqldb + return rdbms_mysqldb - elif apiproxy_stub_map.apiproxy.GetStub('rdbms'): + elif apiproxy_stub_map.apiproxy.GetStub("rdbms"): from google.storage.speckle.python.api import rdbms_apiproxy + return rdbms_apiproxy else: from google.storage.speckle.python.api import rdbms_googleapi + return rdbms_googleapi @classmethod @@ -87,8 +89,8 @@ class MySQLDialect_gaerdbms(MySQLDialect_mysqldb): if not _is_dev_environment(): # 'dsn' and 'instance' are because we are skipping # the traditional google.api.rdbms wrapper - opts['dsn'] = '' - opts['instance'] = url.query['instance'] + opts["dsn"] = "" + opts["instance"] = url.query["instance"] return [], opts def _extract_error_code(self, exception): @@ -99,4 +101,5 @@ class MySQLDialect_gaerdbms(MySQLDialect_mysqldb): if code: return int(code) + dialect = MySQLDialect_gaerdbms |