diff --git a/.efrocachemap b/.efrocachemap index 5c396610..4414eeb2 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4056,50 +4056,50 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "53125d7d6bd34fdfe78880773272237b", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "804a8aa64c159a3812a31be3df3584b1", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "655d8bc1d591917d7bbec7ffed98a5a7", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "9830f4dac6f35121b19db8e2f332d87c", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "7a360065ea427f2d44f1db6d550becfb", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "dd5b6769d2e95c93aae7126c8bdd3ffe", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "791b43e652365874eb136b7ec147f9e8", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "8d3fe48c1a1b601aa97ce33e892f5163", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "12d92655438f34e912e1525991df1f73", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "e39556a0047b65919b61c740e096e967", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "ae3a622c7fe0bddc6badba38402284fd", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "1e744c3641f603e22b55882f96fb0a86", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "bcbb650a041317c7788a31525a7c2d02", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "a84d2e36cb685224749f556d5ba857a5", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "beeecfee397c12e4c7193391973873f7", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "f186772de8396573ca7daa4f765ac63a", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "ada072c442da241991d2de9ad35abf79", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "52a2e2a3bd751f941069d4d007d7bc59", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "82d428e93227eafc8c8ffcb6e24d1ec0", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "567cac9a0ba532234fedb35a9bdd51a3", - "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "6ce4983e76e1cc2d2803fe306d08ad58", - "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "4ea0cf78901f994215f215aebb0af1dc", - "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "6ce4983e76e1cc2d2803fe306d08ad58", - "build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "4ea0cf78901f994215f215aebb0af1dc", - "build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "87f651fed518cfa5ee34f820c49af72b", - "build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "5f28547e33fa30904dc989a39ac2d127", - "build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "87f651fed518cfa5ee34f820c49af72b", - "build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "5f28547e33fa30904dc989a39ac2d127", - "build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "1168b2ba42e7120d9321a900c5712cf0", - "build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "d23c56d85e8ee9a07c9245e548daa39c", - "build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "1168b2ba42e7120d9321a900c5712cf0", - "build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "d23c56d85e8ee9a07c9245e548daa39c", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "0c46358e1af4384af36367a3c0768605", - "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "de83e1b384abb333f457f2c9646f810f", - "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "0149ef8dae7720330416846919a834e7", - "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "de83e1b384abb333f457f2c9646f810f", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "163fbb4576a5218685919cf04de63cc6", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "66bbf458c1778685d38d6a2a537f6012", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "1ff129f72dc2dddc24d4dcdfb9b2826a", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "12d9566016a1bbd2aeb873d598d9ceed", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "ba99295cfbcbb3f6da27e4fad8227d74", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "8d53587d097910667fcb7f4958e55384", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "4f3e5d9578c0b0c3bd1203755fe8d464", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "ab834d0257bec7c972a2587a0b34eeff", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "4d8d52da9915f4190afb737a12c2a4a6", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "34424d97b81cfc82cbbfe88e9978928b", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "b719a269b2b7800b33df6e235630fe6a", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "bf758fd915923d37fe79846181d46e7e", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "542145537e5315ebf1f2e8cd6e2bdebc", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "e4776c2f7288079b56ba45aec3931a98", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "4a2c6aa6ec4b13398dc468d07d149e31", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "afc1712caa72d1c81c2b310501fce1c3", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "8144382107928e18dbdda1cd94ef61c9", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "e281fafc908a8bc56b9673197eb2ce09", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "4faf1ce6711ce63fe03e53931a636818", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "ae6ebe1ae25ceb19bd16721eeecc8ff0", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "1ee0eac0f087c62652cebf839f93b5be", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "50dfea89bbaa44cf3c2e3f3e726c4294", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "655ab674cd46d6238e9776a19690db5c", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "746e00a43761362ad35947dbac10b418", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "0bb3c5679477cc060ddd822efbc84622", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "0dc3da0e30cd8016edd2e57db4e5e57e", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "9b5a5c36c791f9bdc782872248976262", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "c98d0387c178bbd7b94124d7d7b5c334", + "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "ed4f56d8c3f411d4ee509d688fa75ed2", + "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "7703e63545add0d6baf9a2c0c48a8ff0", + "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "ed4f56d8c3f411d4ee509d688fa75ed2", + "build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "7703e63545add0d6baf9a2c0c48a8ff0", + "build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "a676d837abdc390988bb02822371cb8a", + "build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "325716db5f765632c41098245e13f016", + "build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "a676d837abdc390988bb02822371cb8a", + "build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "325716db5f765632c41098245e13f016", + "build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "d29c1a27fe79b6bec68b2bae8cd824ab", + "build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "13ba6c75f4cef904927092584668652a", + "build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "d29c1a27fe79b6bec68b2bae8cd824ab", + "build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "13ba6c75f4cef904927092584668652a", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "0cc7c23d18c9af1339799e10bb17c452", + "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "7b1e17863d20f12dd11f13e0e9e94726", + "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "4b5b600e7f830a92ed41e165afba0d29", + "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "7b1e17863d20f12dd11f13e0e9e94726", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "7eb2391ed4c9ed1f46dd6e83b71b1b62", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "bd52a679e048fc3adbc6f06b8e4f6bc2", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "0e4e93745d1059bcdefa0eeebc325fb6", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "c8412bc125285588dc1d8e723ce3d32e", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "87b7984235393fc7169dce8c9a63eaac", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "263c866d0c20317b900e4e5bad67c778", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "dcfdbd19c9a6a8430a20e3e5a31b5b96", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "0cb59737b1fcbaa2aa12d6bf447aeedc", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "f8cd3af311ac63147882590123b78318", "src/ballistica/base/mgen/pyembed/binding_base.inc": "9f71f171464dc004dbaab87e9bb4b03b", diff --git a/CHANGELOG.md b/CHANGELOG.md index a5227f63..c05c3c0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.28 (build 21407, api 8, 2023-10-02) +### 1.7.28 (build 21408, api 8, 2023-10-02) - Massively cleaned up code related to rendering and window systems (OpenGL, SDL, etc). This code had been growing into a nasty tangle for 15 years diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 52a2646f..218cfa19 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21407 +TARGET_BALLISTICA_BUILD = 21408 TARGET_BALLISTICA_VERSION = '1.7.28' diff --git a/src/assets/ba_data/python/bascenev1lib/actor/spawner.py b/src/assets/ba_data/python/bascenev1lib/actor/spawner.py index a4a38b90..78fa56cf 100644 --- a/src/assets/ba_data/python/bascenev1lib/actor/spawner.py +++ b/src/assets/ba_data/python/bascenev1lib/actor/spawner.py @@ -41,17 +41,17 @@ class Spawner: self, spawner: Spawner, data: Any, - pt: Sequence[float], # pylint: disable=invalid-name + pt: Sequence[float], ): """Instantiate with the given values.""" self.spawner = spawner self.data = data - self.pt = pt # pylint: disable=invalid-name + self.pt = pt def __init__( self, data: Any = None, - pt: Sequence[float] = (0, 0, 0), # pylint: disable=invalid-name + pt: Sequence[float] = (0, 0, 0), spawn_time: float = 1.0, send_spawn_message: bool = True, spawn_callback: Callable[[], Any] | None = None, diff --git a/src/assets/ba_data/python/bascenev1lib/actor/spazappearance.py b/src/assets/ba_data/python/bascenev1lib/actor/spazappearance.py index e73eee66..7cff4959 100644 --- a/src/assets/ba_data/python/bascenev1lib/actor/spazappearance.py +++ b/src/assets/ba_data/python/bascenev1lib/actor/spazappearance.py @@ -122,7 +122,6 @@ def register_appearances() -> None: """Register our builtin spaz appearances.""" # This is quite ugly but will be going away so not worth cleaning up. - # pylint: disable=invalid-name # pylint: disable=too-many-locals # pylint: disable=too-many-statements diff --git a/src/assets/ba_data/python/bascenev1lib/tutorial.py b/src/assets/ba_data/python/bascenev1lib/tutorial.py index b6f71680..e51c4a8d 100644 --- a/src/assets/ba_data/python/bascenev1lib/tutorial.py +++ b/src/assets/ba_data/python/bascenev1lib/tutorial.py @@ -8,7 +8,6 @@ # pylint: disable=too-many-statements # pylint: disable=too-many-lines # pylint: disable=missing-function-docstring, missing-class-docstring -# pylint: disable=invalid-name # pylint: disable=too-many-locals # pylint: disable=unused-argument # pylint: disable=unused-variable diff --git a/src/assets/ba_data/python/bauiv1lib/partyqueue.py b/src/assets/ba_data/python/bauiv1lib/partyqueue.py index f0f2e6ac..26c97bd6 100644 --- a/src/assets/ba_data/python/bauiv1lib/partyqueue.py +++ b/src/assets/ba_data/python/bauiv1lib/partyqueue.py @@ -20,7 +20,6 @@ class PartyQueueWindow(bui.Window): """Window showing players waiting to join a server.""" # Ewww this needs quite a bit of de-linting if/when i revisit it.. - # pylint: disable=invalid-name # pylint: disable=consider-using-dict-comprehension class Dude: """Represents a single dude waiting in a server line.""" diff --git a/src/ballistica/scene_v1/node/node.h b/src/ballistica/scene_v1/node/node.h index c1a74b82..d42bb4b2 100644 --- a/src/ballistica/scene_v1/node/node.h +++ b/src/ballistica/scene_v1/node/node.h @@ -17,7 +17,7 @@ namespace ballistica::scene_v1 { // Define a static creation call for this node type #define BA_NODE_CREATE_CALL(FUNC) \ - static auto FUNC(Scene* sg)->Node* { \ + static auto FUNC(Scene* sg) -> Node* { \ return Object::NewDeferred(sg); \ } diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index fcf49cad..31ad094a 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21407; +const int kEngineBuildNumber = 21408; const char* kEngineVersion = "1.7.28"; const int kEngineApiVersion = 8; diff --git a/src/ballistica/shared/generic/utf8.h b/src/ballistica/shared/generic/utf8.h index 79c5c678..821a343b 100644 --- a/src/ballistica/shared/generic/utf8.h +++ b/src/ballistica/shared/generic/utf8.h @@ -11,7 +11,7 @@ namespace ballistica { /* is c the start of a utf8 sequence? */ -#define isutf(c) (((c)&0xC0) != 0x80) +#define isutf(c) (((c) & 0xC0) != 0x80) /* convert UTF-8 data to wide character */ auto u8_toucs(uint32_t* dest, int sz, const char* src, int srcsz) -> int; diff --git a/src/ballistica/shared/math/matrix44f.cc b/src/ballistica/shared/math/matrix44f.cc index a347c652..46d08c3e 100644 --- a/src/ballistica/shared/math/matrix44f.cc +++ b/src/ballistica/shared/math/matrix44f.cc @@ -123,7 +123,7 @@ auto Matrix44f::Transpose() const -> Matrix44f { static void InvertMatrixGeneral(const float* mat, float* out) { /* NB. OpenGL Matrices are COLUMN major. */ -#define MAT(m, r, c) (mat)[(c)*4 + (r)] +#define MAT(m, r, c) (mat)[(c) * 4 + (r)] /* Here's some shorthand converting standard (row,column) to index. */ #define m11 MAT(mat, 0, 0) @@ -229,7 +229,7 @@ static void InvertMatrixGeneral(const float* mat, float* out) { static void InvertMatrix(const float* mat, float* out) { /* NB. OpenGL Matrices are COLUMN major. */ -#define MAT(mat, r, c) (mat)[(c)*4 + (r)] +#define MAT(mat, r, c) (mat)[(c) * 4 + (r)] /* Here's some shorthand converting standard (row,column) to index. */ #define m11 MAT(mat, 0, 0) diff --git a/tools/batools/build.py b/tools/batools/build.py index 7bce2a91..aa037aa9 100644 --- a/tools/batools/build.py +++ b/tools/batools/build.py @@ -43,25 +43,25 @@ class PyRequirement: # remove our custom module based stuff soon if nobody complains, which # would free us to theoretically move to a requirements.txt based setup. PY_REQUIREMENTS = [ - PyRequirement(pipname='pylint', minversion=[2, 17, 5]), - PyRequirement(pipname='mypy', minversion=[1, 4, 1]), + PyRequirement(pipname='pylint', minversion=[3, 0, 0]), + PyRequirement(pipname='mypy', minversion=[1, 5, 1]), PyRequirement(pipname='cpplint', minversion=[1, 6, 1]), - PyRequirement(pipname='pytest', minversion=[7, 4, 0]), + PyRequirement(pipname='pytest', minversion=[7, 4, 2]), PyRequirement(pipname='pytz', minversion=[2023, 3]), PyRequirement(pipname='ansiwrap', minversion=[0, 8, 4]), PyRequirement(pipname='requests', minversion=[2, 31, 0]), - PyRequirement(pipname='pdoc', minversion=[14, 0, 0]), + PyRequirement(pipname='pdoc', minversion=[14, 1, 0]), PyRequirement(pipname='PyYAML', minversion=[6, 0, 1]), - PyRequirement(pipname='black', minversion=[23, 7, 0]), - PyRequirement(pipname='typing_extensions', minversion=[4, 7, 1]), + PyRequirement(pipname='black', minversion=[23, 9, 1]), + PyRequirement(pipname='typing_extensions', minversion=[4, 8, 0]), PyRequirement(pipname='types-filelock', minversion=[3, 2, 7]), - PyRequirement(pipname='types-requests', minversion=[2, 31, 0, 2]), - PyRequirement(pipname='types-pytz', minversion=[2023, 3, 0, 0]), - PyRequirement(pipname='types-PyYAML', minversion=[6, 0, 12, 11]), + PyRequirement(pipname='types-requests', minversion=[2, 31, 0, 6]), + PyRequirement(pipname='types-pytz', minversion=[2023, 3, 1, 1]), + PyRequirement(pipname='types-PyYAML', minversion=[6, 0, 12, 12]), PyRequirement(pipname='certifi', minversion=[2023, 7, 22]), PyRequirement(pipname='types-certifi', minversion=[2021, 10, 8, 3]), PyRequirement(pipname='pbxproj', minversion=[3, 5, 0]), - PyRequirement(pipname='filelock', minversion=[3, 12, 2]), + PyRequirement(pipname='filelock', minversion=[3, 12, 4]), PyRequirement(pipname='python-daemon', minversion=[3, 0, 1]), ] diff --git a/tools/efro/message/_protocol.py b/tools/efro/message/_protocol.py index 1276233b..04c1dea5 100644 --- a/tools/efro/message/_protocol.py +++ b/tools/efro/message/_protocol.py @@ -344,24 +344,24 @@ class MessageProtocol: if part == 'sender': import_lines += ( - 'from efro.message import MessageSender, BoundMessageSender' + 'from efro.message import MessageSender, BoundMessageSender\n' ) tpimport_typing_extras = '' else: if single_message_type: import_lines += ( 'from efro.message import (MessageReceiver,' - ' BoundMessageReceiver, Message, Response)' + ' BoundMessageReceiver, Message, Response)\n' ) else: import_lines += ( 'from efro.message import MessageReceiver,' - ' BoundMessageReceiver' + ' BoundMessageReceiver\n' ) tpimport_typing_extras = ', Awaitable' if extra_import_code is not None: - import_lines += f'\n{extra_import_code}\n' + import_lines += extra_import_code ovld = ', overload' if not single_message_type else '' ovld2 = ( @@ -386,7 +386,7 @@ class MessageProtocol: f'\n' f'from typing import TYPE_CHECKING{ovld}{ovld2}\n' f'\n' - f'{import_lines}\n' + f'{import_lines}' f'\n' f'if TYPE_CHECKING:\n' f' from typing import {baseimps_s}' diff --git a/tools/efro/util.py b/tools/efro/util.py index e5e7e4a9..8bc4542a 100644 --- a/tools/efro/util.py +++ b/tools/efro/util.py @@ -52,6 +52,22 @@ else: Call = functools.partial +def explicit_bool(val: bool) -> bool: + """Return a non-inferable boolean value. + + Useful to be able to disable blocks of code without type checkers + complaining/etc. + """ + # pylint: disable=no-else-return + if TYPE_CHECKING: + # infer this! + import random + + return random.random() < 0.5 + else: + return val + + def snake_case_to_title(val: str) -> str: """Given a snake-case string 'foo_bar', returns 'Foo Bar'.""" # Kill empty words resulting from leading/trailing/multiple underscores. diff --git a/tools/efrotools/code.py b/tools/efrotools/code.py index 2abf998d..66f9374b 100644 --- a/tools/efrotools/code.py +++ b/tools/efrotools/code.py @@ -519,7 +519,7 @@ def _run_pylint( args += dirtyfiles name = f'{len(dirtyfiles)} file(s)' - run = lint.Run(args, do_exit=False) + run = lint.Run(args, exit=False) if cache is not None: assert allfiles is not None result = _apply_pylint_run_to_cache( diff --git a/tools/efrotools/message.py b/tools/efrotools/message.py index 5ea293fd..df77e936 100644 --- a/tools/efrotools/message.py +++ b/tools/efrotools/message.py @@ -46,8 +46,9 @@ def standard_message_sender_gen_pcommand( build_time_protocol_create_code: str | None if embedded: protocol_module_level_import_code = ( + 'from efro.util import explicit_bool\n' f'\n# Dummy import for type-checking purposes.\n' - f'if bool(False):\n' + f'if explicit_bool(False):\n' f' from {source_module} import {get_protocol_import}' ) protocol_create_code = f'protocol = {get_protocol_call}()' @@ -111,9 +112,10 @@ def standard_message_receiver_gen_pcommand( build_time_protocol_create_code: str | None if embedded: protocol_module_level_import_code = ( + 'from efro.util import explicit_bool\n' f'\n# Dummy import for type-checking purposes.\n' - f'if bool(False):\n' - f' from {source_module} import {get_protocol_import}' + f'if explicit_bool(False):\n' + f' from {source_module} import {get_protocol_import}\n' ) protocol_create_code = f'protocol = {get_protocol_call}()' build_time_protocol_create_code = ( diff --git a/tools/efrotools/pylintplugins.py b/tools/efrotools/pylintplugins.py index 2818c7eb..5f5a194b 100644 --- a/tools/efrotools/pylintplugins.py +++ b/tools/efrotools/pylintplugins.py @@ -77,7 +77,9 @@ def ignore_type_check_filter(if_node: nc.NodeNG) -> nc.NodeNG: passnode = astroid.Pass( parent=if_node, lineno=if_node.lineno + 1, + end_lineno=if_node.lineno + 1, col_offset=if_node.col_offset + 1, + end_col_offset=if_node.col_offset + 1, ) if_node.body = [passnode] return if_node