Skip to content

Commit

Permalink
Start work on patcher
Browse files Browse the repository at this point in the history
  • Loading branch information
nineteendo committed Aug 5, 2024
1 parent d022b83 commit 31f1147
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
copyright: str = "2024, Nice Zombies" # noqa: A001
author: str = "Nice Zombies"

release: str = "1.2"
version: str = "1.2.2"
release: str = "1.3"
version: str = "1.3.0"

# -- General configuration

Expand Down
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.JSONNamespace
.. autoclass:: jsonyx.tool.Namespace
:members:

Exceptions
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "jsonyx"
version = "1.2.2"
version = "1.3.0"
authors = [
{ name="Nice Zombies", email="[email protected]" },
]
Expand Down
1 change: 1 addition & 0 deletions src/jsonyx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"read",
"write",
]
__version__: str = "1.3.0"

from codecs import (
BOM_UTF8, BOM_UTF16_BE, BOM_UTF16_LE, BOM_UTF32_BE, BOM_UTF32_LE,
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 JSONNamespace, register, run
from jsonyx.tool import Namespace, register, run


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

Expand Down
2 changes: 2 additions & 0 deletions src/jsonyx/_patcher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright (C) 2022-2024 Nice Zombies
"""JSON patcher."""
1 change: 0 additions & 1 deletion src/jsonyx/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from __future__ import annotations

__all__: list[str] = ["get_json"]
__version__: str = "1.2.2"

from test.support.import_helper import import_fresh_module # type: ignore
from typing import TYPE_CHECKING
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] = ["JSONNamespace", "register", "run"]
__all__: list[str] = ["Namespace", "register", "run"]

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


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

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


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

0 comments on commit 31f1147

Please sign in to comment.