Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

DAR103 on built in types and modules parameters with backticks (``) surrounding them #199

@justbispo

Description

@justbispo

Summary

When using backticks (``) on parameter type for built in type parameters (str, int, list...) and modules (os, re...), the DAR103 error is shown.
This doesn't happen with module classes (os.DirEntry, re.Match...).

Is this working as expected? Or is this a bug?

Reproduction

  1. Create a demo.py file with the following content
async def foo(
    param1: os.DirEntry,  # any random class
    param2: str,
) -> None:
    """
    Description here

    Parameters
    ----------
    param1 : `os.DirEntry`
        param1 description.
    param2 : `str`
        param2 description.
    """
  1. Execute darglint -s numpy demo.py

Expected result

No errors reported by darglint or errors reported in both parameters.

Actual result

This error is shown by darlint:

demo.py:foo:9: DAR103:  ~param2: expected str but was `str`

Versions used

darglint 1.8.1 Python 3.10.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions