Skip to content

Commit

Permalink
Revert "Rename JSONNamespace"
Browse files Browse the repository at this point in the history
  • Loading branch information
nineteendo committed Aug 4, 2024
1 parent a85cb19 commit d022b83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Classes
.. autoclass:: jsonyx.Encoder
:members:

.. autoclass:: jsonyx.tool.Namespace
.. autoclass:: jsonyx.tool.JSONNamespace
:members:

Exceptions
Expand Down
4 changes: 2 additions & 2 deletions src/jsonyx/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
from argparse import ArgumentParser

from jsonyx.tool import Namespace, register, run
from jsonyx.tool import JSONNamespace, register, run


def _main() -> None:
Expand All @@ -18,7 +18,7 @@ def _main() -> None:
)
register(parser)
try:
run(parser.parse_args(namespace=Namespace()))
run(parser.parse_args(namespace=JSONNamespace()))
except BrokenPipeError as exc:
sys.exit(exc.errno)

Expand Down
8 changes: 4 additions & 4 deletions src/jsonyx/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""JSON tool."""
from __future__ import annotations

__all__: list[str] = ["Namespace", "register", "run"]
__all__: list[str] = ["JSONNamespace", "register", "run"]

import sys
from sys import stderr, stdin
Expand All @@ -16,7 +16,7 @@


# pylint: disable-next=R0903
class Namespace:
class JSONNamespace:
"""JSON namespace."""

compact: bool
Expand Down Expand Up @@ -108,11 +108,11 @@ def register(parser: ArgumentParser) -> None:
)


def run(args: Namespace) -> None:
def run(args: JSONNamespace) -> None:
"""Run JSON tool.
:param args: the commandline arguments
:type args: Namespace
:type args: JSONNamespace
"""
decoder: Decoder = Decoder(
allow=EVERYTHING if args.nonstrict else NOTHING,
Expand Down

0 comments on commit d022b83

Please sign in to comment.