Skip to content

Commit 3688749

Browse files
Add __all__ to __init__.py files for explicit exports
Added __all__ lists to the __init__.py files across exceptions, protocols, rcon_protocols, and responses modules to explicitly define public API exports. This improves clarity and control over what is exposed when using 'from ... import *'.
1 parent 9fa1960 commit 3688749

34 files changed

Lines changed: 132 additions & 0 deletions

File tree

opengsq/exceptions/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
from .authentication_exception import AuthenticationException
22
from .invalid_packet_exception import InvalidPacketException
33
from .server_not_found_exception import ServerNotFoundException
4+
5+
__all__ = [
6+
"AuthenticationException",
7+
"InvalidPacketException",
8+
"ServerNotFoundException",
9+
]

opengsq/protocols/__init__.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,55 @@
4747
from opengsq.protocols.w40kdow import W40kDow
4848
from opengsq.protocols.warcraft3 import Warcraft3
4949
from opengsq.protocols.won import WON
50+
51+
__all__ = [
52+
"AoE1",
53+
"AoE2",
54+
"ASE",
55+
"AVP2",
56+
"Battlefield",
57+
"Battlefield2",
58+
"CoD1",
59+
"CoD4",
60+
"CoD5",
61+
"DirectPlay",
62+
"Doom3",
63+
"ElDewrito",
64+
"EOS",
65+
"FiveM",
66+
"Flatout2",
67+
"GameSpy1",
68+
"GameSpy2",
69+
"GameSpy3",
70+
"GameSpy4",
71+
"Halo1",
72+
"JediKnight",
73+
"Kaillera",
74+
"KillingFloor",
75+
"Minecraft",
76+
"Nadeo",
77+
"Palworld",
78+
"Quake1",
79+
"Quake2",
80+
"Quake3",
81+
"RakNet",
82+
"RenegadeX",
83+
"Samp",
84+
"Satisfactory",
85+
"Scum",
86+
"Source",
87+
"SSC",
88+
"SupCom",
89+
"StrongholdCE",
90+
"StrongholdCrusader",
91+
"TeamSpeak3",
92+
"TrackmaniaNations",
93+
"Toxikk",
94+
"UDK",
95+
"Unreal2",
96+
"UT3",
97+
"Vcmp",
98+
"W40kDow",
99+
"Warcraft3",
100+
"WON",
101+
]

opengsq/rcon_protocols/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .source_rcon import SourceRcon
2+
3+
__all__ = ["SourceRcon"]

opengsq/responses/ase/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
from .player import Player
22
from .status import Status
3+
4+
__all__ = ["Player", "Status"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
from .info import Info
22
from .version_info import VersionInfo
3+
4+
__all__ = ["Info", "VersionInfo"]

opengsq/responses/cod1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
from .info import Info
22
from .status import Status
33
from .cod1_status import Cod1Status
4+
5+
__all__ = ["Info", "Status", "Cod1Status"]

opengsq/responses/cod4/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
from .info import Info
22
from .status import Status
33
from .cod4_status import Cod4Status
4+
5+
__all__ = ["Info", "Status", "Cod4Status"]

opengsq/responses/cod5/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
from .info import Info
22
from .status import Status
33
from .cod5_status import Cod5Status
4+
5+
__all__ = ["Info", "Status", "Cod5Status"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .status import Status
2+
3+
__all__ = ["Status"]

opengsq/responses/eos/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .matchmaking import Matchmaking
2+
3+
__all__ = ["Matchmaking"]

0 commit comments

Comments
 (0)