Skip to content

Commit

Permalink
docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Aug 29, 2021
1 parent 1b12bb6 commit e8ca9ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions rich/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def print_json(
Args:
json (str): A string containing JSON.
data (Any): If not json is supplied, then encode this data.
indent (int, optional): Number of spaces to indent. Defaults to 4.
data (Any): If json is not supplied, then encode this data.
indent (int, optional): Number of spaces to indent. Defaults to 2.
highlight (bool, optional): Enable highlighting of output: Defaults to True.
"""

Expand Down
4 changes: 2 additions & 2 deletions rich/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -1626,8 +1626,8 @@ def print_json(
Args:
json (Optional[str]): A string containing JSON.
data (Any): If not json is supplied, then encode this data.
indent (int, optional): Number of spaces to indent. Defaults to 4.
data (Any): If json is not supplied, then encode this data.
indent (int, optional): Number of spaces to indent. Defaults to 2.
highlight (bool, optional): Enable highlighting of output: Defaults to True.
"""
from rich.json import JSON
Expand Down
4 changes: 2 additions & 2 deletions rich/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class JSON:
Args:
json (str): JSON encoded data.
indent (int, optional): Number of characters to indent by. Defaults to True.
highlight (bool, optional): Enable highlighting. Defaults to True.
highlight (bool, optional): Enable highlighting. Defaults to 2.
"""

def __init__(self, json: str, indent: int = 2, highlight: bool = True) -> None:
Expand All @@ -29,7 +29,7 @@ def from_data(cls, data: Any, indent: int = 2, highlight: bool = True) -> "JSON"
Returns:
Args:
data (Any): An object that may be encoded in to JSON
indent (int, optional): Number of characters to indent by. Defaults to True.
indent (int, optional): Number of characters to indent by. Defaults to 2.
highlight (bool, optional): Enable highlighting. Defaults to True.
"""
json_instance: "JSON" = cls.__new__(cls)
Expand Down

0 comments on commit e8ca9ba

Please sign in to comment.