diff --git a/docs/config_options.md b/docs/config_options.md index e9e062c..0a0bf1c 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -26,7 +26,7 @@ page: - [13. `--ignore-underscore-args` (shortform: `-iua`, default: `True`)](#13---ignore-underscore-args-shortform--iua-default-true) - [14. `--check-class-attributes` (shortform: `-cca`, default: `True`)](#14---check-class-attributes-shortform--cca-default-true) - [15. `--should-document-private-class-attributes` (shortform: `-sdpca`, default: `False`)](#15---should-document-private-class-attributes-shortform--sdpca-default-false) -- [16. `--treat-property-methods-as-class-attributes` (shortform: `-tpmaca`, default: `True`)](#16---treat-property-methods-as-class-attributes-shortform--tpmaca-default-true) +- [16. `--treat-property-methods-as-class-attributes` (shortform: `-tpmaca`, default: `False`)](#16---treat-property-methods-as-class-attributes-shortform--tpmaca-default-false) - [17. `--baseline`](#17---baseline) - [18. `--generate-baseline` (default: `False`)](#18---generate-baseline-default-false) - [19. `--show-filenames-in-every-violation-message` (shortform: `-sfn`, default: `False`)](#19---show-filenames-in-every-violation-message-shortform--sfn-default-false) @@ -194,13 +194,12 @@ for more instructions. If True, private class attributes (those that start with leading `_`) should be documented. If False, they should not be documented. -## 16. `--treat-property-methods-as-class-attributes` (shortform: `-tpmaca`, default: `True`) +## 16. `--treat-property-methods-as-class-attributes` (shortform: `-tpmaca`, default: `False`) If True, treat `@property` methods as class properties. This means that they need to be documented in the "Attributes" section of the class docstring, and there cannot be any docstring under the @property methods. This option is only -effective when --check-class-attributes is True. We recommend setting both this -option and --check-class-attributes to True. +effective when --check-class-attributes is True. ## 17. `--baseline` diff --git a/pydoclint/flake8_entry.py b/pydoclint/flake8_entry.py index 20f86c8..93b8513 100644 --- a/pydoclint/flake8_entry.py +++ b/pydoclint/flake8_entry.py @@ -183,7 +183,7 @@ def add_options(cls, parser): # noqa: D102 '-tpmaca', '--treat-property-methods-as-class-attributes', action='store', - default='True', + default='False', parse_from_config=True, help=( 'If True, treat @property methods as class properties. This means' diff --git a/pydoclint/main.py b/pydoclint/main.py index 3678874..ef16f5a 100644 --- a/pydoclint/main.py +++ b/pydoclint/main.py @@ -223,7 +223,7 @@ def validateStyleValue( '--treat-property-methods-as-class-attributes', type=bool, show_default=True, - default=True, + default=False, help=( 'If True, treat @property methods as class properties. This means' ' that they need to be documented in the "Attributes" section of' @@ -527,7 +527,7 @@ def _checkPaths( ignoreUnderscoreArgs: bool = True, checkClassAttributes: bool = True, shouldDocumentPrivateClassAttributes: bool = False, - treatPropertyMethodsAsClassAttributes: bool = True, + treatPropertyMethodsAsClassAttributes: bool = False, requireReturnSectionWhenReturningNothing: bool = False, requireYieldSectionWhenYieldingNothing: bool = False, quiet: bool = False, @@ -606,7 +606,7 @@ def _checkFile( ignoreUnderscoreArgs: bool = True, checkClassAttributes: bool = True, shouldDocumentPrivateClassAttributes: bool = False, - treatPropertyMethodsAsClassAttributes: bool = True, + treatPropertyMethodsAsClassAttributes: bool = False, requireReturnSectionWhenReturningNothing: bool = False, requireYieldSectionWhenYieldingNothing: bool = False, ) -> List[Violation]: