From 3a5e4b02748eb6a3eb1a57665bb8ceef932ea8fb Mon Sep 17 00:00:00 2001 From: "jsh9, PhD" <25124332+jsh9@users.noreply.github.com> Date: Sat, 17 Feb 2024 02:45:07 -0500 Subject: [PATCH] Remove useless argument `--src` (#124) --- CHANGELOG.md | 3 ++- pydoclint/main.py | 22 ---------------------- setup.cfg | 2 +- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 702f94f..abc04dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ # Change Log -## [unpublished] - 2024-02-17 +## [0.4.1] - 2024-02-17 - Fixed - A bug where using double quotes in Literal type (such as `Literal["foo"]` could produce a false positive `DOC203` violation. + - Removed useless argument `--src` ## [0.4.0] - 2024-02-08 diff --git a/pydoclint/main.py b/pydoclint/main.py index c7c07f9..a63356f 100644 --- a/pydoclint/main.py +++ b/pydoclint/main.py @@ -42,12 +42,6 @@ def validateStyleValue( context_settings={'help_option_names': ['-h', '--help']}, help='Pydoclint, a linter for Python docstring styles', ) -@click.option( - '-s', - '--src', - type=str, - help='The source code to check', -) @click.option( '-q', '--quiet', @@ -273,7 +267,6 @@ def main( # noqa: C901 quiet: bool, exclude: str, style: str, - src: Optional[str], paths: Tuple[str, ...], type_hints_in_signature: str, type_hints_in_docstring: str, @@ -341,21 +334,6 @@ def main( # noqa: C901 ) ctx.exit(1) - if paths and src is not None: - click.echo( - main.get_usage(ctx) - + "\n\n'paths' and 'src' cannot be passed simultaneously.", - err=echoAsError, - ) - ctx.exit(1) - - if not paths and src is None: - click.echo( - main.get_usage(ctx) + "\n\nOne of 'paths' or 'src' is required.", - err=echoAsError, - ) - ctx.exit(1) - # it means users supply this option if baseline is not None: baselinePath = Path(baseline) diff --git a/setup.cfg b/setup.cfg index 37b9352..d498cf5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pydoclint -version = 0.4.0 +version = 0.4.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