Unverified Commit deff8fa6 authored by Sébastien Eustace's avatar Sébastien Eustace
Browse files

Add pyproject.toml file validation

parent f169b487
Loading
Loading
Loading
Loading
+1 −0
Changes for CHANGELOG.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
- Added support for virtualenv autogeneration (Python 3.6+ only).
- Added the `run` command to execute commands inside the created virtualenvs.
- Added the `debug:resolve` command to debug dependency resolution.
- Added `pyproject.toml` file validation.

### Fixed

+2 −0
Changes for poetry/console/application.py: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ from poetry.poetry import Poetry
from .commands import AboutCommand
from .commands import AddCommand
from .commands import BuildCommand
from .commands import CheckCommand
from .commands import ConfigCommand
from .commands import InstallCommand
from .commands import LockCommand
@@ -84,6 +85,7 @@ class Application(BaseApplication):
            AboutCommand(),
            AddCommand(),
            BuildCommand(),
            CheckCommand(),
            ConfigCommand(),
            InstallCommand(),
            LockCommand(),
+1 −0
Changes for poetry/console/commands/__init__.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
from .about import AboutCommand
from .add import AddCommand
from .build import BuildCommand
from .check import CheckCommand
from .config import ConfigCommand
from .install import InstallCommand
from .lock import LockCommand
+17 −0
Changes for poetry/console/commands/check.py: 17 added lines, 0 removed lines.
Original line number Diff line number Diff line
import jsonschema

from .command import Command


class CheckCommand(Command):
    """
    Checks the validity of the <comment>pyproject.toml</comment> file.

    check
    """

    def handle(self):
        # Load poetry and display errors, if any
        _ = self.poetry

        self.info('All set!')

poetry/exceptions.py

0 → 100644
+8 −0
Changes for poetry/exceptions.py: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
class PoetryException(Exception):

    pass


class InvalidProjectFile(PoetryException):

    pass
Loading