From 4b28612223ad26e979e0c5b330fa963c1dbb69c8 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Fri, 25 Mar 2022 16:03:53 -0500 Subject: [PATCH] lint fixes and tidying --- .efrocachemap | 84 +++++++++---------- CHANGELOG.md | 4 +- assets/src/ba_data/python/ba/_activity.py | 2 + assets/src/ba_data/python/ba/_appconfig.py | 12 +-- assets/src/ba_data/python/ba/_coopgame.py | 2 + assets/src/ba_data/python/ba/_gameactivity.py | 2 + assets/src/ba_data/python/ba/_general.py | 3 +- assets/src/ba_data/python/ba/_language.py | 3 - assets/src/ba_data/python/ba/_messages.py | 2 + assets/src/ba_data/python/ba/_player.py | 2 + assets/src/ba_data/python/ba/_team.py | 2 + assets/src/ba_data/python/ba/_teamgame.py | 4 +- assets/src/ba_data/python/bastd/actor/bomb.py | 2 + .../ba_data/python/bastd/actor/playerspaz.py | 2 + src/ballistica/ballistica.cc | 4 +- tools/efro/rpc.py | 18 +++- 16 files changed, 91 insertions(+), 57 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index bd7edd0c..7c24deaa 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3971,50 +3971,50 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a7/ff/64365910ee6c01109f1d26cc8e00", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/99/7e/a9c63634bc09295b7137efbc5b03", "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/74/1d/fc9e33e565475daaac80da5252f0", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/58/6b/88ef04ab964dc44d782b335a3664", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/29/fa/e83784a90fd1b5f52a62ee2ea688", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/f4/f1/497ce4ccc3fcb11b137cad8dc472", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8f/36/a76c81f143ca1a8326fa74252e52", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c5/c7/73a9f555675a1f775ecb438c2dca", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/5d/52/4ab44afb5d906b5ac230595a7db0", "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9c/7b/ac1a200be0f37078af0991faca3b", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/79/0a/dfd7221bc381287f63283fc10248", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b0/a1/8970bc1b61a4b60fd5d23b2ee742", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/97/ac/58e134b066d95727b9cb80e9a9b6", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/35/dd/36e1e5c102eb81e2d9dcd351cece", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e1/3e/90fc34f4b70e1431aa4758d3d2db", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/52/e8/1d53327d7b5883c84239d02373e8", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/eb/3b/7963c1e75a28c852c79dbd1636c0", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ad/fc/6e0d21b11216629414ac0e4d1d01", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/fc/cd/74e37b262e396cce545fa2e5bce7", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/64/e5/2e62f8637b4a0ee111238afb5df2", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/8f/92/9de957ef25923b2162ccd6a232eb", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/f2/9d/5c3aec166c6e352726853c33712e", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/59/aa/9e20069f178fa06188572122ff61", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/d1/8f/5869afb34d874c376428af39e107", - "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/73/bc/6136ffcc0243f6465e5ceb860054", - "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a3/0a/0c8c321566dd46b61a35b0afcc62", - "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/34/a1/7e7757adeb68841c5398da73dea8", - "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c1/8b/d55378dac4d1d612f89ae4ce9820", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/16/cd/2197a431fa3ce1c17f906bec64c3", - "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6d/fd/fde9716ed5abf602684e5d233d99", - "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f8/25/a8dd68c864ccc5dc82aaf4097722", - "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/db/25/0ba199db8e9b0c604d810a104d2e", - "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/66/50/7432d08764f9d8d0636e83e2e45a", - "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2d/bd/b570408b9ec8e63a2b8196fe2b2e", - "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d0/4d/0d0e5e80e2003c728d7da7e70692", - "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4e/ff/df288b432145baf5149c029a4923", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/01/b2/7a1bc81339e8b741d6779ed9fe71", - "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7d/0e/67404978bbafda33b420014328b4", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/09/90/19e7f1e772d86e7ef59e9188cc82", - "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/31/53/454316199b5e75ea0bc9250d968c", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/e0/4a/bf0ae79a0a00ed0dd89a1eec8917", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/82/cb/af0aba66777d13251de1766afdc4", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/3f/2e/db67cbb59ca85958d6deb5c3ec55", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/bc/23/a06946da0e41ac4dad99cbc66533", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/52/d1/7a0ff7f13d72350b8d329dc1ea7f", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/76/1b/9ebdc425e4bd743745d4443d1fab", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/79/e8/c3c2ce27997183599e53fcbe7705", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/6d/f1/f0cc9a64748bf0d92a1321369f51", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1b/64/89b0a457b5ac3182f7c0e4d56d32", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cf/4a/adb4c298fba97d7662a54e03e733", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/be/75/d6f9765c8e9ec02656b9369e05ba", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c5/ad/a7b772a315f4e44e584e9b301193", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/27/c8/e750bd63efc9bc9044434a85a36b", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/bc/67/ddebb7f7dc9aec9118c8b94f4770", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/5d/64/bf0bc44efa11f1dc1cebf12d4602", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f0/85/0999b7aa41ceeec58d5b624d4f8a", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d6/08/5f9ebe3042acd98f8358c3938226", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/87/06/72f03c7c44379aa49f921b00257d", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/98/14/dda7238d3e57474d4e325f8acfec", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/7c/9e/0257ecd6e0427306d4f15ec071b2", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/2c/b9/4a6dea5818a6dbbada49092242c8", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/2c/52/763d351ddf7778dd10a099f1d2d5", + "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ef/cc/71ff8188172b919a95a28c4ddf49", + "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/63/c9/585a425482ab0e123edfa1a34bb4", + "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6a/57/e3cc2d31572937022a658b11da46", + "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f8/61/d65c5c17d96346202ba033f0ba07", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/eb/56/58eba010c3d8757925cd83473071", + "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c4/ea/7855552175e44f75ee6fe6081181", + "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1e/d6/f3746757eee023903adddc0bbccb", + "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1b/f3/f9d3c048edbd746e566cafcf5539", + "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/52/bd/64a6cfb863ec403aeb05ad7d6255", + "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d7/53/61de32567dfe1493748ff9758b85", + "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0b/ec/e0daab5d68dd2892e904e7b16240", + "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/94/c3/a62f8a2164d81cc61f361ff687cb", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b1/50/311482ff29a7fbe0d7ecee57a9ce", + "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6b/ae/0611db4ea8ccd933557d79ce6837", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/40/1a/2947e4c51e3e7942c1bebcdd877c", + "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8e/93/73bdecb88823ec41ff22b3254393", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/c7/6c/76f09157c10d52254e8ba612f481", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/3d/bf/4e956246387aa112aa124ac393e1", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/0d/da/a870975b2a953241af857f4385b8", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/c0/d8/598c01b061d832067c5797a58390", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/14/9a/7f7debd96dfb2255bff2705c93f9", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/87/3e/6d30b82d8b27bae4ed4c087d9fdd", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/cf/f5/1d89bbfd67b7d01de298082ad6f1", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/1c/23/0a72787714d43253658f4d96941c", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/b3/15/7c6d580b3482870b5b058858624c", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/d3/db/e73d4dcf1280d5f677c3cf8b47c3" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f38c01b..1cfdf0e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -### 1.6.11 (20538, 2022-03-23) +### 1.6.12 (20542, 2022-03-25) + +### 1.6.11 (20539, 2022-03-23) - Documentation is now generated using pdoc . Thanks Dliwk!! (I'll get it wired up to auto-update to a webpage soon). - Players who connect to authenticated servers impersonating someone else are now simply kicked; not banned. The old behavior was being intentionally exploited to ban people from their own servers/etc. I may revert to bans once I can do it in a way that is not exploitable. - The game now establishes a V2 master-server connection (which will soon be used for lots of cool functionality). For this version it is mainly enabled for testing purposes; please holler if you see any odd warning messages or behavior. diff --git a/assets/src/ba_data/python/ba/_activity.py b/assets/src/ba_data/python/ba/_activity.py index 5d5068f9..f2d6034a 100644 --- a/assets/src/ba_data/python/ba/_activity.py +++ b/assets/src/ba_data/python/ba/_activity.py @@ -19,8 +19,10 @@ if TYPE_CHECKING: from typing import Optional, Any import ba +# pylint: disable=invalid-name PlayerType = TypeVar('PlayerType', bound=Player) TeamType = TypeVar('TeamType', bound=Team) +# pylint: enable=invalid-name class Activity(DependencyComponent, Generic[PlayerType, TeamType]): diff --git a/assets/src/ba_data/python/ba/_appconfig.py b/assets/src/ba_data/python/ba/_appconfig.py index 5e1e1726..26d46b7d 100644 --- a/assets/src/ba_data/python/ba/_appconfig.py +++ b/assets/src/ba_data/python/ba/_appconfig.py @@ -126,14 +126,14 @@ def read_config() -> tuple[AppConfig, bool]: try: import shutil shutil.copyfile(config_file_path, config_file_path + '.broken') - except Exception as exc: - print('EXC copying broken config:', exc) + except Exception as exc2: + print('EXC copying broken config:', exc2) try: _ba.log('broken config contents:\n' + config_contents.replace('\000', ''), to_stdout=False) - except Exception as exc: - print('EXC logging broken config contents:', exc) + except Exception as exc2: + print('EXC logging broken config contents:', exc2) config = AppConfig() # Now attempt to read one of our 'prev' backup copies. @@ -147,8 +147,8 @@ def read_config() -> tuple[AppConfig, bool]: config = AppConfig() config_file_healthy = True print('successfully read backup config.') - except Exception as exc: - print('EXC reading prev backup config:', exc) + except Exception as exc2: + print('EXC reading prev backup config:', exc2) return config, config_file_healthy diff --git a/assets/src/ba_data/python/ba/_coopgame.py b/assets/src/ba_data/python/ba/_coopgame.py index 79ba755f..c3435f3c 100644 --- a/assets/src/ba_data/python/ba/_coopgame.py +++ b/assets/src/ba_data/python/ba/_coopgame.py @@ -14,8 +14,10 @@ if TYPE_CHECKING: from bastd.actor.playerspaz import PlayerSpaz import ba +# pylint: disable=invalid-name PlayerType = TypeVar('PlayerType', bound='ba.Player') TeamType = TypeVar('TeamType', bound='ba.Team') +# pylint: enable=invalid-name class CoopGameActivity(GameActivity[PlayerType, TeamType]): diff --git a/assets/src/ba_data/python/ba/_gameactivity.py b/assets/src/ba_data/python/ba/_gameactivity.py index 8e2552eb..73e9f538 100644 --- a/assets/src/ba_data/python/ba/_gameactivity.py +++ b/assets/src/ba_data/python/ba/_gameactivity.py @@ -24,8 +24,10 @@ if TYPE_CHECKING: from bastd.actor.bomb import TNTSpawner import ba +# pylint: disable=invalid-name PlayerType = TypeVar('PlayerType', bound='ba.Player') TeamType = TypeVar('TeamType', bound='ba.Team') +# pylint: enable=invalid-name class GameActivity(Activity[PlayerType, TeamType]): diff --git a/assets/src/ba_data/python/ba/_general.py b/assets/src/ba_data/python/ba/_general.py index b28731c1..e9462ee9 100644 --- a/assets/src/ba_data/python/ba/_general.py +++ b/assets/src/ba_data/python/ba/_general.py @@ -29,10 +29,11 @@ class Existable(Protocol): def exists(self) -> bool: """Whether this object exists.""" - ... +# pylint: disable=invalid-name ExistableType = TypeVar('ExistableType', bound=Existable) +# pylint: enable=invalid-name T = TypeVar('T') diff --git a/assets/src/ba_data/python/ba/_language.py b/assets/src/ba_data/python/ba/_language.py index 805cf287..e9971916 100644 --- a/assets/src/ba_data/python/ba/_language.py +++ b/assets/src/ba_data/python/ba/_language.py @@ -410,7 +410,6 @@ class Lstr: fallback_value: str = '', subs: Sequence[tuple[str, Union[str, Lstr]]] = []) -> None: """Create an Lstr from a string resource.""" - ... # noinspection PyShadowingNames,PyDefaultArgument @overload @@ -419,7 +418,6 @@ class Lstr: translate: tuple[str, str], subs: Sequence[tuple[str, Union[str, Lstr]]] = []) -> None: """Create an Lstr by translating a string in a category.""" - ... # noinspection PyDefaultArgument @overload @@ -428,7 +426,6 @@ class Lstr: value: str, subs: Sequence[tuple[str, Union[str, Lstr]]] = []) -> None: """Create an Lstr from a raw string value.""" - ... # pylint: enable=redefined-outer-name, dangerous-default-value diff --git a/assets/src/ba_data/python/ba/_messages.py b/assets/src/ba_data/python/ba/_messages.py index aa22cad4..feebcebf 100644 --- a/assets/src/ba_data/python/ba/_messages.py +++ b/assets/src/ba_data/python/ba/_messages.py @@ -65,7 +65,9 @@ class DieMessage: """The particular reason for death.""" +# pylint: disable=invalid-name PlayerType = TypeVar('PlayerType', bound='ba.Player') +# pylint: enable=invalid-name class PlayerDiedMessage: diff --git a/assets/src/ba_data/python/ba/_player.py b/assets/src/ba_data/python/ba/_player.py index 3da52bd3..965213dd 100644 --- a/assets/src/ba_data/python/ba/_player.py +++ b/assets/src/ba_data/python/ba/_player.py @@ -16,8 +16,10 @@ if TYPE_CHECKING: from typing import Optional, Sequence, Any, Union, Callable import ba +# pylint: disable=invalid-name PlayerType = TypeVar('PlayerType', bound='ba.Player') TeamType = TypeVar('TeamType', bound='ba.Team') +# pylint: enable=invalid-name @dataclass diff --git a/assets/src/ba_data/python/ba/_team.py b/assets/src/ba_data/python/ba/_team.py index 170b62af..71c6b666 100644 --- a/assets/src/ba_data/python/ba/_team.py +++ b/assets/src/ba_data/python/ba/_team.py @@ -66,7 +66,9 @@ class SessionTeam: self.customdata = {} +# pylint: disable=invalid-name PlayerType = TypeVar('PlayerType', bound='ba.Player') +# pylint: enable=invalid-name class Team(Generic[PlayerType]): diff --git a/assets/src/ba_data/python/ba/_teamgame.py b/assets/src/ba_data/python/ba/_teamgame.py index a2bc794d..4efe5c85 100644 --- a/assets/src/ba_data/python/ba/_teamgame.py +++ b/assets/src/ba_data/python/ba/_teamgame.py @@ -17,8 +17,10 @@ if TYPE_CHECKING: from bastd.actor.playerspaz import PlayerSpaz import ba +# pylint: disable=invalid-name PlayerType = TypeVar('PlayerType', bound='ba.Player') TeamType = TypeVar('TeamType', bound='ba.Team') +# pylint: enable=invalid-name class TeamGameActivity(GameActivity[PlayerType, TeamType]): @@ -120,7 +122,7 @@ class TeamGameActivity(GameActivity[PlayerType, TeamType]): unless 'announce_winning_team' is False. (for results without a single most-important winner). """ - # pylint: disable=arguments-differ + # pylint: disable=arguments-renamed from ba._coopsession import CoopSession from ba._multiteamsession import MultiTeamSession from ba._general import Call diff --git a/assets/src/ba_data/python/bastd/actor/bomb.py b/assets/src/ba_data/python/bastd/actor/bomb.py index ae710e94..7ab074b1 100644 --- a/assets/src/ba_data/python/bastd/actor/bomb.py +++ b/assets/src/ba_data/python/bastd/actor/bomb.py @@ -16,7 +16,9 @@ from bastd.gameutils import SharedObjects if TYPE_CHECKING: from typing import Any, Sequence, Optional, Callable +# pylint: disable=invalid-name PlayerType = TypeVar('PlayerType', bound='ba.Player') +# pylint: enable=invalid-name class BombFactory: diff --git a/assets/src/ba_data/python/bastd/actor/playerspaz.py b/assets/src/ba_data/python/bastd/actor/playerspaz.py index 29b535ac..9d09934e 100644 --- a/assets/src/ba_data/python/bastd/actor/playerspaz.py +++ b/assets/src/ba_data/python/bastd/actor/playerspaz.py @@ -12,8 +12,10 @@ from bastd.actor.spaz import Spaz if TYPE_CHECKING: from typing import Any, Sequence, Optional, Literal +# pylint: disable=invalid-name PlayerType = TypeVar('PlayerType', bound=ba.Player) TeamType = TypeVar('TeamType', bound=ba.Team) +# pylint: enable=invalid-name class PlayerSpazHurtMessage: diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index cf939197..fd9f1c32 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -21,8 +21,8 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20538; -const char* kAppVersion = "1.6.11"; +const int kAppBuildNumber = 20542; +const char* kAppVersion = "1.6.12"; // Our standalone globals. // These are separated out for easy access. diff --git a/tools/efro/rpc.py b/tools/efro/rpc.py index e381adee..93bffe6a 100644 --- a/tools/efro/rpc.py +++ b/tools/efro/rpc.py @@ -6,6 +6,7 @@ from __future__ import annotations import ssl import time +import errno import asyncio import logging import weakref @@ -510,15 +511,30 @@ class RPCEndpoint: @classmethod def _is_expected_connection_error(cls, exc: Exception) -> bool: + """Stuff we expect to end our connection in normal circumstances.""" + + # HMMM; should we move this to efro.error?.. something + # like is_asyncio_streams_network_error()? - # We expect this stuff to be what ends us. if isinstance(exc, ( ConnectionError, + TimeoutError, EOFError, _KeepaliveTimeoutError, )): return True + # Also some specific errno ones. + if isinstance(exc, OSError): + if exc.errno == 10051: # Windows unreachable network error. + return True + if exc.errno in { + errno.ETIMEDOUT, + errno.EHOSTUNREACH, + errno.ENETUNREACH, + }: + return True + # Am occasionally getting a specific SSL error on shutdown which I # believe is harmless (APPLICATION_DATA_AFTER_CLOSE_NOTIFY). # It sounds like it may soon be ignored by Python (as of March 2022).