diff --git a/Makefile b/Makefile index 1ef9992..21a86f3 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ quality: ## check coding style with pycodestyle and pylint pylint openedx_filters test_utils *.py mypy pycodestyle openedx_filters *.py - pydocstyle openedx_filters *.py + ruff check openedx_filters *.py isort --check-only --diff --recursive test_utils openedx_filters *.py test_settings.py python setup.py bdist_wheel twine check dist/* diff --git a/requirements/base.txt b/requirements/base.txt index f8d501a..212788b 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -20,7 +20,7 @@ pymongo==4.11.1 # via edx-opaque-keys sqlparse==0.5.3 # via django -stevedore==5.4.0 +stevedore==5.4.1 # via edx-opaque-keys typing-extensions==4.12.2 # via edx-opaque-keys diff --git a/requirements/ci.txt b/requirements/ci.txt index 64fbd99..a5fb309 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,7 +4,7 @@ # # make upgrade # -cachetools==5.5.1 +cachetools==5.5.2 # via tox chardet==5.2.0 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 50226f8..40f45fc 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -22,7 +22,7 @@ build==1.2.2.post1 # via # -r requirements/pip-tools.txt # pip-tools -cachetools==5.5.1 +cachetools==5.5.2 # via # -r requirements/ci.txt # tox @@ -73,7 +73,7 @@ cryptography==44.0.1 # secretstorage ddt==1.7.2 # via -r requirements/quality.txt -diff-cover==9.2.2 +diff-cover==9.2.3 # via -r requirements/dev.in dill==0.3.9 # via @@ -128,7 +128,7 @@ iniconfig==2.0.0 # via # -r requirements/quality.txt # pytest -isort==6.0.0 +isort==6.0.1 # via # -r requirements/quality.txt # pylint @@ -144,7 +144,7 @@ jaraco-functools==4.1.0 # via # -r requirements/quality.txt # keyring -jeepney==0.8.0 +jeepney==0.9.0 # via # -r requirements/quality.txt # keyring @@ -185,7 +185,7 @@ mypy-extensions==1.0.0 # via # -r requirements/quality.txt # mypy -nh3==0.2.20 +nh3==0.2.21 # via # -r requirements/quality.txt # readme-renderer @@ -225,8 +225,6 @@ pycparser==2.22 # via # -r requirements/quality.txt # cffi -pydocstyle==6.3.0 - # via -r requirements/quality.txt pygments==2.19.1 # via # -r requirements/quality.txt @@ -305,6 +303,8 @@ rich==13.9.4 # via # -r requirements/quality.txt # twine +ruff==0.9.8 + # via -r requirements/quality.txt secretstorage==3.3.3 # via # -r requirements/quality.txt @@ -313,15 +313,11 @@ six==1.17.0 # via # -r requirements/quality.txt # edx-lint -snowballstemmer==2.2.0 - # via - # -r requirements/quality.txt - # pydocstyle sqlparse==0.5.3 # via # -r requirements/quality.txt # django -stevedore==5.4.0 +stevedore==5.4.1 # via # -r requirements/quality.txt # code-annotations diff --git a/requirements/doc.txt b/requirements/doc.txt index 2e6b528..95e20ca 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -99,7 +99,7 @@ jaraco-context==6.0.1 # via keyring jaraco-functools==4.1.0 # via keyring -jeepney==0.8.0 +jeepney==0.9.0 # via # keyring # secretstorage @@ -128,12 +128,13 @@ mypy-extensions==1.0.0 # via # -r requirements/test.txt # mypy -nh3==0.2.20 +nh3==0.2.21 # via readme-renderer packaging==24.2 # via # -r requirements/test.txt # build + # pydata-sphinx-theme # pytest # sphinx # twine @@ -147,7 +148,7 @@ pluggy==1.5.0 # pytest pycparser==2.22 # via cffi -pydata-sphinx-theme==0.16.1 +pydata-sphinx-theme==0.15.4 # via sphinx-book-theme pygments==2.19.1 # via @@ -197,6 +198,8 @@ rfc3986==2.0.0 # via twine rich==13.9.4 # via twine +roman-numerals-py==3.1.0 + # via sphinx secretstorage==3.3.3 # via keyring sniffio==1.3.1 @@ -205,7 +208,7 @@ snowballstemmer==2.2.0 # via sphinx soupsieve==2.6 # via beautifulsoup4 -sphinx==8.1.3 +sphinx==8.2.1 # via # -r requirements/doc.in # pydata-sphinx-theme @@ -216,7 +219,7 @@ sphinx==8.1.3 # sphinxcontrib-mermaid sphinx-autobuild==2024.10.3 # via -r requirements/doc.in -sphinx-book-theme==1.1.3 +sphinx-book-theme==1.1.4 # via -r requirements/doc.in sphinx-copybutton==0.5.2 # via -r requirements/doc.in @@ -240,9 +243,9 @@ sqlparse==0.5.3 # via # -r requirements/test.txt # django -starlette==0.45.3 +starlette==0.46.0 # via sphinx-autobuild -stevedore==5.4.0 +stevedore==5.4.1 # via # -r requirements/test.txt # code-annotations diff --git a/requirements/pip.txt b/requirements/pip.txt index e6c3348..7ac0a3e 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -12,5 +12,5 @@ pip==24.2 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/pip.in -setuptools==75.8.0 +setuptools==75.8.2 # via -r requirements/pip.in diff --git a/requirements/quality.in b/requirements/quality.in index a59b20f..155d9c4 100644 --- a/requirements/quality.in +++ b/requirements/quality.in @@ -6,6 +6,6 @@ edx-lint # edX pylint rules and plugins isort # to standardize order of imports pycodestyle # PEP 8 compliance validation -pydocstyle # PEP 257 compliance validation twine # Utility for publishing Python packages on PyPI. mypy # Static type checker +ruff # A modern Python code linter and formatter. diff --git a/requirements/quality.txt b/requirements/quality.txt index e86455d..d4a2027 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -75,7 +75,7 @@ iniconfig==2.0.0 # via # -r requirements/test.txt # pytest -isort==6.0.0 +isort==6.0.1 # via # -r requirements/quality.in # pylint @@ -85,7 +85,7 @@ jaraco-context==6.0.1 # via keyring jaraco-functools==4.1.0 # via keyring -jeepney==0.8.0 +jeepney==0.9.0 # via # keyring # secretstorage @@ -117,7 +117,7 @@ mypy-extensions==1.0.0 # via # -r requirements/test.txt # mypy -nh3==0.2.20 +nh3==0.2.21 # via readme-renderer packaging==24.2 # via @@ -138,8 +138,6 @@ pycodestyle==2.12.1 # via -r requirements/quality.in pycparser==2.22 # via cffi -pydocstyle==6.3.0 - # via -r requirements/quality.in pygments==2.19.1 # via # readme-renderer @@ -192,17 +190,17 @@ rfc3986==2.0.0 # via twine rich==13.9.4 # via twine +ruff==0.9.8 + # via -r requirements/quality.in secretstorage==3.3.3 # via keyring six==1.17.0 # via edx-lint -snowballstemmer==2.2.0 - # via pydocstyle sqlparse==0.5.3 # via # -r requirements/test.txt # django -stevedore==5.4.0 +stevedore==5.4.1 # via # -r requirements/test.txt # code-annotations diff --git a/requirements/test.txt b/requirements/test.txt index 68d36f9..a03562d 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -71,7 +71,7 @@ sqlparse==0.5.3 # via # -r requirements/base.txt # django -stevedore==5.4.0 +stevedore==5.4.1 # via # -r requirements/base.txt # code-annotations diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000..8d64e90 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,24 @@ +[lint] +select = [ + "D", # pydocstyle +] + +ignore = [ + "D101", # Missing docstring in public class + "D200", # One-line docstring should fit on one line + "D212", # Multi-line docstring summary should start at the first line + "D405", # Section name should be properly capitalized + "D410", # Missing blank line after section + "D411", # Missing blank line before section + "D412", # No blank lines allowed between a section header and its content + "D414", # Section has no content, + + # Ignore all other pydocstyle errors + "D102", # Missing docstring in public method + "D205", # 1 blank line required between summary line and description + "D415", # First line should end with a period, question mark, or exclamation point +] + +[lint.pydocstyle] +# Use Google-style docstrings. +convention = "google" diff --git a/tox.ini b/tox.ini index ab38651..763da3a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,6 @@ [tox] envlist = py{311, 312}-django{42}, quality, docs - [doc8] ; D001 = Line too long ignore=D001 @@ -11,26 +10,6 @@ exclude = .git,.tox max-line-length = 120 max-doc-length = 120 -[pydocstyle] -; D101 = Missing docstring in public class -; D200 = One-line docstring should fit on one line with quotes -; D203 = 1 blank line required before class docstring -; D212 = Multi-line docstring summary should start at the first line -; D215 = Section underline is over-indented (numpy style) -; D404 = First word of the docstring should not be This (numpy style) -; D405 = Section name should be properly capitalized (numpy style) -; D406 = Section name should end with a newline (numpy style) -; D407 = Missing dashed underline after section (numpy style) -; D408 = Section underline should be in the line following the section's name (numpy style) -; D409 = Section underline should match the length of its name (numpy style) -; D410 = Missing blank line after section (numpy style) -; D411 = Missing blank line before section (numpy style) -; D412 = No blank lines allowed between a section header and its content (numpy style) -; D413 = Missing blank line after last section (numpy style) -; D414 = Section has no content (numpy style) -ignore = D101,D200,D203,D212,D215,D404,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414 - - [pytest] DJANGO_SETTINGS_MODULE = test_utils.test_settings addopts = --cov openedx_filters --cov-report term-missing --cov-report xml