Skip to content

Commit

Permalink
Fix developer guide example code
Browse files Browse the repository at this point in the history
  • Loading branch information
glentner committed Dec 19, 2021
1 parent 7d1caf1 commit 7dbbd70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ For example:
_cmd = 'lsof -u `whoami`'
@classmethod
def parse_text(block: str) -> Dict[str, int]:
def parse_text(cls, block: str) -> Dict[str, int]:
"""Count lines in the output."""
return {'count': len(block.strip().split('\n'))}
Expand Down
2 changes: 1 addition & 1 deletion monitor/core/extern.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def from_text(cls, block: str) -> ExternalMetric:
return cls(attrs)

@abstractclassmethod
def parse_text(cls, block: str) -> Mapping:
def parse_text(cls, block: str) -> Dict[str, T]:
"""Parse the text `block` and return attributes."""

def __str__(self) -> str:
Expand Down

0 comments on commit 7dbbd70

Please sign in to comment.