diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 3eefea21..076e6959 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -35,11 +35,11 @@ jobs: python-version: '3.8' architecture: 'x64' - run: python -m pip install --upgrade pip setuptools jsonschema - - run: pip install -e .[pylint,pycodestyle,pyflakes] + - run: pip install -e .[pylint,black,pyflakes] - name: Pylint checks run: pylint pylsp test - name: Code style checks - run: pycodestyle pylsp test + run: black --check pylsp test - name: Pyflakes checks run: pyflakes pylsp test - name: Validate JSON schema diff --git a/pyproject.toml b/pyproject.toml index 289d8bf5..d725e9ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ Homepage = "https://github.com/python-lsp/python-lsp-server" [project.optional-dependencies] all = [ "autopep8>=1.6.0,<2.1.0", + "black>=21.11,<22.0", "flake8>=5.0.0,<7", "mccabe>=0.7.0,<0.8.0", "pycodestyle>=2.9.0,<2.11.0", @@ -39,6 +40,7 @@ all = [ "whatthepatch>=1.0.2,<2.0.0" ] autopep8 = ["autopep8>=1.6.0,<2.1.0"] +black = ["black>=21.11,<22.0"] flake8 = ["flake8>=5.0.0,<7"] mccabe = ["mccabe>=0.7.0,<0.8.0"] pycodestyle = ["pycodestyle>=2.9.0,<2.11.0"]