From cfec606d233492fe072e2f4e004bab2ad66ee801 Mon Sep 17 00:00:00 2001 From: Charles Le Maux Date: Sun, 14 Jul 2024 19:24:39 +0200 Subject: [PATCH] [+] Union function declaration --- server_mc_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server_mc_manager.py b/server_mc_manager.py index c217436..72ee28a 100644 --- a/server_mc_manager.py +++ b/server_mc_manager.py @@ -1,6 +1,7 @@ import subprocess import shlex import time +from typing import Union class MinecraftServerManager: @@ -13,7 +14,7 @@ class MinecraftServerManager: self.cooldowns = {} def start_server(self, server_directory: str, port: int, - java_executable='java', jar_file='server.jar', memory_size='2048M') -> int or None: + java_executable='java', jar_file='server.jar', memory_size='2048M') -> Union[int, None]: if port in self.servers: return None