mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-10 14:54:17 +00:00
Represent an error with a namedtuple
This commit is contained in:
parent
276f823de6
commit
5870d136ed
1 changed files with 8 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
"""Implementation of the StyleGuide used by Flake8."""
|
"""Implementation of the StyleGuide used by Flake8."""
|
||||||
|
import collections
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import enum
|
import enum
|
||||||
|
|
@ -32,6 +33,13 @@ class Decision(enum.Enum):
|
||||||
Selected = 'selected error'
|
Selected = 'selected error'
|
||||||
|
|
||||||
|
|
||||||
|
Error = collections.namedtuple('Error', ['code',
|
||||||
|
'filename',
|
||||||
|
'line_number',
|
||||||
|
'column_number',
|
||||||
|
'text'])
|
||||||
|
|
||||||
|
|
||||||
class StyleGuide(object):
|
class StyleGuide(object):
|
||||||
"""Manage a Flake8 user's style guide."""
|
"""Manage a Flake8 user's style guide."""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue