Skip to content

Commit

Permalink
Update model.info
Browse files Browse the repository at this point in the history
  • Loading branch information
mmahacek committed Feb 26, 2024
1 parent 557ccae commit 3ad78d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Add testing for `utils` methods.
* Add `mypy` for type checking during development.
* Add `pyonms.utils.check_ip_address()` to validate IP addresses.
* Fix type hint for `models.Info`'s `version` and `datetimeformatConfig` attributes.

**Full Changelog**: https://github.com/mmahacek/PyONMS/compare/v0.1.2...v0.1.3

Expand Down
6 changes: 3 additions & 3 deletions pyonms/models/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Info endpoint models"

from dataclasses import dataclass, field
from typing import List, Optional
from typing import List, Optional, Union


@dataclass
Expand Down Expand Up @@ -55,11 +55,11 @@ def __repr__(self):
class Info:
"Information response class"
displayVersion: Optional[str] = None
version: Optional[str] = None
version: Optional[Union[str, Version]] = None
packageName: Optional[str] = None
packageDescription: Optional[str] = None
ticketerConfig: Optional[TicketerConfig] = None
datetimeformatConfig: Optional[DateFormat] = None
datetimeformatConfig: Optional[Union[str, DateFormat]] = None
services: List[ServiceStatus] = field(default_factory=list)
enabled_services: List[str] = field(default_factory=list)

Expand Down

0 comments on commit 3ad78d7

Please sign in to comment.