Skip to content

Commit

Permalink
ignore false positive E231 missing whitespace flake8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
xflr6 committed Mar 10, 2024
1 parent 06b0e49 commit 5f95f6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions treedb/backend/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def progress(status, remaining, total):
log.info('%d of %d pages copied', total - remaining, total)

with contextlib.closing(engine.raw_connection()) as source_fairy,\
contextlib.closing(result.raw_connection()) as dest_fairy:
contextlib.closing(result.raw_connection()) as dest_fairy: # noqa: E231
log.debug('sqlite3.backup(%r)', dest_fairy.driver_connection)

dest_fairy.execute('PRAGMA synchronous = OFF')
Expand Down Expand Up @@ -150,7 +150,7 @@ def dump_sql(filename=None, /, *,

n = 0
with contextlib.closing(engine.raw_connection()) as dbapi_fairy,\
open_path('wt', encoding=encoding) as f:
open_path('wt', encoding=encoding) as f: # noqa: E231
for n, line in enumerate(dbapi_fairy.iterdump(), start=1):
print(line, file=f)
if not (n % progress_after):
Expand Down Expand Up @@ -184,7 +184,7 @@ def csv_zipfile(filename=None, /, *, exclude_raw: bool = False,

log.info('write %r', filename)
with _backend.connect(bind=engine) as conn,\
zipfile.ZipFile(filename, 'w', zipfile.ZIP_DEFLATED) as z:
zipfile.ZipFile(filename, 'w', zipfile.ZIP_DEFLATED) as z: # noqa: E231
for table in sorted_tables:
if table.name in skip:
log.debug('skip table %r', table.name)
Expand Down
2 changes: 1 addition & 1 deletion treedb/raw/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,5 @@ def iterkeys(key_column, /, *, size: int = WINDOWSIZE,
size, str(key_column.expression))

with _backend.connect(bind=bind) as conn,\
contextlib.closing(conn.execute(select_keys)) as result:
contextlib.closing(conn.execute(select_keys)) as result: # noqa: E231
yield from result.scalars()

0 comments on commit 5f95f6a

Please sign in to comment.