diff --git a/README.md b/README.md index 8216f52..124abdc 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ Please read this page: ## 3. Style violation codes -_pydoclint_ currently has 6 categories of style violation codes: +_pydoclint_ currently has 7 categories of style violation codes: - `DOC0xx`: Docstring parsing issues - `DOC1xx`: Violations about input arguments @@ -147,6 +147,7 @@ _pydoclint_ currently has 6 categories of style violation codes: - `DOC3xx`: Violations about class docstring and class constructor - `DOC4xx`: Violations about "yield" statements - `DOC5xx`: Violations about "raise" statements +- `DOC6xx`: Violations about class attributes For detailed explanations of each violation code, please read this page: [_pydoclint_ style violation codes](https://jsh9.github.io/pydoclint/violation_codes.html). diff --git a/docs/index.md b/docs/index.md index 8216f52..124abdc 100644 --- a/docs/index.md +++ b/docs/index.md @@ -139,7 +139,7 @@ Please read this page: ## 3. Style violation codes -_pydoclint_ currently has 6 categories of style violation codes: +_pydoclint_ currently has 7 categories of style violation codes: - `DOC0xx`: Docstring parsing issues - `DOC1xx`: Violations about input arguments @@ -147,6 +147,7 @@ _pydoclint_ currently has 6 categories of style violation codes: - `DOC3xx`: Violations about class docstring and class constructor - `DOC4xx`: Violations about "yield" statements - `DOC5xx`: Violations about "raise" statements +- `DOC6xx`: Violations about class attributes For detailed explanations of each violation code, please read this page: [_pydoclint_ style violation codes](https://jsh9.github.io/pydoclint/violation_codes.html). diff --git a/docs/violation_codes.md b/docs/violation_codes.md index 03bbdf1..063d994 100644 --- a/docs/violation_codes.md +++ b/docs/violation_codes.md @@ -11,6 +11,7 @@ - [3. `DOC3xx`: Violations about class docstring and class constructor](#3-doc3xx-violations-about-class-docstring-and-class-constructor) - [4. `DOC4xx`: Violations about "yield" statements](#4-doc4xx-violations-about-yield-statements) - [5. `DOC5xx`: Violations about "raise" statements](#5-doc5xx-violations-about-raise-statements) +- [6. `DOC6xx`: Violations about class attributes](#6-doc6xx-violations-about-class-attributes) @@ -86,3 +87,16 @@ have a return section. | -------- | --------------------------------------------------------------------------------------------------------- | | `DOC501` | Function/method has "raise" statements, but the docstring does not have a "Raises" section | | `DOC502` | Function/method has a "Raises" section in the docstring, but there are not "raise" statements in the body | + +## 6. `DOC6xx`: Violations about class attributes + +| Code | Explanation | +| -------- | --------------------------------------------------------------------------------- | +| `DOC601` | Class docstring contains fewer class attributes than actual class attributes. | +| `DOC602` | Class docstring contains more class attributes than in actual class attributes. | +| `DOC603` | Class docstring attributes are different from actual class attributes. | +| `DOC604` | Attributes are the same in docstring and class def, but are in a different order. | +| `DOC605` | Attribute names match, but type hints in these attributes do not match | + +More about checking class attributes: +https://jsh9.github.io/pydoclint/checking_class_attributes.html