### Example pyproject.toml for Native pydoclint Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_config.md An example `pyproject.toml` file demonstrating how to configure pydoclint settings, such as disabling return type checks and setting the documentation style to Google. ```toml [tool.pydoclint] check-return-types = false style = "google" ``` -------------------------------- ### Install pydoclint Source: https://github.com/jsh9/pydoclint/blob/main/docs/index.md Use this command to install the native pydoclint tooling. ```bash pip install pydoclint ``` -------------------------------- ### Example pyproject.toml for Flake8 Plugin Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_config.md An example `pyproject.toml` file showing how to configure pydoclint settings when used as a Flake8 plugin. Note the section is `[tool.flake8]` for Flake8-specific configurations. ```toml [tool.flake8] check-return-types = false style = "google" ``` -------------------------------- ### Google: Acceptable docstring with type hints Source: https://github.com/jsh9/pydoclint/blob/main/docs/style_deviations.md An example of an acceptable Google-style docstring with argument and return type hints as per pydoclint's default checks. ```python """ This is a function. Args: arg1 (int): Arg 1 arg2 (float): Arg 2 arg3 (Optional[Union[float, int, str]]): Arg 3 Returns: int: Result """ ``` -------------------------------- ### Install pydoclint with flake8 plugin Source: https://github.com/jsh9/pydoclint/blob/main/docs/index.md Install pydoclint as a flake8 plugin, which also installs flake8. ```bash pip install pydoclint[flake8] ``` -------------------------------- ### Google Style Class Attributes Source: https://github.com/jsh9/pydoclint/blob/main/docs/checking_class_attributes.md Demonstrates documenting class attributes using the Google style guide. Attributes are listed in the 'Attributes' section of the class docstring. ```python class MyPet: """ A class to hold information of my pet. Attributes: name (str): Name of my pet age_in_months (int): Age of my pet (unit: months) weight_in_kg (float): Weight of my pet (unit: kg) is_very_cute_or_not (bool): Is my pet very cute? Or just cute? Args: airtag_id (int): The ID of the AirTag that I put on my pet """ name: str age_in_months: int weight_in_kg: float is_very_cute_or_not: bool = True def __init__(self, airtag_id: int) -> None: self.airtag_id = airtag_id ``` -------------------------------- ### Example Class Definition Source: https://github.com/jsh9/pydoclint/blob/main/docs/checking_class_attributes.md Defines a sample class with type-annotated attributes. This serves as a basis for demonstrating class attribute documentation. ```python class MyPet: name: str age_in_months: int weight_in_kg: float is_very_cute_or_not: bool = True ``` -------------------------------- ### Generate Baseline File Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md When set to True, this option generates a baseline file containing all current project violations. This is useful for initial setup. ```toml [tool.pydoclint] generate-baseline = true ``` -------------------------------- ### Python Generator Type Hinting Example Source: https://github.com/jsh9/pydoclint/blob/main/docs/notes_generator_vs_iterator.md Use `Generator[YieldType, SendType, ReturnType]` for functions that yield and return values. Document both yield and return types in the docstring. ```python from typing import Generator def echo_round() -> Generator[int, float, str]: sent = yield 0 while sent >= 0: sent = yield round(sent) # round() returns int return 'Done' ``` -------------------------------- ### Unrunnable Python Code Example Source: https://github.com/jsh9/pydoclint/blob/main/docs/notes_for_users.md Demonstrates a Python code snippet that is syntactically valid but not runnable because a variable is undefined. pydoclint analyzes syntax, not execution. ```python a = b ``` -------------------------------- ### Register pydoclint with null-ls in Neovim Source: https://github.com/jsh9/pydoclint/blob/main/docs/notes_for_users.md Add this configuration to your Neovim config file to enable pydoclint for diagnostics. Ensure null-ls is installed first. ```lua local null_ls = require("null-ls") null_ls.setup({ sources = { null_ls.builtins.diagnostics.pydoclint, }, }) ``` -------------------------------- ### Inline Documentation for Class Attributes Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md When `require-inline-class-var-docs` is True, class attributes must be documented inline. This example shows the correct format for an inline docstring, including the type and description. ```python class MyClass: """My class.""" field1: int = 5 """int: Field 1 documentation.""" ``` -------------------------------- ### Run All Pre-commit Hooks Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Execute all configured pre-commit hooks to ensure code quality and consistency before committing. ```bash pre-commit run -a ``` -------------------------------- ### Run All Tests with Detailed Traceback Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Use this command to execute all tests and view detailed tracebacks for failures. ```bash pytest --tb=long . ``` -------------------------------- ### Inline Configuration for Native pydoclint Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_config.md Use command-line arguments to specify configuration options directly when running pydoclint. This is useful for quick checks or CI/CD scripts. ```bash pydoclint --check-arg-order=False ``` -------------------------------- ### Perform Basic Linting with Flake8 Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Run basic linting checks on the project using flake8. ```bash flake8 . ``` -------------------------------- ### Pre-commit Configuration with Config File Reference (Native) Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_config.md Reference an existing configuration file (e.g., `pyproject.toml`) within your `.pre-commit-config.yaml` for native pydoclint. This centralizes configuration management. ```yaml - repo: https://github.com/jsh9/pydoclint rev: hooks: - id: pydoclint args: - --config=pyproject.toml ``` -------------------------------- ### Numpy Style Docstring with Combined Attributes and Init Parameters Source: https://github.com/jsh9/pydoclint/blob/main/docs/checking_class_attributes.md Use this style when the `--allow-init-docstring` option is false. Class attributes and constructor parameters are documented in the same docstring. ```python class MyPet: """ A class to hold information of my pet. Attributes ---------- name : str Name of my pet age_in_months : int Age of my pet (unit: months) weight_in_kg : float Weight of my pet (unit: kg) is_very_cute_or_not : bool Is my pet very cute? Or just cute? Parameters ---------- airtag_id : int The ID of the AirTag that I put on my pet """ name: str age_in_months: int weight_in_kg: float is_very_cute_or_not: bool = True def __init__(self, airtag_id: int) -> None: self.airtag_id = airtag_id ``` -------------------------------- ### Numpy Style Docstring with Separate Attributes and Init Parameters Source: https://github.com/jsh9/pydoclint/blob/main/docs/checking_class_attributes.md Use this style when the `--allow-init-docstring` option is true. Class attributes and constructor parameters are documented in separate docstrings. ```python class MyPet: """ A class to hold information of my pet. Attributes ---------- name : str Name of my pet age_in_months : int Age of my pet (unit: months) weight_in_kg : float Weight of my pet (unit: kg) is_very_cute_or_not : bool Is my pet very cute? Or just cute? """ name: str age_in_months: int weight_in_kg: float is_very_cute_or_not: bool = True def __init__(self, airtag_id: int) -> None: """ Initialize a class object. Parameters ---------- airtag_id : int The ID of the AirTag that I put on my pet """ self.airtag_id = airtag_id ``` -------------------------------- ### Run Pre-commit Hooks with Tox (Skips Muff) Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Execute pre-commit hooks using tox, excluding the muff formatter. ```bash tox -e pre-commit ``` -------------------------------- ### Specifying Configuration File Path for Native pydoclint Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_config.md Instruct pydoclint to use a specific configuration file by providing its path using the `--config` option. If not specified, it defaults to `pyproject.toml` in the project root. ```bash pydoclint --config=path/to/my/config.toml ``` -------------------------------- ### Run pydoclint as a native command line tool Source: https://github.com/jsh9/pydoclint/blob/main/docs/index.md Execute pydoclint on specified files or folders using this command. ```bash pydoclint ``` -------------------------------- ### Configure Native Mode NOQA Location Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Use `--native-mode-noqa-location` to specify where pydoclint searches for `# noqa: DOCxxx` comments in native mode. Options are `docstring` (default) or `definition`. ```bash # Example usage (not directly in source, but implied by description): # pydoclint --native-mode-noqa-location=definition your_module/ ``` -------------------------------- ### Configure Baseline File Path Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Specify the file path for the baseline, which stores previous violations to ignore new ones. Useful for gradual adoption. ```toml [tool.pydoclint] baseline = "pydoclint-baseline.txt" ``` -------------------------------- ### TOML Configuration File for Native pydoclint Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_config.md Define pydoclint configuration options in a TOML file (e.g., `pyproject.toml` or a custom path). This allows for more complex and persistent configurations. ```toml [tool.pydoclint] style = 'google' exclude = '\.git|\.tox|tests/data|some_script\.py' require-return-section-when-returning-nothing = true ``` -------------------------------- ### Run Full Test Suite Across Multiple Python Versions Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Execute the complete test suite using tox to ensure compatibility across different Python environments. ```bash tox ``` -------------------------------- ### Check Code Formatting with Muff Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Verify code formatting using muff. Use the `--diff` flag to preview changes without applying them. ```bash muff format --diff --config=muff.toml pydoclint tests ``` -------------------------------- ### Configure Star Argument Documentation Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Control whether star arguments like *args and **kwargs are documented in docstrings. Set to True to include them, False to omit. ```toml [tool.pydoclint] should-document-star-arguments = true ``` -------------------------------- ### Configure pydoclint as a pre-commit hook (Native Mode) Source: https://github.com/jsh9/pydoclint/blob/main/docs/index.md Add this configuration to your .pre-commit-config.yaml to use pydoclint in native mode as a pre-commit hook. Replace with the actual release tag. ```yaml - repo: https://github.com/jsh9/pydoclint rev: hooks: - id: pydoclint args: [--style=google, --check-return-types=False] ``` -------------------------------- ### Generate Baseline File with --generate-baseline Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Use `--generate-baseline=True` when you need to create a baseline file containing all current violations. This option is required when using the `--baseline` option. ```bash # Example usage (not directly in source, but implied by description): # pydoclint --generate-baseline=True --baseline=baseline.txt your_module/ ``` -------------------------------- ### Sphinx Style Class Attributes Source: https://github.com/jsh9/pydoclint/blob/main/docs/checking_class_attributes.md Illustrates documenting class attributes using the Sphinx style. Attributes are documented using the .. attribute:: directive. ```python class MyPet: """ A class to hold information of my pet. .. attribute :: name :type: str Name of my pet .. attribute :: age_in_months :type: int Age of my pet (unit: months) .. attribute :: weight_in_keg :type: float Weight of my pet (unit: kg) .. attribute :: is_very_cute_or_not :type: bool Is my pet very cute? Or just cute? :param airtag_id: The ID of the AirTag that I put on my pet :type airtag_id: int """ name: str age_in_months: int weight_in_kg: float is_very_cute_or_not: bool = True def __init__(self, airtag_id: int) -> None: self.airtag_id = airtag_id ``` -------------------------------- ### Basic Flake8 Checks with Tox Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Perform basic flake8 linting using a specific tox environment. ```bash tox -e flake8-basic ``` -------------------------------- ### Run pydoclint as a flake8 plugin Source: https://github.com/jsh9/pydoclint/blob/main/docs/index.md Use this command to run pydoclint as a flake8 plugin, selecting DOC errors. ```bash flake8 --select=DOC ``` -------------------------------- ### Pre-commit Configuration for Native pydoclint Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_config.md Integrate pydoclint into your pre-commit hooks by specifying its repository, revision, and arguments in `.pre-commit-config.yaml`. This ensures documentation style consistency before commits. ```yaml - repo: https://github.com/jsh9/pydoclint rev: hooks: - id: pydoclint args: - --style=google - --check-return-types=False ``` -------------------------------- ### Format Checking Only with Tox Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Run only the code formatting checks using tox. ```bash tox -e muff ``` -------------------------------- ### Pre-commit Configuration with Config File Reference (Flake8) Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_config.md Configure Flake8 to use a TOML configuration file (e.g., `pyproject.toml`) for pydoclint settings within `.pre-commit-config.yaml`. This requires specifying the TOML config path and other arguments. ```yaml - repo: https://github.com/pycqa/flake8 rev: hooks: - id: flake8 additional_dependencies: - Flake8-pyproject>=1.2.0 - pydoclint== args: - --toml-config=pyproject.toml - --style=google - --check-return-types=False ``` -------------------------------- ### Enable Style Mismatch Checks Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Activate checks for docstring style consistency with the specified --style option. Reports DOC003 violations on mismatch. ```toml [tool.pydoclint] check-style-mismatch = true ``` -------------------------------- ### Configure pydoclint with extra arguments in Neovim Source: https://github.com/jsh9/pydoclint/blob/main/docs/notes_for_users.md Customize pydoclint's behavior by passing additional arguments like style and check-return-types. Adjust `extra_args` as needed for your project. ```lua local null_ls = require("null-ls") null_ls.setup({ sources = { null_ls.builtins.diagnostics.pydoclint.with({ extra_args = {"--style=google", "--check-return-types=False"}, }), }, }) ``` -------------------------------- ### Inline Configuration for Flake8 Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_config.md Specify pydoclint options when using it as a plugin with Flake8 via command-line arguments. Note that the '=' sign is optional but recommended for readability. ```bash flake8 --check-arg-order=False ``` -------------------------------- ### Self-Check with Pydoclint CLI Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Use the pydoclint CLI to perform a self-check on the project, referencing the configuration from pyproject.toml. ```bash pydoclint --config=pyproject.toml . ``` -------------------------------- ### NumPy: Accepted type annotations Source: https://github.com/jsh9/pydoclint/blob/main/docs/style_deviations.md Pydoclint requires type hints that match function signature syntax for NumPy style docstrings. ```text Parameters ---------- iterable : Iterable[int] shape : int | tuple[int, ...] files : list[str] flag : int | None, default=None ``` -------------------------------- ### Run Pydoclint Self-Check with Tox Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Execute the pydoclint self-check using a dedicated tox environment. ```bash tox -e check-self ``` -------------------------------- ### Additional Flake8 Plugins with Tox Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Run flake8 checks that include additional plugins using a dedicated tox environment. ```bash tox -e flake8-misc ``` -------------------------------- ### Docstring Style Checks with Tox Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Execute docstring style checks using flake8 via a specific tox environment. ```bash tox -e flake8-docstrings ``` -------------------------------- ### Allowlist DOC Codes in Ruff Configuration Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_ignore.md Configure Ruff to allowlist pydoclint's DOC codes by adding "DOC" to the `external` setting in your `pyproject.toml` file. ```toml [tool.ruff] external = [ "DOC", # pydoclint ] ``` -------------------------------- ### Configure pydoclint as a pre-commit hook (Flake8 Plugin) Source: https://github.com/jsh9/pydoclint/blob/main/docs/index.md Add this configuration to your .pre-commit-config.yaml to use pydoclint as a flake8 plugin. Replace with the actual release tag. ```yaml - repo: https://github.com/jsh9/pydoclint rev: hooks: - id: pydoclint-flake8 args: [--style=google, --check-return-types=False] ``` -------------------------------- ### Auto-Regenerate Baseline with --auto-regenerate-baseline Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Set `--auto-regenerate-baseline=True` to automatically update the baseline file whenever violations are fixed and pydoclint is rerun. This avoids manual regeneration. ```bash # Example usage (not directly in source, but implied by description): # pydoclint --auto-regenerate-baseline=True your_module/ ``` -------------------------------- ### Set Docstring Style in Pydoclint Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Configure the expected docstring style using the `--style` option. Supported styles include 'numpy', 'google', and 'sphinx'. The default is 'numpy'. ```bash pydoclint --style=google ``` ```bash flake8 --style=google ``` -------------------------------- ### Google: Accepted default value format Source: https://github.com/jsh9/pydoclint/blob/main/docs/style_deviations.md This format for specifying default values is accepted by pydoclint in Google style docstrings. ```text flag (int, default=None): The flag ``` -------------------------------- ### Google: Non-accepted default value format Source: https://github.com/jsh9/pydoclint/blob/main/docs/style_deviations.md This format for specifying default values is not accepted by pydoclint in Google style docstrings. ```text flag (int, optional): The flag. Defaults to 1 ``` -------------------------------- ### Enable Argument Default Checks Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Enforce that docstring type hints include default values consistent with the function signature. Currently only applies to numpy style. ```toml [tool.pydoclint] check-arg-defaults = true ``` -------------------------------- ### Type Checking Only with Tox Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Run only the type checking tasks using tox. ```bash tox -e mypy ``` -------------------------------- ### Run Tests on Specific Python Version with Tox Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Target a specific Python version for testing using tox by specifying the environment name (e.g., py311). ```bash tox -e py311 ``` -------------------------------- ### Inline Docstrings for Class Attributes Source: https://github.com/jsh9/pydoclint/blob/main/docs/checking_class_attributes.md Shows how to use inline docstrings for class attributes, as suggested by PEP-257. This method is supported when the `--require-inline-class-var-docs` option is enabled. ```python class MyClass: """My class that does things.""" field1 = 5 """int: My first field""" ``` -------------------------------- ### Pre-commit Configuration for Flake8 Plugin Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_config.md Configure pydoclint as a Flake8 plugin within your `.pre-commit-config.yaml`. This requires specifying Flake8 as the repo and including pydoclint in `additional_dependencies`. ```yaml - repo: https://github.com/pycqa/flake8 rev: hooks: - id: flake8 additional_dependencies: - pydoclint== args: - --style=google - --check-return-types=False ``` -------------------------------- ### Non-standard self/cls names in Python methods Source: https://github.com/jsh9/pydoclint/blob/main/docs/notes_for_users.md Illustrates Python methods using names other than 'self' or 'cls' for the first argument. pydoclint expects conventional naming for instance and class methods. ```python class MyClass: def myMethod(hello, arg1): # the 1st argument is `self` by convention pass @classmethod def myClassMethod(hey, arg2): # the 1st argument is `cls` by convention pass ``` -------------------------------- ### NumPy: Accepted default values Source: https://github.com/jsh9/pydoclint/blob/main/docs/style_deviations.md Pydoclint accepts these formats for specifying default values in NumPy style docstrings. ```text flag : int | None, default=None something: int, default=2 onething: bool, default=False ``` -------------------------------- ### Omit Stars for Varargs Documentation Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Allow docstring entries for *args or **kwargs to omit the leading '*' for matching. Set to True to enable this flexibility. ```toml [tool.pydoclint] omit-stars-when-documenting-varargs = true ``` -------------------------------- ### Run Single Test File with Pytest Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Execute tests within a specific file using pytest. ```bash pytest tests/test_main.py ``` -------------------------------- ### Perform Type Checking with Mypy Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Utilize mypy for static type checking on the pydoclint codebase. ```bash mypy pydoclint/ ``` -------------------------------- ### NumPy: Non-accepted default values Source: https://github.com/jsh9/pydoclint/blob/main/docs/style_deviations.md These formats for specifying default values are not accepted by pydoclint in NumPy style docstrings. ```text flag : int, optional something: int, default 2 onething: bool, default: False ``` -------------------------------- ### Enforce Type Hints in Docstrings and Signatures Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Control the presence of type hints in docstrings and function signatures using `--arg-type-hints-in-docstring` (`-athd`) and `--arg-type-hints-in-signature` (`-aths`). When both are true, hints must match between signature and docstring. ```bash # Example usage (conceptual, actual flags are command-line arguments): pydoclint --arg-type-hints-in-docstring=True --arg-type-hints-in-signature=True ``` -------------------------------- ### Activate Quiet Mode in Pydoclint Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Use the `--quiet` or `-q` flag to suppress output when no violations are found. This option is only available in native command-line mode. ```bash pydoclint --quiet ``` -------------------------------- ### Show Filenames in Violation Messages Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Configure `--show-filenames-in-every-violation-message` to control how violation messages are displayed. When True, filenames precede each message for easier IDE navigation. ```text file_01.py 10: DOC101: ... 25: DOC105: ... 37: DOC203: ... file_02.py 24: DOC102: ... 51: DOC107: ... 126: DOC203: ... 246: DOC105: ... ``` ```text file_01.py:10: DOC101: ... file_01.py:25: DOC105: ... file_01.py:37: DOC203: ... file_02.py:24: DOC102: ... file_02.py:51: DOC107: ... file_02.py:126: DOC203: ... file_02.py:246: DOC105: ... ``` -------------------------------- ### Run Single Test Function with Pytest Source: https://github.com/jsh9/pydoclint/blob/main/AGENTS.md Execute a specific test function within a file using pytest. ```bash pytest tests/test_main.py::test_function_name ``` -------------------------------- ### Renamed Type Annotations in Python Source: https://github.com/jsh9/pydoclint/blob/main/docs/notes_for_users.md Highlights a scenario where type annotations are renamed using 'as' in Python. pydoclint requires consistency between signature and docstring type annotations, even when aliases are used. ```python from typing import List as hello from typing import Optional as world def myFunc(arg1: hello[int], arg2: world[str]) -> None: """ An example function. pydoclint expects consistency between signature type annotation (`hello[int]`) and docstring type annotation (`List[int]`). Parameters ---------- arg1 : List[int] Arg 1 arg2 : world[str] Arg 2 """ print(arg1, arg2) ``` -------------------------------- ### Exclude Files with Regex in Pydoclint Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Employ the `--exclude` option with a regex pattern to omit specific files from scanning. This is useful for ignoring version control directories or test data. This option is only available in native command-line mode. ```bash pydoclint --exclude='\.git|\.tox|tests/data' ``` -------------------------------- ### NumPy: Non-accepted type annotations Source: https://github.com/jsh9/pydoclint/blob/main/docs/style_deviations.md These natural language type specifications are not accepted by pydoclint in NumPy style docstrings due to ambiguity. ```text Parameters ---------- iterable : iterable object shape : int or tuple of int files : list of str flag : int, optional ``` -------------------------------- ### Renaming classmethod in Python Source: https://github.com/jsh9/pydoclint/blob/main/docs/notes_for_users.md Shows how pydoclint does not handle cases where 'classmethod' is renamed. The static analyzer does not track such reassignments. ```python hello = classmethod class MyClass: @hello def myClassMethod(cls): pass ``` -------------------------------- ### Disable Short Docstring Check Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Use this command to disable pydoclint's check for functions with only a short description in their docstring. ```bash pydoclint --skip-checking-short-docstrings=False ``` ```bash flake8 --skip-checking-short-docstrings=False ``` -------------------------------- ### Inline Ignore Comments in Native Mode Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_ignore.md Use `# noqa:` comments after the docstring or on the definition line to suppress violations when running pydoclint as a native tool. Supports specific codes or prefixes. ```python def funcDocstringComment(arg1: int, arg2: int) -> None: """Docstring text. """ # noqa: DOC101, DOC103 def funcDefinitionComment(arg1: int, arg2: int) -> None: # noqa: DOC103 """Docstring text.""" ``` -------------------------------- ### Disable Argument Order Check Source: https://github.com/jsh9/pydoclint/blob/main/docs/config_options.md Use this command to disable the check that ensures argument order in docstrings matches the function signature. ```bash pydoclint --check-arg-order=False ``` ```bash flake8 --check-arg-order=False ``` -------------------------------- ### Inline Ignore Comments with Flake8 Plugin Source: https://github.com/jsh9/pydoclint/blob/main/docs/how_to_ignore.md When using pydoclint as a flake8 plugin, add `# noqa:` comments to the function definition to ignore specific violation codes or categories. ```python def my_function( # noqa: DOC201, DOC301 arg1, arg2, ) -> None: ... ``` ```python def my_function( # noqa: DOC2 arg1, arg2, ) -> None: ... ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.