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:
Adrien Vergé
2016-01-24 17:48:20 +01:00
parent 7b147cb411
commit dbbecb5875
17 changed files with 152 additions and 165 deletions

View File

@@ -4,8 +4,5 @@ Development
yamllint provides both a script and a Python module. The latter can be used to
write your own linting tools:
.. autoclass:: yamllint.errors.LintProblem
:members:
.. automodule:: yamllint
.. automodule:: yamllint.linter
:members: