File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 14
14
from concurrent .futures import ThreadPoolExecutor
15
15
from contextlib import contextmanager , redirect_stderr
16
16
from dataclasses import fields , replace
17
+ from importlib .metadata import version as imp_version
17
18
from io import BytesIO
18
19
from pathlib import Path , WindowsPath
19
20
from platform import system
25
26
import pytest
26
27
from click import unstyle
27
28
from click .testing import CliRunner
29
+ from packaging .version import Version
28
30
from pathspec import PathSpec
29
31
30
32
import black
@@ -114,7 +116,10 @@ class BlackRunner(CliRunner):
114
116
"""Make sure STDOUT and STDERR are kept separate when testing Black via its CLI."""
115
117
116
118
def __init__ (self ) -> None :
117
- super ().__init__ (mix_stderr = False )
119
+ if Version (imp_version ("click" )) >= Version ("8.2.0" ):
120
+ super ().__init__ ()
121
+ else :
122
+ super ().__init__ (mix_stderr = False )
118
123
119
124
120
125
def invokeBlack (
You can’t perform that action at this time.
0 commit comments