Skip to content

Commit

Permalink
Fix parsing of 'sphinx' as style argument (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
JenSte authored Jul 19, 2023
1 parent 3575cdf commit 86c38c7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions pydoclint/flake8_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion pydoclint/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 86c38c7

Please sign in to comment.