mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-10 14:54:17 +00:00
upgrade pycodestyle to 2.7.0
This commit is contained in:
parent
ac9c66e80b
commit
40aba49d0d
4 changed files with 5 additions and 3 deletions
|
|
@ -41,7 +41,7 @@ install_requires=
|
||||||
# And in which releases we will update those ranges here:
|
# And in which releases we will update those ranges here:
|
||||||
# http://flake8.pycqa.org/en/latest/internal/releases.html#releasing-flake8
|
# http://flake8.pycqa.org/en/latest/internal/releases.html#releasing-flake8
|
||||||
pyflakes >= 2.3.0, < 2.4.0
|
pyflakes >= 2.3.0, < 2.4.0
|
||||||
pycodestyle >= 2.6.0a1, < 2.7.0
|
pycodestyle >= 2.7.0, < 2.8.0
|
||||||
mccabe >= 0.6.0, < 0.7.0
|
mccabe >= 0.6.0, < 0.7.0
|
||||||
enum34; python_version<"3.4"
|
enum34; python_version<"3.4"
|
||||||
typing; python_version<"3.5"
|
typing; python_version<"3.5"
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,8 @@ class FileProcessor(object):
|
||||||
self.indent_level = 0
|
self.indent_level = 0
|
||||||
#: Number of spaces used for indentation
|
#: Number of spaces used for indentation
|
||||||
self.indent_size = options.indent_size
|
self.indent_size = options.indent_size
|
||||||
|
#: String representing the space indentation
|
||||||
|
self.indent_size_str = self.indent_size * " "
|
||||||
#: Line number in the file
|
#: Line number in the file
|
||||||
self.line_number = 0
|
self.line_number = 0
|
||||||
#: Current logical line
|
#: Current logical line
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,6 @@ t.py:2:6: W292 no newline at end of file
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(strict=True) # currently awaiting fix in pycodestyle
|
|
||||||
def test_physical_line_file_not_ending_in_newline_trailing_ws(tmpdir, capsys):
|
def test_physical_line_file_not_ending_in_newline_trailing_ws(tmpdir, capsys):
|
||||||
"""See https://github.com/PyCQA/pycodestyle/issues/960."""
|
"""See https://github.com/PyCQA/pycodestyle/issues/960."""
|
||||||
t_py_src = 'x = 1 '
|
t_py_src = 'x = 1 '
|
||||||
|
|
@ -264,7 +263,7 @@ def test_physical_line_file_not_ending_in_newline_trailing_ws(tmpdir, capsys):
|
||||||
out, err = capsys.readouterr()
|
out, err = capsys.readouterr()
|
||||||
assert out == '''\
|
assert out == '''\
|
||||||
t.py:1:6: W291 trailing whitespace
|
t.py:1:6: W291 trailing whitespace
|
||||||
t.py:1:10: W292 no newline at end of file
|
t.py:1:9: W292 no newline at end of file
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ def options_from(**kwargs):
|
||||||
kwargs.setdefault('hang_closing', True)
|
kwargs.setdefault('hang_closing', True)
|
||||||
kwargs.setdefault('max_line_length', 79)
|
kwargs.setdefault('max_line_length', 79)
|
||||||
kwargs.setdefault('max_doc_length', None)
|
kwargs.setdefault('max_doc_length', None)
|
||||||
|
kwargs.setdefault('indent_size', 4)
|
||||||
kwargs.setdefault('verbose', False)
|
kwargs.setdefault('verbose', False)
|
||||||
kwargs.setdefault('stdin_display_name', 'stdin')
|
kwargs.setdefault('stdin_display_name', 'stdin')
|
||||||
kwargs.setdefault('disable_noqa', False)
|
kwargs.setdefault('disable_noqa', False)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue