Skip to content

Commit be1dbab

Browse files
authored
Remove post init from user model (#13)
1 parent 455ac18 commit be1dbab

File tree

9 files changed

+14
-17
lines changed

9 files changed

+14
-17
lines changed

example.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Example usage of pytautulli."""
22
import asyncio
3+
34
from pytautulli import PyTautulli, PyTautulliHostConfiguration
45

56
IP = "192.168.100.3"

pytautulli/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""A class for handling connections with a Tautulli instance."""
22
from __future__ import annotations
3+
34
from copy import copy
45
from typing import Any
56

pytautulli/models/home_stats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class PyTautulliApiHomeStats(PyTautulliApiBaseModel):
4646
stat_id: str | None = None
4747
stat_type: str | None = None
4848
stat_title: str | None = None
49-
rows: list[PyTautulliApiHomeStats] = None
49+
rows: list[PyTautulliApiHomeStatsRow] = None
5050

5151
def __post_init__(self):
5252
super().__post_init__()

pytautulli/models/user.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,3 @@ class PyTautulliApiUser(PyTautulliApiBaseModel):
2525
thumb: str | None = None
2626
user_id: int | None = None
2727
username: str | None = None
28-
29-
def __post_init__(self):
30-
super().__post_init__()
31-
if self.shared_libraries:
32-
self.shared_libraries = self.shared_libraries.split(";")

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from pytautulli import PyTautulli
77

8-
from .common import TEST_HOST_CONFIGURATION, MockResponse, MockedRequests
8+
from .common import TEST_HOST_CONFIGURATION, MockedRequests, MockResponse
99

1010
logging.basicConfig(level=logging.DEBUG)
1111
pytestmark = pytest.mark.asyncio

tests/test_async_get_activity.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
23
from pytautulli import PyTautulli
34

45

tests/test_async_get_home_stats.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
23
from pytautulli import PyTautulli
34

45

tests/test_async_get_users.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
23
from pytautulli import PyTautulli
34

45

tests/test_client.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
import asyncio
22
import json
3-
from pytautulli.const import HTTPMethod
4-
from pytautulli.decorator import api_command
3+
54
import aiohttp
65
import pytest
76
from aiohttp.client import ClientSession
7+
88
from pytautulli import (
99
PyTautulli,
10-
PyTautulliException,
10+
PyTautulliApiResponse,
1111
PyTautulliAuthenticationException,
1212
PyTautulliConnectionException,
13+
PyTautulliException,
1314
PyTautulliJJSONEncoder,
14-
PyTautulliApiResponse,
15-
)
16-
from tests.common import (
17-
MockResponse,
18-
TEST_HOST_CONFIGURATION,
19-
MockedRequests,
20-
fixture,
2115
)
16+
from pytautulli.const import HTTPMethod
17+
from pytautulli.decorator import api_command
18+
from tests.common import TEST_HOST_CONFIGURATION, MockedRequests, MockResponse, fixture
2219

2320

2421
@pytest.mark.asyncio

0 commit comments

Comments
 (0)