diff options
| author | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2020-11-17 21:37:42 +0200 |
|---|---|---|
| committer | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2020-11-17 22:22:11 +0200 |
| commit | 7babeccbececd9dd02642dfd193a3c3a0fc0dbe7 (patch) | |
| tree | fe83142e2763e9d922edbb97b16db6f46bb84a52 /lib/extensions.py | |
| parent | 6c48b63ae4a70da6dbbc5b6eef20806d7f505950 (diff) | |
| download | psycopg2-7babeccbececd9dd02642dfd193a3c3a0fc0dbe7.tar.gz | |
Upgrade Python syntax with pyupgrade --py36-plus
Diffstat (limited to 'lib/extensions.py')
| -rw-r--r-- | lib/extensions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/extensions.py b/lib/extensions.py index c4a6618..1de6607 100644 --- a/lib/extensions.py +++ b/lib/extensions.py @@ -106,7 +106,7 @@ def register_adapter(typ, callable): # The SQL_IN class is the official adapter for tuples starting from 2.0.6. -class SQL_IN(object): +class SQL_IN: """Adapt any iterable to an SQL quotable object.""" def __init__(self, seq): self._seq = seq @@ -130,7 +130,7 @@ class SQL_IN(object): return str(self.getquoted()) -class NoneAdapter(object): +class NoneAdapter: """Adapt None to NULL. This adapter is not used normally as a fast path in mogrify uses NULL, @@ -168,7 +168,7 @@ def make_dsn(dsn=None, **kwargs): tmp.update(kwargs) kwargs = tmp - dsn = " ".join(["%s=%s" % (k, _param_escape(str(v))) + dsn = " ".join(["{}={}".format(k, _param_escape(str(v))) for (k, v) in kwargs.items()]) # verify that the returned dsn is valid |
