Skip to content

Commit 5e0240b

Browse files
Add missing blank lines for PEP8 compliance
Inserted blank lines between class definitions and methods across multiple protocol and response modules to improve readability and adhere to PEP8 style guidelines. No functional changes were made.
1 parent bb95e72 commit 5e0240b

File tree

7 files changed

+16
-9
lines changed

7 files changed

+16
-9
lines changed

opengsq/protocols/warcraft3.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class GameFlags(IntFlag):
3636
OBS_MASK = 0x700000
3737
FILTER_MASK = 0x7FE000
3838

39+
3940
class GameSettingFlags(IntFlag):
4041
"""Game setting flags based on the Go implementation"""
4142
SPEED_SLOW = 0x00000000
@@ -59,12 +60,14 @@ class GameSettingFlags(IntFlag):
5960
RANDOM_HERO = 0x02000000
6061
RANDOM_RACE = 0x04000000
6162

63+
6264
class SlotStatus(IntEnum):
6365
"""Slot status based on the Go implementation"""
6466
OPEN = 0x00
6567
CLOSED = 0x01
6668
OCCUPIED = 0x02
6769

70+
6871
class Warcraft3(ProtocolBase):
6972
"""
7073
This class represents the Warcraft 3 Protocol. It provides methods to interact with Warcraft 3 game servers.

opengsq/protocols/warfork.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Warfork(Quake3):
1414
"""
1515

1616
full_name = "Warfork Protocol"
17-
17+
1818
def __init__(self, host: str, port: int, timeout: float = 5.0):
1919
"""
2020
Initializes the Quake3 object with the given parameters.
@@ -24,7 +24,7 @@ def __init__(self, host: str, port: int, timeout: float = 5.0):
2424
:param timeout: The timeout for the server connection.
2525
"""
2626
super().__init__(host, port, timeout)
27-
27+
2828
async def get_status(self, strip_color=True) -> Status:
2929
br = await self._get_response_binary_reader()
3030

@@ -40,7 +40,7 @@ async def get_status(self, strip_color=True) -> Status:
4040
player.name = Quake3.strip_colors(player.name)
4141

4242
return status
43-
43+
4444
def _parse_players(self, br: BinaryReader):
4545
"""
4646
Parses the players from the given BinaryReader object.

opengsq/responses/eldewrito/status.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Player:
1717
suicides: int = 0
1818
best_streak: int = 0
1919

20+
2021
@dataclass
2122
class Status:
2223
"""ElDewrito server status information"""

opengsq/responses/renegadex/status.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from dataclasses import dataclass
22
from typing import Any
33

4+
45
@dataclass
56
class Variables:
67
player_limit: int
@@ -13,7 +14,7 @@ class Variables:
1314
spawn_crates: bool
1415
game_type: int
1516
ranked: bool
16-
17+
1718
@classmethod
1819
def from_dict(cls, data: dict[str, Any]) -> 'Variables':
1920
return cls(
@@ -29,6 +30,7 @@ def from_dict(cls, data: dict[str, Any]) -> 'Variables':
2930
ranked=data["bRanked"]
3031
)
3132

33+
3234
@dataclass
3335
class Status:
3436
name: str
@@ -38,7 +40,7 @@ class Status:
3840
game_version: str
3941
variables: Variables
4042
raw: dict[str, Any]
41-
43+
4244
@classmethod
4345
def from_dict(cls, data: dict[str, Any]) -> 'Status':
4446
return cls(
@@ -49,4 +51,4 @@ def from_dict(cls, data: dict[str, Any]) -> 'Status':
4951
game_version=data["Game Version"],
5052
variables=Variables.from_dict(data["Variables"]),
5153
raw=data
52-
)
54+
)

opengsq/responses/satisfactory/status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ class Status:
1515

1616
max_players: int
1717
"""The maximum number of players that can connect to the server."""
18-
18+
1919
name: str
2020
"""The name of the server."""

opengsq/responses/ut3/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .status import Status
1+
from .status import Status

opengsq/responses/ut3/status.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
from typing import List
44
from opengsq.responses.udk.status import Status as UDKStatus
55

6+
67
@dataclass
78
class Status(UDKStatus):
89
"""UT3-specific status response"""
910
mutators: List[str] = None
1011
stock_mutators: List[str] = None
11-
custom_mutators: List[str] = None
12+
custom_mutators: List[str] = None

0 commit comments

Comments
 (0)