Rename style_guide.Error to style_guide.Violation

Move all Violation related methods from the StyleGuide to our Violation
class.
This commit is contained in:
Ian Cordasco 2017-06-04 07:57:28 -05:00
parent 65107a5624
commit 92c367dee4
No known key found for this signature in database
GPG key ID: 656D3395E4A9791A
9 changed files with 185 additions and 136 deletions

View file

@ -15,7 +15,7 @@ def options(**kwargs):
def test_format_returns_nothing():
"""Verify Nothing.format returns None."""
formatter = default.Nothing(options())
error = style_guide.Error('code', 'file.py', 1, 1, 'text', '1')
error = style_guide.Violation('code', 'file.py', 1, 1, 'text', '1')
assert formatter.format(error) is None
@ -23,6 +23,6 @@ def test_format_returns_nothing():
def test_show_source_returns_nothing():
"""Verify Nothing.show_source returns None."""
formatter = default.Nothing(options())
error = style_guide.Error('code', 'file.py', 1, 1, 'text', '1')
error = style_guide.Violation('code', 'file.py', 1, 1, 'text', '1')
assert formatter.show_source(error) is None