Coverage for lintro / parsers / pydoclint / pydoclint_issue.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2026-04-03 18:53 +0000

1"""Pydoclint issue model. 

2 

3This module defines the dataclass for representing issues found by pydoclint, 

4a docstring linter that validates docstrings match function signatures. 

5""" 

6 

7from __future__ import annotations 

8 

9from dataclasses import dataclass, field 

10from typing import ClassVar 

11 

12from lintro.enums.severity_level import SeverityLevel 

13from lintro.parsers.base_issue import BaseIssue 

14 

15 

16@dataclass 

17class PydoclintIssue(BaseIssue): 

18 """Represents an issue found by pydoclint. 

19 

20 Pydoclint outputs issues in the following format: 

21 path/file.py:line:col: DOCxxx: message 

22 

23 Attributes: 

24 DEFAULT_SEVERITY: Defaults to INFO (documentation linter). 

25 code: DOC code string (e.g., "DOC101"). 

26 """ 

27 

28 DEFAULT_SEVERITY: ClassVar[SeverityLevel] = SeverityLevel.INFO 

29 

30 code: str = field(default="")