Skip to content

Commit 3cde102

Browse files
committed
ex_apps: removed deprecated fields last_check_time and system
Signed-off-by: Alexander Piskun <[email protected]>
1 parent ed23e05 commit 3cde102

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

nc_py_api/apps.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Nextcloud API for working with applications."""
22

33
import dataclasses
4-
import datetime
54

65
from ._misc import require_capabilities
76
from ._session import AsyncNcSessionBasic, NcSessionBasic
@@ -34,18 +33,6 @@ def enabled(self) -> bool:
3433
"""Flag indicating if the application enabled."""
3534
return bool(self._raw_data["enabled"])
3635

37-
@property
38-
def last_check_time(self) -> datetime.datetime:
39-
"""Time of the last successful application check."""
40-
return datetime.datetime.utcfromtimestamp(int(self._raw_data["last_check_time"])).replace(
41-
tzinfo=datetime.timezone.utc
42-
)
43-
44-
@property
45-
def system(self) -> bool:
46-
"""**DEPRECATED** Flag indicating if the application is a system application."""
47-
return True
48-
4936
def __repr__(self):
5037
return f"<{self.__class__.__name__} id={self.app_id}, ver={self.version}>"
5138

tests/actual_tests/apps_test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import datetime
2-
31
import pytest
42

53
from nc_py_api.apps import ExAppInfo
@@ -121,7 +119,6 @@ def _test_ex_app_get_list(ex_apps: list[ExAppInfo], enabled_ex_apps: list[ExAppI
121119
assert isinstance(app.name, str)
122120
assert isinstance(app.version, str)
123121
assert isinstance(app.enabled, bool)
124-
assert isinstance(app.last_check_time, datetime.datetime)
125122
assert str(app).find("id=") != -1 and str(app).find("ver=") != -1
126123

127124

0 commit comments

Comments
 (0)