From 67772fa0cf258eb9e0a81052b3b12d7172a2ce10 Mon Sep 17 00:00:00 2001 From: Carlos Cordoba Date: Tue, 3 Jan 2023 11:42:13 -0500 Subject: [PATCH] Fix pydocstyle linting with its 6.2.0 version - This was caused by an API breakage in that version. - Also add top constraint on pydocstyle to avoid this kind of errors in the future. --- pylsp/plugins/pydocstyle_lint.py | 4 ++-- pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pylsp/plugins/pydocstyle_lint.py b/pylsp/plugins/pydocstyle_lint.py index 7f4e0723..0aa72b7c 100644 --- a/pylsp/plugins/pydocstyle_lint.py +++ b/pylsp/plugins/pydocstyle_lint.py @@ -66,9 +66,9 @@ def pylsp_lint(config, workspace, document): # Will only yield a single filename, the document path diags = [] - for filename, checked_codes, ignore_decorators in conf.get_files_to_check(): + for filename, checked_codes, ignore_decorators, property_decorators in conf.get_files_to_check(): errors = pydocstyle.checker.ConventionChecker().check_source( - document.source, filename, ignore_decorators=ignore_decorators + document.source, filename, ignore_decorators=ignore_decorators, property_decorators=property_decorators ) try: diff --git a/pyproject.toml b/pyproject.toml index 14223135..9ada832e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ all = [ "flake8>=5.0.0,<7", "mccabe>=0.7.0,<0.8.0", "pycodestyle>=2.9.0,<2.11.0", - "pydocstyle>=2.0.0", + "pydocstyle>=6.2.0,<6.3.0", "pyflakes>=2.5.0,<3.1.0", "pylint>=2.5.0", "rope>1.2.0", @@ -42,7 +42,7 @@ autopep8 = ["autopep8>=1.6.0,<1.7.0"] flake8 = ["flake8>=5.0.0,<7"] mccabe = ["mccabe>=0.7.0,<0.8.0"] pycodestyle = ["pycodestyle>=2.9.0,<2.11.0"] -pydocstyle = ["pydocstyle>=2.0.0"] +pydocstyle = ["pydocstyle>=6.2.0,<6.3.0"] pyflakes = ["pyflakes>=2.5.0,<3.1.0"] pylint = ["pylint>=2.5.0"] rope = ["rope>1.2.0"]