Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/tox.ini: Add cython-lint #35385

Merged
merged 5 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/doc/en/developer/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ available::
pycodestyle-minimal -- check against Sage's minimal style conventions
relint -- check whether some forbidden patterns appear
(includes all patchbot pattern-exclusion plugins)
rst -- validate Python docstrings markup as reStructuredText
codespell -- check for misspelled words in source code
cython-lint -- Check Cython files for code style
pyright -- run the static typing checker pyright
pycodestyle -- check against the Python style conventions of PEP8
-p auto -- run test environments in parallel
--help -- show tox help
Expand Down Expand Up @@ -208,6 +211,14 @@ or a few related issues::
*Documentation:* https://pycodestyle.pycqa.org/en/latest/index.html


.. _section-tools-cython-lint:

Cython-lint
===========

`Cython-lint <https://pypi.org/project/cython-lint/>`_ checks Cython source files
for coding style.

.. _section-tools-relint:

Relint
Expand Down
6 changes: 6 additions & 0 deletions src/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ description =
deps = flake8-rst-docstrings
commands = flake8 --select=RST {posargs:{toxinidir}/sage/}

[testenv:cython-lint]
description =
Check Cython files for code style
deps = cython-lint
commands = cython-lint --no-pycodestyle {posargs:{toxinidir}/sage/}

[flake8]
rst-roles =
# Sphinx
Expand Down
8 changes: 8 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -780,3 +780,11 @@ passenv = {[sage_src]passenv}
envdir = {[sage_src]envdir}
commands = {[sage_src]commands}
allowlist_externals = {[sage_src]allowlist_externals}

[testenv:cython-lint]
description =
Check Cython files for code style
passenv = {[sage_src]passenv}
envdir = {[sage_src]envdir}
commands = {[sage_src]commands}
allowlist_externals = {[sage_src]allowlist_externals}