Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions javaobj/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

:authors: Volodymyr Buell, Thomas Calmant
:license: Apache License 2.0
:version: 0.4.4
:version: 0.5.0
:status: Alpha

..

Copyright 2024 Thomas Calmant
Copyright 2026 Thomas Calmant

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions javaobj/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

:authors: Thomas Calmant
:license: Apache License 2.0
:version: 0.4.4
:version: 0.5.0
:status: Alpha

..

Copyright 2024 Thomas Calmant
Copyright 2026 Thomas Calmant

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 1 addition & 2 deletions javaobj/modifiedutf8.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@

:authors: Scott Stephens (@swstephe), @guywithface
:license: Apache License 2.0
:version: 0.4.4
:version: 0.5.0
:status: Alpha
"""

from __future__ import unicode_literals

import sys


# Module version
__version_info__ = (0, 4, 4)
__version__ = ".".join(str(x) for x in __version_info__)
Expand Down
6 changes: 3 additions & 3 deletions javaobj/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

:authors: Thomas Calmant
:license: Apache License 2.0
:version: 0.4.4
:version: 0.5.0
:status: Alpha

..

Copyright 2024 Thomas Calmant
Copyright 2026 Thomas Calmant

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -30,12 +30,12 @@
from __future__ import absolute_import

# Standard library
from typing import IO, Tuple # noqa: F401
import gzip
import logging
import os
import struct
import sys
from typing import IO, Tuple # noqa: F401

# Modified UTF-8 parser
from .modifiedutf8 import byte_to_int, decode_modified_utf8
Expand Down
10 changes: 5 additions & 5 deletions javaobj/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

:authors: Thomas Calmant
:license: Apache License 2.0
:version: 0.4.4
:version: 0.5.0
:status: Alpha

..

Copyright 2024 Thomas Calmant
Copyright 2026 Thomas Calmant

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -26,11 +26,11 @@

from . import beans, core, transformers # noqa: F401
from .core import ( # noqa: F401
load,
loads,
dumps,
JavaObjectMarshaller,
JavaObjectUnmarshaller,
dumps,
load,
loads,
)
from .transformers import DefaultObjectTransformer # noqa: F401

Expand Down
16 changes: 8 additions & 8 deletions javaobj/v1/beans.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

:authors: Volodymyr Buell, Thomas Calmant
:license: Apache License 2.0
:version: 0.4.4
:version: 0.5.0
:status: Alpha

..

Copyright 2024 Thomas Calmant
Copyright 2026 Thomas Calmant

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -27,8 +27,8 @@

from __future__ import absolute_import

from typing import List
import struct
from typing import List # noqa: F401

from ..utils import UNICODE_TYPE

Expand Down Expand Up @@ -62,12 +62,12 @@ def __init__(self):
"""
Sets up members
"""
self.name = None # type: str
self.serialVersionUID = None # type: int # pylint:disable=C0103
self.flags = None # type: int
self.name = None # type: str | None
self.serialVersionUID = None # type: int | None # pylint:disable=C0103
self.flags = None # type: int | None
self.fields_names = [] # type: List[str]
self.fields_types = [] # type: List[JavaString]
self.superclass = None # type: JavaClass
self.superclass = None # type: JavaClass | None

def __str__(self):
"""
Expand Down Expand Up @@ -110,7 +110,7 @@ def __init__(self):
"""
Sets up members
"""
self.classdesc = None # type: JavaClass
self.classdesc = None # type: JavaClass | None
self.annotations = []

def get_class(self):
Expand Down
8 changes: 4 additions & 4 deletions javaobj/v1/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

:authors: Volodymyr Buell, Thomas Calmant
:license: Apache License 2.0
:version: 0.4.4
:version: 0.5.0
:status: Alpha

..

Copyright 2024 Thomas Calmant
Copyright 2026 Thomas Calmant

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -44,10 +44,10 @@
from io import BytesIO

