File tree Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Expand file tree Collapse file tree 1 file changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -706,13 +706,11 @@ def _colorama_workaround():
706
706
first import of colorama while I/O capture is active, colorama will
707
707
fail in various ways.
708
708
"""
709
-
710
- if not sys .platform .startswith ("win32" ):
711
- return
712
- try :
713
- import colorama # noqa
714
- except ImportError :
715
- pass
709
+ if sys .platform .startswith ("win32" ):
710
+ try :
711
+ import colorama # noqa: F401
712
+ except ImportError :
713
+ pass
716
714
717
715
718
716
def _readline_workaround ():
@@ -733,13 +731,11 @@ def _readline_workaround():
733
731
734
732
See https://github.com/pytest-dev/pytest/pull/1281
735
733
"""
736
-
737
- if not sys .platform .startswith ("win32" ):
738
- return
739
- try :
740
- import readline # noqa
741
- except ImportError :
742
- pass
734
+ if sys .platform .startswith ("win32" ):
735
+ try :
736
+ import readline # noqa: F401
737
+ except ImportError :
738
+ pass
743
739
744
740
745
741
def _py36_windowsconsoleio_workaround (stream ):
You can’t perform that action at this time.
0 commit comments