Refactor project layout to import yamllint alone
Currently importing yamllint recursively imports its submodules, which finally requires having pyyaml installed. This is a problem when you just want to import APP_VERSION from yamllint. For instance, setup.py imports yamllint to know the version, but doesn't know yet that pyyaml is to be installed, because it is stated in setup.py itself. To solve this, yamllint/__init__.py will only contain constants. The linting functions will be in yamllint/linter.py.
This commit is contained in:
@@ -77,7 +77,7 @@ Use this rule to force comments to be indented like content.
|
||||
|
||||
import yaml
|
||||
|
||||
from yamllint.errors import LintProblem
|
||||
from yamllint.linter import LintProblem
|
||||
from yamllint.rules.common import get_line_indent, get_comments_between_tokens
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user