Skip to content

Commit

Permalink
fix compat
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck committed Sep 27, 2023
1 parent 1fdc9a6 commit e3c8c5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions serializable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,9 @@ def _from_xml(cls: Type[_T], data: Union[TextIOWrapper, Element],
LOGGER.debug(f'Rendering XML from {type(data)} to {cls}...')
klass = ObjectMetadataLibrary.klass_mappings.get(f'{cls.__module__}.{cls.__qualname__}', None)
if klass is None:
LOGGER.waqqrning( # type:ignore[call-arg]
LOGGER.warning(
f'{cls.__module__}.{cls.__qualname__} is not a known serializable class',
**_warning_kwargs)
**_warning_kwargs) # type:ignore[arg-type]
return None

klass_properties = ObjectMetadataLibrary.klass_property_mappings.get(f'{cls.__module__}.{cls.__qualname__}', {})
Expand Down
8 changes: 4 additions & 4 deletions serializable/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ def deserialize(cls, o: object) -> date:

if str(o).endswith('Z'):
o = str(o)[:-1]
LOGGER.warning( # type:ignore[call-arg]
LOGGER.warning(
'Potential data loss will occur: dates with timezones not supported in Python',
**_warning_kwargs)
**_warning_kwargs) # type:ignore[arg-type]
if '+' in str(o):
o = str(o)[:str(o).index('+')]
LOGGER.warning( # type:ignore[call-arg]
LOGGER.warning(
'Potential data loss will occur: dates with timezones not supported in Python',
**_warning_kwargs)
**_warning_kwargs) # type:ignore[arg-type]
return date.fromisoformat(str(o))
except ValueError:
raise ValueError(f'Date string supplied ({o}) is not a supported ISO Format')
Expand Down

0 comments on commit e3c8c5f

Please sign in to comment.