mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-10 12:04:06 +00:00
more formatting fixes
Found by flake8.
This commit is contained in:
@@ -85,7 +85,7 @@ class DBConnection:
|
||||
|
||||
# Use a dict to hand in the parameters because async is a reserved
|
||||
# word in Python3.
|
||||
self.conn = psycopg2.connect(**{'dsn' : self.dsn, 'async' : True})
|
||||
self.conn = psycopg2.connect(**{'dsn': self.dsn, 'async': True})
|
||||
self.wait()
|
||||
|
||||
self.cursor = self.conn.cursor(cursor_factory=cursor_factory)
|
||||
|
||||
@@ -61,7 +61,7 @@ def _setup_postgresql_features(conn):
|
||||
"""
|
||||
pg_version = conn.server_version_tuple()
|
||||
return {
|
||||
'has_index_non_key_column' : pg_version >= (11, 0, 0)
|
||||
'has_index_non_key_column': pg_version >= (11, 0, 0)
|
||||
}
|
||||
|
||||
class SQLPreprocessor:
|
||||
|
||||
@@ -61,9 +61,9 @@ def execute_file(dsn, fname, ignore_errors=False, pre_code=None, post_code=None)
|
||||
|
||||
|
||||
# List of characters that need to be quoted for the copy command.
|
||||
_SQL_TRANSLATION = {ord(u'\\') : u'\\\\',
|
||||
ord(u'\t') : u'\\t',
|
||||
ord(u'\n') : u'\\n'}
|
||||
_SQL_TRANSLATION = {ord(u'\\'): u'\\\\',
|
||||
ord(u'\t'): u'\\t',
|
||||
ord(u'\n'): u'\\n'}
|
||||
|
||||
class CopyBuffer:
|
||||
""" Data collector for the copy_from command.
|
||||
|
||||
Reference in New Issue
Block a user