IssueRaiser

Implement rules in `darglint`

This might be superseded by https://github.com/astral-sh/ruff/issues/12434 --- https://pypi.org/project/darglint/ > Darglint's primary focus is to identify incorrect and missing documentationd of a function's signature. Checking style is a stretch goal, and is supported on a best-effort basis. Darglint does not check stylistic preferences expressed by tools in the Python Code Quality Authority (through tools such as <code>pydocstyle</code>). So when using Darglint, it may be a good idea to also use <code>pydocstyle</code>, if you want to enforce style. (For example, <code>pydocstyle</code> requires the short summary to be separated from other sections by a line break. Darglint makes no such check.) <h3>Error Codes</h3> <ul> <li><em>DAR001</em>: The docstring was not parsed correctly due to a syntax error.</li> <li><em>DAR002</em>: An argument/exception lacks a description</li> <li><em>DAR003</em>: A line is under-indented or over-indented.</li> <li><em>DAR004</em>: The docstring contains an extra newline where it shouldn't.</li> <li><em>DAR005</em>: The item contains a type section (parentheses), but no type.</li> <li><em>DAR101</em>: The docstring is missing a parameter in the definition.</li> <li><em>DAR102</em>: The docstring contains a parameter not in function.</li> <li><em>DAR103</em>: The docstring parameter type doesn't match function.</li> <li><em>DAR104</em>: (disabled) The docstring parameter has no type specified</li> <li><em>DAR105</em>: The docstring par

Posted by edgarrmondragon on Oct 21, 2022, 1:21 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,500 issues0 comments

github (Software)

Implement rules in `darglint`

edgarrmondragonOct 21, 2022, 1:21 AM

This might be superseded by https://github.com/astral-sh/ruff/issues/12434 --- https://pypi.org/project/darglint/ > Darglint's primary focus is to identify incorrect and missing documentationd of a function's signature. Checking style is a stretch goal, and is supported on a best-effort basis. Darglint does not check stylistic preferences expressed by tools in the Python Code Quality Authority (through tools such as <code>pydocstyle</code>). So when using Darglint, it may be a good idea to also use <code>pydocstyle</code>, if you want to enforce style. (For example, <code>pydocstyle</code> requires the short summary to be separated from other sections by a line break. Darglint makes no such check.) <h3>Error Codes</h3> <ul> <li><em>DAR001</em>: The docstring was not parsed correctly due to a syntax error.</li> <li><em>DAR002</em>: An argument/exception lacks a description</li> <li><em>DAR003</em>: A line is under-indented or over-indented.</li> <li><em>DAR004</em>: The docstring contains an extra newline where it shouldn't.</li> <li><em>DAR005</em>: The item contains a type section (parentheses), but no type.</li> <li><em>DAR101</em>: The docstring is missing a parameter in the definition.</li> <li><em>DAR102</em>: The docstring contains a parameter not in function.</li> <li><em>DAR103</em>: The docstring parameter type doesn't match function.</li> <li><em>DAR104</em>: (disabled) The docstring parameter has no type specified</li> <li><em>DAR105</em>: The docstring par

Comments (0)

No comments yet. Start the discussion.

Comment on this issue