From 549d4c91656897fe57fbf2e35e964f2a4962210f Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Thu, 4 Apr 2019 00:51:23 +0200 Subject: [PATCH] silence warning "E306 expected 1 blank line before a nested definition" --- daklib/checks.py | 1 + daklib/dbconn.py | 1 + setup.cfg | 1 - tests/test_daklib_fstransactions.py | 1 + 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/daklib/checks.py b/daklib/checks.py index b23819f9..a604ccac 100644 --- a/daklib/checks.py +++ b/daklib/checks.py @@ -498,6 +498,7 @@ class BinaryTimestampCheck(Check): def __init__(self): self.future_files = dict() self.past_files = dict() + def callback(self, member, data): if member.mtime > future_cutoff: self.future_files[member.name] = member.mtime diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 9b97c013..71f24a61 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -2522,6 +2522,7 @@ class DBConn(object): # Monkey patch a new dialect in in order to support service= syntax import sqlalchemy.dialects.postgresql from sqlalchemy.dialects.postgresql.psycopg2 import PGDialect_psycopg2 + class PGDialect_psycopg2_dak(PGDialect_psycopg2): def create_connect_args(self, url): if str(url).startswith('postgresql://service='): diff --git a/setup.cfg b/setup.cfg index 03482474..b16ddffe 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,7 +17,6 @@ ignore = E261, E265, E266, - E306, E402, E722, E731, diff --git a/tests/test_daklib_fstransactions.py b/tests/test_daklib_fstransactions.py index 45663578..d1ef2b2f 100644 --- a/tests/test_daklib_fstransactions.py +++ b/tests/test_daklib_fstransactions.py @@ -109,6 +109,7 @@ class FilesystemTransactionTestCase(DakTestCase): with TemporaryDirectory() as t: self._write_to_a(t) a = t.filename('a') + class TestException(Exception): pass -- GitLab