From 75ca67627022fb61b2b026f359ecc25acad60815 Mon Sep 17 00:00:00 2001
From: Daniel Hahler <git@thequod.de>
Date: Wed, 5 Jul 2017 16:47:32 +0200
Subject: [PATCH] Flake8 fixes

---
 pytest_catchlog/plugin.py | 15 ++++++++-------
 setup.cfg                 |  3 +++
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/pytest_catchlog/plugin.py b/pytest_catchlog/plugin.py
index fe1bd1d..7028160 100644
--- a/pytest_catchlog/plugin.py
+++ b/pytest_catchlog/plugin.py
@@ -3,7 +3,7 @@
 
 import logging
 import sys
-from contextlib import closing, contextmanager
+from contextlib import contextmanager
 
 import pytest
 import py
@@ -11,7 +11,7 @@
 from pytest_catchlog.common import catching_logs
 
 # Let the fixtures be discoverable by pytest.
-from pytest_catchlog.fixture import caplog, capturelog
+from pytest_catchlog.fixture import caplog, capturelog  # noqa
 
 
 DEFAULT_LOG_FORMAT = '%(filename)-25s %(lineno)4d %(levelname)-8s %(message)s'
@@ -34,8 +34,8 @@ def get_option_ini(config, name):
 def pytest_addoption(parser):
     """Add options to control log capturing."""
 
-    group = parser.getgroup('catchlog', 'Log catching')
-    add_option_ini(parser,
+    add_option_ini(
+        parser,
         '--no-print-logs',
         dest='log_print', action='store_const', const=False, default=True,
         help='disable printing caught logs on failed tests.'
@@ -46,12 +46,14 @@ def pytest_addoption(parser):
         dest='log_level', default=None,
         help='logging level used by the logging module'
     )
-    add_option_ini(parser,
+    add_option_ini(
+        parser,
         '--log-format',
         dest='log_format', default=DEFAULT_LOG_FORMAT,
         help='log format as used by the logging module.'
     )
-    add_option_ini(parser,
+    add_option_ini(
+        parser,
         '--log-date-format',
         dest='log_date_format', default=DEFAULT_LOG_DATE_FORMAT,
         help='log date format as used by the logging module.'
@@ -100,7 +102,6 @@ def pytest_addoption(parser):
     )
 
 
-
 def get_actual_log_level(config, setting_name):
     """Return the actual logging level."""
     log_level = get_option_ini(config, setting_name)
diff --git a/setup.cfg b/setup.cfg
index ca1cfaf..36fde10 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -3,3 +3,6 @@ universal = 1
 
 [sdist]
 formats = zip
+
+[flake8]
+max-line-length = 100