From 4ce5bfbf20947cea378ca196a3f2de2874776c12 Mon Sep 17 00:00:00 2001
From: Peter Cock
Date: Mon, 18 May 2020 22:17:24 +0100
Subject: [PATCH] Use alternative parse_options signature.
Flake8 has two choices here, first it tries
parse_options(optmanager, options, extra_args)
and if that fails with a TypeError, does
parse_options(options)
If parse_options fails, we get a cleaner single
exception if we use the first form - easier for
debugging.
---
flake8_black.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flake8_black.py b/flake8_black.py
index 010b241..357c94a 100644
--- a/flake8_black.py
+++ b/flake8_black.py
@@ -138,7 +138,7 @@ def add_options(cls, parser):
)
@classmethod
- def parse_options(cls, options):
+ def parse_options(cls, optmanager, options, extra_args):
"""Adding black-config option."""
# We have one and only one flake8 plugin configuration
if options.black_config is None: