Skip to content

Commit 66d3f95

Browse files
thodson-usgsclaude
andcommitted
docs(nwis): resolve duplicate object description for NWIS_Metadata properties
site_info and variable_info are @Property members (documented by autodoc from their own docstrings) but were ALSO listed in the class-docstring Attributes section, which napoleon renders as attribute directives -> two object descriptions for the same name -> "duplicate object description" warning. Drop them from Attributes (keeping the genuinely-plain url/query_time/header/comments) and fold the "when populated" context into the site_info property docstring. Resolves both warnings at the root rather than masking with :no-index:. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9b0b941 commit 66d3f95

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

dataretrieval/nwis.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,12 +1125,11 @@ class NWIS_Metadata(BaseMetadata):
11251125
Response headers
11261126
comments: str | None
11271127
Metadata comments, if any
1128-
site_info: tuple[pd.DataFrame, NWIS_Metadata] | None
1129-
Site information if the query included `site_no`, `sites`, `stateCd`,
1130-
`huc`, `countyCd` or `bBox`. `site_no` is preferred over `sites` if
1131-
both are present.
1132-
variable_info: None
1133-
Deprecated. Accessing variable_info via NWIS_Metadata is deprecated.
1128+
1129+
Notes
1130+
-----
1131+
``site_info`` and ``variable_info`` are exposed as properties (documented
1132+
below) rather than plain attributes.
11341133
11351134
"""
11361135

@@ -1164,7 +1163,12 @@ def __init__(self, response, **parameters) -> None:
11641163

11651164
@property
11661165
def site_info(self) -> tuple[pd.DataFrame, BaseMetadata] | None:
1167-
"""
1166+
"""Site information for the query.
1167+
1168+
Populated when the query included ``site_no``, ``sites``, ``stateCd``,
1169+
``huc``, ``countyCd`` or ``bBox`` (``site_no`` is preferred over
1170+
``sites`` if both are present); ``None`` otherwise.
1171+
11681172
Return
11691173
------
11701174
df: ``pandas.DataFrame``

0 commit comments

Comments
 (0)