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,15 +1,15 @@
"""Tests for the Nothing formatter obbject."""
import optparse
import argparse
from flake8 import style_guide
from flake8.formatting import default
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)
def test_format_returns_nothing():