Skip to content

Commit

Permalink
Add missing docstring,.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyandrewmeyer committed Apr 10, 2024
1 parent 6ebdadd commit 201e7a9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ops/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1700,6 +1700,7 @@ def __getitem__(self, key: str) -> str:

# This is provided by Mapping, but we need to make the return type more explicit.
def get(self, key: str, default: Optional[str] = None) -> Optional[str]:
"""Return the vaule for key if key is in the data, else default."""
try:
return self.__getitem__(key)
except KeyError:
Expand Down

0 comments on commit 201e7a9

Please sign in to comment.