# Javaobj modules
from ..utils import java_data_fd
from .marshaller import JavaObjectMarshaller
from .unmarshaller import JavaObjectUnmarshaller
from .transformers import DefaultObjectTransformer
from ..utils import java_data_fd
from .unmarshaller import JavaObjectUnmarshaller

# ------------------------------------------------------------------------------

Expand Down
26 changes: 13 additions & 13 deletions javaobj/v1/marshaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

:authors: Volodymyr Buell, Thomas Calmant
:license: Apache License 2.0
:version: 0.4.4
:version: 0.5.0
:status: Alpha

..

Copyright 2024 Thomas Calmant
Copyright 2026 Thomas Calmant

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -48,26 +48,26 @@
from io import BytesIO

# Javaobj modules
from .beans import (
JavaClass,
JavaString,
JavaObject,
JavaByteArray,
JavaEnum,
JavaArray,
)
from ..constants import (
StreamConstants,
ClassDescFlags,
StreamConstants,
TerminalCode,
TypeCode,
)
from ..utils import (
BYTES_TYPE,
UNICODE_TYPE,
log_debug,
log_error,
to_bytes,
BYTES_TYPE,
UNICODE_TYPE,
)
from .beans import (
JavaArray,
JavaByteArray,
JavaClass,
JavaEnum,
JavaObject,
JavaString,
)

# ------------------------------------------------------------------------------
Expand Down
15 changes: 7 additions & 8 deletions javaobj/v1/transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

:authors: Volodymyr Buell, Thomas Calmant
:license: Apache License 2.0
:version: 0.4.4
:version: 0.5.0
:status: Alpha

..

Copyright 2024 Thomas Calmant
Copyright 2026 Thomas Calmant

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -27,20 +27,19 @@

from __future__ import absolute_import

from typing import Callable, Dict
import functools
from typing import Callable, Dict # noqa: F401

from .beans import JavaClass, JavaObject
from .unmarshaller import JavaObjectUnmarshaller
from ..constants import ClassDescFlags, TerminalCode, TypeCode
from ..utils import (
log_debug,
log_error,
to_bytes,
read_struct,
read_string,
read_struct,
to_bytes,
)

from .beans import JavaClass, JavaObject
from .unmarshaller import JavaObjectUnmarshaller

__all__ = ("DefaultObjectTransformer",)

Expand Down
35 changes: 18 additions & 17 deletions javaobj/v1/unmarshaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

:authors: Volodymyr Buell, Thomas Calmant
:license: Apache License 2.0
:version: 0.4.4
:version: 0.5.0
:status: Alpha

..

Copyright 2024 Thomas Calmant
Copyright 2026 Thomas Calmant

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -35,34 +35,35 @@

from __future__ import absolute_import

# Standard library
from typing import Any, Union
import os
import struct

# Javaobj modules
from .beans import (
JavaClass,
JavaString,
JavaObject,
JavaByteArray,
JavaEnum,
JavaArray,
)
# Standard library
from typing import Any, Union # noqa: F401

from ..constants import (
StreamConstants,
ClassDescFlags,
StreamCodeDebug,
StreamConstants,
TerminalCode,
TypeCode,
StreamCodeDebug,
)
from ..utils import (
hexdump,
log_debug,
log_error,
read_to_str,
to_unicode,
unicode_char,
hexdump,
)

# Javaobj modules
from .beans import (
JavaArray,
JavaByteArray,
JavaClass,
JavaEnum,
JavaObject,
JavaString,
)

numpy = None # Imported only when really used
Expand Down
8 changes: 4 additions & 4 deletions javaobj/v2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

:authors: Thomas Calmant
:license: Apache License 2.0
:version: 0.4.4
:version: 0.5.0
:status: Alpha

..

Copyright 2024 Thomas Calmant
Copyright 2026 Thomas Calmant

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -35,8 +35,8 @@
limitations under the License.
"""

from . import api, beans, core, main, stream, transformers # noqa: 401
from .main import load, loads # noqa: 401
from . import api, beans, core, main, stream, transformers # noqa: F401
from .main import load, loads # noqa: F401

# ------------------------------------------------------------------------------

Expand Down
Loading
Loading