Skip to content

Commit b7e485c

Browse files
committed
Type hints, network refactoring, documentation updates
1 parent fd89faa commit b7e485c

File tree

2 files changed

+304
-183
lines changed

2 files changed

+304
-183
lines changed

factorio_rcon/__init__.py

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
1-
from .factorio_rcon import (PACKET_PARSER, RCONClient, AsyncRCONClient,
2-
RCONBaseError, ClientBusy, InvalidPassword,
3-
InvalidResponse, RCONNetworkError, RCONNotConnected,
4-
RCONClosed, RCONConnectError, RCONReceiveError,
5-
RCONSendError)
1+
from .factorio_rcon import (
2+
AsyncRCONClient,
3+
InvalidPassword,
4+
InvalidResponse,
5+
PacketType,
6+
RCONBaseError,
7+
RCONClient,
8+
RCONClosed,
9+
RCONConnectError,
10+
RCONMessage,
11+
RCONNetworkError,
12+
RCONNotConnected,
13+
RCONReceiveError,
14+
RCONSendError,
15+
RCONSharedBase,
16+
)
17+
18+
# update the module paths to avoid factorio_rcon.factorio_rcon.obj names
19+
for value in locals().copy().values():
20+
if getattr(value, "__module__", "").startswith("factorio_rcon."):
21+
value.__module__ = __name__
22+
# make sure value doesn't hang around as a module attribute
23+
del value # pylint: disable=undefined-loop-variable

0 commit comments

Comments
 (0)