move from optparse to argparse

This commit is contained in:
Anthony Sottile 2019-08-10 18:28:32 -07:00
parent 03cb85f556
commit b66ebd7034
30 changed files with 462 additions and 302 deletions

View file

@ -1,5 +1,5 @@
"""Tests for the BaseFormatter object."""
import optparse
import argparse
import mock
import pytest
@ -9,10 +9,10 @@ from flake8.formatting import base
def options(**kwargs):
"""Create an optparse.Values instance."""
"""Create an argparse.Namespace instance."""
kwargs.setdefault('output_file', None)
kwargs.setdefault('tee', False)
return optparse.Values(kwargs)
return argparse.Namespace(**kwargs)
@pytest.mark.parametrize('filename', [None, 'out.txt'])