Skip to content

Commit

Permalink
Refactor - WarningScope doesn't need to be in its own file
Browse files Browse the repository at this point in the history
Following review see : #2654 (comment)
  • Loading branch information
Pierre-Sassoulas committed Mar 8, 2019
1 parent 757b2a5 commit eedeb55
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pylint/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
from pylint.utils.pylint_ast_walker import PyLintASTWalker
from pylint.utils.reports_handler_mix_in import ReportsHandlerMixIn
from pylint.utils.utils import (
WarningScope,
_basename_in_blacklist_re,
_check_csv,
_format_option_value,
Expand All @@ -77,4 +78,3 @@
safe_decode,
tokenize_module,
)
from pylint.utils.warning_scope import WarningScope
5 changes: 3 additions & 2 deletions pylint/utils/file_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
import collections

from astroid import nodes
from pylint.utils.constants import MSG_STATE_SCOPE_MODULE
from pylint.utils.warning_scope import WarningScope

from pylint.utils import MSG_STATE_SCOPE_MODULE
from pylint.utils.utils import WarningScope


class FileState:
Expand Down
7 changes: 6 additions & 1 deletion pylint/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@
from os.path import basename, dirname, exists, isdir, join, normpath, splitext

from astroid import Module, modutils

from pylint.interfaces import IRawChecker, ITokenChecker, implements
from pylint.utils.constants import MSG_TYPES, MSG_TYPES_LONG, PY_EXTS
from pylint.utils.message_definition import MessageDefinition
from pylint.utils.normalize_text import normalize_text
from pylint.utils.warning_scope import WarningScope


class WarningScope:
LINE = "line-based-msg"
NODE = "node-based-msg"


def get_module_and_frameid(node):
Expand Down
9 changes: 0 additions & 9 deletions pylint/utils/warning_scope.py

This file was deleted.

0 comments on commit eedeb55

Please sign in to comment.