From 32699d08a1cadceef3f09065cedb543a63e8e35e Mon Sep 17 00:00:00 2001 From: Jens Steinhauser Date: Tue, 18 Jul 2023 21:40:54 +0200 Subject: [PATCH 1/2] Fix parsing of 'sphinx' as style argument --- pydoclint/flake8_entry.py | 4 ++-- pydoclint/main.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pydoclint/flake8_entry.py b/pydoclint/flake8_entry.py index 356e04d..2a343b1 100644 --- a/pydoclint/flake8_entry.py +++ b/pydoclint/flake8_entry.py @@ -141,9 +141,9 @@ def run(self) -> Generator[Tuple[int, int, str, Any], None, None]: self.require_return_section_when_returning_none, ) - if self.style not in {'numpy', 'google'}: + if self.style not in {'numpy', 'google', 'sphinx'}: raise ValueError( - 'Invalid value for "--style": must be "numpy" or "google"' + 'Invalid value for "--style": must be "numpy", "google", or "sphinx"' ) v = Visitor( diff --git a/pydoclint/main.py b/pydoclint/main.py index 15e066c..cbaa45a 100644 --- a/pydoclint/main.py +++ b/pydoclint/main.py @@ -25,7 +25,7 @@ def validateStyleValue( value: Optional[str], ) -> Optional[str]: """Validate the value of the 'style' option""" - if value not in {'numpy', 'google'}: + if value not in {'numpy', 'google', 'sphinx'}: raise click.BadParameter( '"--style" must be "numpy", "google", or "sphinx"' ) From f1e58fe1ea17323918fb67540e34886fcba2aa82 Mon Sep 17 00:00:00 2001 From: jsh9 <25124332+jsh9@users.noreply.github.com> Date: Tue, 18 Jul 2023 19:13:40 -0700 Subject: [PATCH 2/2] Update changelog and bump version --- CHANGELOG.md | 7 +++++++ setup.cfg | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c5fb8a..c792db9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [0.1.1] - 2023-07-18 + +- Fixed + - Fixed incorrect blocking of "sphinx" style in CLI arguments +- Full diff + - https://github.com/jsh9/pydoclint/compare/0.1.0...0.1.1 + ## [0.1.0] - 2023-07-15 - Added diff --git a/setup.cfg b/setup.cfg index f4cab81..aaed74d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pydoclint -version = 0.1.0 +version = 0.1.1 description = A Python docstring linter that checks arguments, returns, yields, and raises sections long_description = file: README.md long_description_content_type = text/markdown