Skip to content

Commit 531f7fe

Browse files
authored
Merge pull request #15 from 1.2.x
2 parents 9fbd06f + 5dd6f7b commit 531f7fe

File tree

5 files changed

+34
-24
lines changed

5 files changed

+34
-24
lines changed

CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ Changed
2929
- Deprecated `Notification.creation_time <https://codingame.readthedocs.io/en/latest/api.html#codingame.Notification.creation_time>`__ in favor of
3030
`Notification.date <https://codingame.readthedocs.io/en/latest/api.html#codingame.Notification.date>`__
3131

32+
Version 1.2.3 (2021-11-07)
33+
--------------------------
34+
35+
Fixed
36+
*****
37+
38+
- ``ImportError`` of ``codingame.types`` submodule when importing
39+
``codingame``, the ``1.2.1`` and ``1.2.2`` fixes don't work.
40+
3241
Version 1.2.2 (2021-11-06)
3342
--------------------------
3443

codingame/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
"VersionInfo", major=int, minor=int, micro=int, releaselevel=str, serial=int
1212
)
1313

14-
version_info = VersionInfo(major=1, minor=2, micro=2, releaselevel="", serial=0)
14+
version_info = VersionInfo(major=1, minor=2, micro=3, releaselevel="", serial=0)
1515

1616
__title__ = "codingame"
1717
__author__ = "takos22"
18-
__version__ = "1.2.2"
18+
__version__ = "1.2.3"
1919

20-
from . import types # needed for including codingame.types submodule in release
2120
from .clash_of_code import ClashOfCode, Player
2221
from .client import Client
2322
from .codingamer import CodinGamer

codingame/http/base.py

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import typing
22
from abc import ABC, abstractmethod
33

4-
if typing.TYPE_CHECKING:
5-
from codingame.types import (
6-
ClashOfCode,
7-
CodinGamerFromID,
8-
Follower,
9-
Following,
10-
PointsStatsFromHandle,
11-
)
4+
from ..types import (
5+
ClashOfCode,
6+
CodinGamerFromID,
7+
Follower,
8+
Following,
9+
PointsStatsFromHandle,
10+
)
1211

1312
__all__ = ("BaseHTTPClient",)
1413

@@ -66,25 +65,23 @@ def login(self, email: str, password: str):
6665
"CodinGamer", "loginSite", [email, password, True, "CODINGAME", ""]
6766
)
6867

69-
def get_codingamer_from_handle(
70-
self, handle: str
71-
) -> "PointsStatsFromHandle":
68+
def get_codingamer_from_handle(self, handle: str) -> PointsStatsFromHandle:
7269
return self.request(
7370
"CodinGamer", "findCodingamePointsStatsByHandle", [handle]
7471
)
7572

76-
def get_codingamer_from_id(self, id: int) -> "CodinGamerFromID":
73+
def get_codingamer_from_id(self, id: int) -> CodinGamerFromID:
7774
return self.request(
7875
"CodinGamer", "findCodinGamerPublicInformations", [id]
7976
)
8077

81-
def get_codingamer_followers(self, id: int) -> typing.List["Follower"]:
78+
def get_codingamer_followers(self, id: int) -> typing.List[Follower]:
8279
return self.request("CodinGamer", "findFollowers", [id, id, None])
8380

8481
def get_codingamer_follower_ids(self, id: int) -> typing.List[int]:
8582
return self.request("CodinGamer", "findFollowerIds", [id])
8683

87-
def get_codingamer_following(self, id: int) -> typing.List["Following"]:
84+
def get_codingamer_following(self, id: int) -> typing.List[Following]:
8885
return self.request("CodinGamer", "findFollowing", [id, id])
8986

9087
def get_codingamer_following_ids(self, id: int) -> typing.List[int]:
@@ -95,10 +92,10 @@ def get_codingamer_following_ids(self, id: int) -> typing.List[int]:
9592
def get_codingamer_clash_of_code_rank(self, id: int) -> int:
9693
return self.request("ClashOfCode", "getClashRankByCodinGamerId", [id])
9794

98-
def get_clash_of_code_from_handle(self, handle: str) -> "ClashOfCode":
95+
def get_clash_of_code_from_handle(self, handle: str) -> ClashOfCode:
9996
return self.request("ClashOfCode", "findClashByHandle", [handle])
10097

101-
def get_pending_clash_of_code(self) -> "ClashOfCode":
98+
def get_pending_clash_of_code(self) -> ClashOfCode:
10299
return self.request("ClashOfCode", "findPendingClashes")
103100

104101
# Notification

docs/changelog.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ Changed
3131
- Deprecated :attr:`Notification.creation_time` in favor of
3232
:attr:`Notification.date`
3333

34+
Version 1.2.3 (2021-11-07)
35+
--------------------------
36+
37+
Fixed
38+
*****
39+
40+
- :exc:`ImportError` of ``codingame.types`` submodule when importing
41+
``codingame``, the ``1.2.1`` and ``1.2.2`` fixes don't work.
42+
3443
Version 1.2.2 (2021-11-06)
3544
--------------------------
3645

setup.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,7 @@ def get_requirements(filename: str = "requirements.txt") -> typing.List[str]:
6464
long_description_content_type="text/x-rst",
6565
author="takos22",
6666
author_email="takos2210@gmail.com",
67-
packages=[
68-
"codingame",
69-
"codingame.client",
70-
"codingame.http",
71-
],
67+
packages=get_packages("codingame"),
7268
python_requires=">=3.6",
7369
install_requires=get_requirements(),
7470
extras_require=extra_requires,

0 commit comments

Comments
 (0)