mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-08 22:04:17 +00:00
move from optparse to argparse
This commit is contained in:
parent
03cb85f556
commit
b66ebd7034
30 changed files with 462 additions and 302 deletions
|
|
@ -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'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue