mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-28 18:15:45 +08:00
language updates and tidying
This commit is contained in:
parent
29eefd6b10
commit
938c5b1c13
@ -420,7 +420,7 @@
|
||||
"assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/04/0a/c4f7d2794b018593ab0b2bcb07f0",
|
||||
"assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/06/4d/18777c9a2eb2207a2891a2837a70",
|
||||
"assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/81/90/23ab1ecc8c55267bd904a9c05344",
|
||||
"assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/f1/14/4a5bc422b6440fcd0afaf8bbf3e2",
|
||||
"assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/2a/62/6f317fdf46f5754b44186dd27580",
|
||||
"assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/8b/fa/719ccefcd94822218fcedb9d5038",
|
||||
"assets/build/ba_data/data/languages/belarussian.json": "https://files.ballistica.net/cache/ba1/44/ed/5b972fa848cffb73723533c2ccb7",
|
||||
"assets/build/ba_data/data/languages/chinese.json": "https://files.ballistica.net/cache/ba1/69/cc/f8bdd1e83162481c6bf2a78cb5e0",
|
||||
@ -435,7 +435,7 @@
|
||||
"assets/build/ba_data/data/languages/german.json": "https://files.ballistica.net/cache/ba1/19/ba/b12493cfaa28d27f9bfee0459e20",
|
||||
"assets/build/ba_data/data/languages/gibberish.json": "https://files.ballistica.net/cache/ba1/93/31/66df9784a606600b7933bcb8ffa1",
|
||||
"assets/build/ba_data/data/languages/greek.json": "https://files.ballistica.net/cache/ba1/51/31/64479524c0ee990b3e97ffdca068",
|
||||
"assets/build/ba_data/data/languages/hindi.json": "https://files.ballistica.net/cache/ba1/d5/19/5e450e35b83fe68722330d03b896",
|
||||
"assets/build/ba_data/data/languages/hindi.json": "https://files.ballistica.net/cache/ba1/ed/98/37d9457755f7e86e2f2875e3b055",
|
||||
"assets/build/ba_data/data/languages/hungarian.json": "https://files.ballistica.net/cache/ba1/87/2d/027aa239eb66ea8f496562f4fd83",
|
||||
"assets/build/ba_data/data/languages/indonesian.json": "https://files.ballistica.net/cache/ba1/a4/01/1fcc28b303858b3d028d26516907",
|
||||
"assets/build/ba_data/data/languages/italian.json": "https://files.ballistica.net/cache/ba1/20/ca/d675783cd094030a625e7ce023cf",
|
||||
@ -3932,32 +3932,32 @@
|
||||
"assets/build/windows/Win32/ucrtbased.dll": "https://files.ballistica.net/cache/ba1/b5/85/f8b6d0558ddb87267f34254b1450",
|
||||
"assets/build/windows/Win32/vc_redist.x86.exe": "https://files.ballistica.net/cache/ba1/1c/e1/4a1a2eddda2f4aebd5f8b64ab08e",
|
||||
"assets/build/windows/Win32/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/50/8d/bc2600ac9491f1b14d659709451f",
|
||||
"build/prefab/full/linux_x86_64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c3/37/024056b52b1ab36a0481ead1e718",
|
||||
"build/prefab/full/linux_x86_64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c4/5c/a572440cbca95bf0ffbe503d1602",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1a/3c/5cf31bcc82f352651fd4383add39",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6d/ae/e5e6a2312028ef69df1d818147ad",
|
||||
"build/prefab/full/mac_arm64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/79/cf/3807b756d7251fa122ddc31de002",
|
||||
"build/prefab/full/mac_arm64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/17/72/6f0f34c727c13cb9d475ab888529",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/26/1e/72bcebdcae9c7de45d688a739e5c",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ea/7d/c743cc744396a5055fea05403dec",
|
||||
"build/prefab/full/mac_x86_64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/52/5e/fbc997f6fe12cd3ff6718d363685",
|
||||
"build/prefab/full/mac_x86_64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/93/7e/901930970d61a20a8e81c6adb77f",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d5/1f/c87b3bd438c3bfc7eed8c3fdd830",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5f/fd/87486914c7a6a3b3de863e723bd8",
|
||||
"build/prefab/full/windows_x86/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/df/ff/77316ad5ed576772c7e54d569571",
|
||||
"build/prefab/full/windows_x86/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/33/0a/9c65fd6874b1fd824d1a7d994c33",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/9f/f6/f7d7c08489ee52bc1f000a0de294",
|
||||
"build/prefab/full/windows_x86_server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/1a/c2/8431f62aa377d0ba6d6833013712",
|
||||
"build/prefab/full/linux_x86_64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a4/7e/cae0031859bed2e0a34a79b243c4",
|
||||
"build/prefab/full/linux_x86_64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/12/91/e6a3995fdf4553a5f34ce72cd1ed",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ca/cf/899cd549b81aa2f133155e9a6150",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ea/9d/bc80860fb39ff5918f39adb2e92c",
|
||||
"build/prefab/full/mac_arm64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b3/61/9fe18f4a423c3c1219edeb9c7ced",
|
||||
"build/prefab/full/mac_arm64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e0/e7/4e4461de1cffaba4c1ca0f1de1b9",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/69/e6/5193ce71e7202edcca453317be2a",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/28/e7/bd1d4362769070d1da8be6688d2d",
|
||||
"build/prefab/full/mac_x86_64/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c3/cc/cc028b2a8812890623e97bf31340",
|
||||
"build/prefab/full/mac_x86_64/release/ballisticacore": "https://files.ballistica.net/cache/ba1/bc/0d/2293ebba6f0c207bb1173670023f",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d6/8f/525655e2d4028c9f706c11a6399e",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8a/da/c07231b5f6d2d9aff3d58c9e5c96",
|
||||
"build/prefab/full/windows_x86/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/33/61/070d7647f4b62e27d7e240dbf942",
|
||||
"build/prefab/full/windows_x86/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a2/ac/7b691e6ed2dcc79f384a78435b0b",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/9d/8f/567b8709eb5699120ddc984d5e4e",
|
||||
"build/prefab/full/windows_x86_server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/d3/48/3b6e71efd9e0b1eb714ec0dce009",
|
||||
"build/prefab/lib/linux_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/d3/51/8ddfd77cd98e30b27fbeb11cfbe7",
|
||||
"build/prefab/lib/linux_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/83/25/980050d75bbea49a84652209050c",
|
||||
"build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/81/a4/e2b3ac8eec73286f93fa0409bf88",
|
||||
"build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2b/45/7f9fbae208890455fce2fbc172d3",
|
||||
"build/prefab/lib/mac_arm64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b4/2c/414ac6c258e69fba7c0cf899ae8a",
|
||||
"build/prefab/lib/mac_arm64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/15/3f/23aff5bb8dd628345ade5d69c9bb",
|
||||
"build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/71/e3/50e4404d25e65b84584ac1fa94cb",
|
||||
"build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ff/0a/b1deb9ecc9a42c3867948a967ef1",
|
||||
"build/prefab/lib/mac_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/dc/d5/3d4e86d7221f9f32b65da512fb71",
|
||||
"build/prefab/lib/mac_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3f/7c/78754b4d3e3cd271b2815bf6c8ae",
|
||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/00/5d/853823b9b4ce4511599134ffd939",
|
||||
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ab/2a/dbe6306405e14ecf6325decceaec"
|
||||
"build/prefab/lib/mac_arm64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/45/c3/136b704584098041f572c89aae6e",
|
||||
"build/prefab/lib/mac_arm64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e1/d9/6d7a0ada40ff882a380cb76b4b08",
|
||||
"build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/25/4e/c08fd4f61caaddcb2a6ff755bbfb",
|
||||
"build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0a/26/c2898c494ecde6b74cb186dadedc",
|
||||
"build/prefab/lib/mac_x86_64/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/52/1b/a0a6e32de2080e88318a9f2ad4f5",
|
||||
"build/prefab/lib/mac_x86_64/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7b/fd/8c998561c346f4a017fb306d9f2e",
|
||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c3/5e/f8c256a5f17cd2e10c9354848e49",
|
||||
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8f/87/038a155285cd51c3b3ad6e8806cf"
|
||||
}
|
||||
1
.idea/dictionaries/ericf.xml
generated
1
.idea/dictionaries/ericf.xml
generated
@ -67,6 +67,7 @@
|
||||
<w>animcurve</w>
|
||||
<w>anota</w>
|
||||
<w>anroid</w>
|
||||
<w>ansiwrap</w>
|
||||
<w>antigravity</w>
|
||||
<w>anyofallof</w>
|
||||
<w>apichanges</w>
|
||||
|
||||
2
Makefile
2
Makefile
@ -29,7 +29,7 @@ CLOUDSHELL_HOST_MAC_ARM64 ?= fromini
|
||||
CLOUDSHELL_HOST_LINUX_X86_64 ?= linbeast
|
||||
CLOUDSHELL_HOST_ANDROID ?= linbeast
|
||||
# FIXME use rpi4 when its back
|
||||
CLOUDSHELL_HOST_RPI ?= rpi3
|
||||
CLOUDSHELL_HOST_RPI ?= rpi4
|
||||
|
||||
# List targets in this Makefile and basic descriptions for them.
|
||||
help:
|
||||
|
||||
@ -13,8 +13,8 @@
|
||||
<w>ack'ed</w>
|
||||
<w>acked</w>
|
||||
<w>acks</w>
|
||||
<w>aclass</w>
|
||||
<w>aclass's</w>
|
||||
<w>aclass</w>
|
||||
<w>activityplayer</w>
|
||||
<w>addrs</w>
|
||||
<w>adjoint</w>
|
||||
@ -38,6 +38,7 @@
|
||||
<w>alsoft</w>
|
||||
<w>animcurve</w>
|
||||
<w>aniso</w>
|
||||
<w>ansiwrap</w>
|
||||
<w>anyofallof</w>
|
||||
<w>apientry</w>
|
||||
<w>appconfig</w>
|
||||
@ -151,8 +152,8 @@
|
||||
<w>cmath</w>
|
||||
<w>cmds</w>
|
||||
<w>cmdvals</w>
|
||||
<w>codewarrior</w>
|
||||
<w>codewarrior's</w>
|
||||
<w>codewarrior</w>
|
||||
<w>cofnodes</w>
|
||||
<w>collapseable</w>
|
||||
<w>collidable</w>
|
||||
|
||||
@ -29,7 +29,8 @@
|
||||
"yaml",
|
||||
"requests",
|
||||
"typing_extensions",
|
||||
"cpplint"
|
||||
"cpplint",
|
||||
"ansiwrap"
|
||||
],
|
||||
"python_paths": [
|
||||
"assets/src/ba_data/python",
|
||||
|
||||
@ -24,6 +24,9 @@ ignore_missing_imports = True
|
||||
[mypy-cpplint.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-ansiwrap.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
[mypy-xml.*]
|
||||
ignore_missing_imports = True
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
|
||||
<h4><em>last updated on 2020-12-10 for Ballistica version 1.5.29 build 20258</em></h4>
|
||||
<h4><em>last updated on 2020-12-16 for Ballistica version 1.5.29 build 20259</em></h4>
|
||||
<p>This page documents the Python classes and functions in the 'ba' module,
|
||||
which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please <a href="mailto:support@froemling.net">let me know</a>. Happy modding!</p>
|
||||
<hr>
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
namespace ballistica {
|
||||
|
||||
// These are set automatically via script; don't change here.
|
||||
const int kAppBuildNumber = 20259;
|
||||
const int kAppBuildNumber = 20260;
|
||||
const char* kAppVersion = "1.5.29";
|
||||
|
||||
// Our standalone globals.
|
||||
@ -212,8 +212,8 @@ auto GetUniqueSessionIdentifier() -> const std::string& {
|
||||
static bool have_session_id = false;
|
||||
if (!have_session_id) {
|
||||
srand(static_cast<unsigned int>(
|
||||
Platform::GetCurrentMilliseconds())); // NOLINT
|
||||
uint32_t tval = static_cast<uint32_t>(rand()); // NOLINT
|
||||
Platform::GetCurrentMilliseconds())); // NOLINT
|
||||
auto tval = static_cast<uint32_t>(rand()); // NOLINT
|
||||
assert(g_platform);
|
||||
session_id = g_platform->GetUniqueDeviceIdentifier() + std::to_string(tval);
|
||||
have_session_id = true;
|
||||
|
||||
@ -141,7 +141,6 @@ def test_assign() -> None:
|
||||
dataclass_assign(tclass, {'lfval': [1]})
|
||||
|
||||
|
||||
# noinspection PyTypeHints
|
||||
def test_validate() -> None:
|
||||
"""Testing validation."""
|
||||
|
||||
|
||||
@ -67,7 +67,6 @@ class EntityTest(entity.Entity):
|
||||
fval2 = entity.Field('f2', entity.Float3Value())
|
||||
|
||||
|
||||
# noinspection PyTypeHints
|
||||
def test_entity_values() -> None:
|
||||
"""Test various entity assigns for value and type correctness."""
|
||||
ent = EntityTest()
|
||||
@ -124,7 +123,6 @@ def test_entity_values() -> None:
|
||||
assert dict(ent.str_int_dict.items()) == {'foo': 123}
|
||||
|
||||
|
||||
# noinspection PyTypeHints
|
||||
def test_entity_values_2() -> None:
|
||||
"""Test various entity assigns for value and type correctness."""
|
||||
|
||||
@ -184,7 +182,6 @@ def test_entity_values_2() -> None:
|
||||
assert static_type_equals(ent.grp.compoundlist[0].subval, bool)
|
||||
|
||||
|
||||
# noinspection PyTypeHints
|
||||
def test_field_copies() -> None:
|
||||
"""Test copying various values between fields."""
|
||||
ent1 = EntityTest()
|
||||
|
||||
@ -36,6 +36,7 @@ PIP_REQUIREMENTS = [
|
||||
PipRequirement(modulename='pytest', minversion=[6, 1, 2]),
|
||||
PipRequirement(modulename='typing_extensions'),
|
||||
PipRequirement(modulename='pytz'),
|
||||
PipRequirement(modulename='ansiwrap'),
|
||||
PipRequirement(modulename='yaml', pipname='PyYAML'),
|
||||
PipRequirement(modulename='requests'),
|
||||
]
|
||||
@ -53,9 +54,9 @@ SPARSE_TEST_BUILDS: List[List[str]] = [
|
||||
['ios.pylibs', 'android.pylibs.arm64.debug'],
|
||||
['linux.package.server'],
|
||||
['android.pylibs.x86.debug', 'mac.package'],
|
||||
['mac.package.server', 'android.pylibs.x86_64'],
|
||||
['mac.package.server.arm64', 'android.pylibs.x86_64'],
|
||||
['windows.package.oculus'],
|
||||
['android.pylibs.x86_64.debug'],
|
||||
['mac.package.server.x86_64', 'android.pylibs.x86_64.debug'],
|
||||
['mac.pylibs.debug', 'android.package'],
|
||||
]
|
||||
|
||||
@ -295,7 +296,7 @@ def gen_fulltest_buildfile_android() -> None:
|
||||
lines.append(f'{cspre} tools/pcommand'
|
||||
f' python_build_android_debug arm64')
|
||||
elif extra == 'android.pylibs.x86':
|
||||
lines.append(f'{cspre}tools/pcommand'
|
||||
lines.append(f'{cspre} tools/pcommand'
|
||||
f' python_build_android x86')
|
||||
elif extra == 'android.pylibs.x86.debug':
|
||||
lines.append(f'{cspre} tools/pcommand'
|
||||
@ -413,8 +414,10 @@ def gen_fulltest_buildfile_apple() -> None:
|
||||
for extra in extras:
|
||||
if extra == 'mac.package':
|
||||
lines.append('make mac-package')
|
||||
elif extra == 'mac.package.server':
|
||||
lines.append('make mac-cloud-server-package')
|
||||
elif extra == 'mac.package.server.x86_64':
|
||||
lines.append('make mac-cloud-server-package-x86-64')
|
||||
elif extra == 'mac.package.server.arm64':
|
||||
lines.append('make mac-cloud-server-package-arm64')
|
||||
elif extra == 'mac.pylibs':
|
||||
lines.append('tools/pcommand python_build_apple mac')
|
||||
elif extra == 'mac.pylibs.debug':
|
||||
@ -528,6 +531,8 @@ def checkenv() -> None:
|
||||
f'pip (for {PYTHON_BIN}) is required; please install it.')
|
||||
|
||||
# Check for some required python modules.
|
||||
# FIXME: since all of these come from pip now, we should just use
|
||||
# pip --list to check versions on everything instead of doing it ad-hoc.
|
||||
for req in PIP_REQUIREMENTS:
|
||||
modname = req.modulename
|
||||
minver = req.minversion
|
||||
|
||||
@ -2,11 +2,23 @@
|
||||
#
|
||||
"""Entity functionality.
|
||||
|
||||
A system for defining complex data-containing types, supporting both static
|
||||
and run-time type safety, serialization, efficient/sparse storage, per-field
|
||||
value limits, etc. These are heavy-weight in comparison to things such as
|
||||
A system for defining structured data, supporting both static and runtime
|
||||
type safety, serialization, efficient/sparse storage, per-field value
|
||||
limits, etc. These are heavy-weight in comparison to things such as
|
||||
dataclasses, but the increased features can make the overhead worth it for
|
||||
certain use cases.
|
||||
|
||||
Advantages compared to nested dataclasses:
|
||||
- Can wrap and preserve unmapped data (so fields can be added to new versions
|
||||
of something without breaking old versions' ability to read the data)
|
||||
- Incorrectly typed data is caught at runtime (for dataclasses we rely on
|
||||
type-checking and explicit validation calls)
|
||||
|
||||
Disadvantages compared to nested dataclasses:
|
||||
- More complex to use
|
||||
- Significantly more heavyweight (roughly 10 times slower in quick tests)
|
||||
- Can't currently be initialized in constructors (this would probably require
|
||||
a Mypy plugin to do in a type-safe way)
|
||||
"""
|
||||
# pylint: disable=unused-import
|
||||
|
||||
|
||||
@ -103,7 +103,6 @@ class EntityMixin:
|
||||
self.d_data = target.d_data
|
||||
|
||||
# Make sure target blows up if someone tries to use it.
|
||||
# noinspection PyTypeHints
|
||||
target.d_data = None # type: ignore
|
||||
|
||||
def pruned_data(self) -> Dict[str, Any]:
|
||||
@ -214,5 +213,6 @@ class Entity(EntityMixin, CompoundValue):
|
||||
to accomplish the same. The latter allows sharing CompoundValue
|
||||
layouts between different concrete Entity types. For example, a
|
||||
'Weapon' CompoundValue could be embedded as part of a 'Character'
|
||||
Entity but also exist as a distinct Entity in an armory database.
|
||||
Entity but also exist as a distinct 'WeaponEntity' in an armory
|
||||
database.
|
||||
"""
|
||||
|
||||
@ -116,7 +116,7 @@ def compound_eq(obj1: Union[BoundCompoundValue, CompoundValue],
|
||||
|
||||
# Criteria for comparison: both need to be a compound value
|
||||
# and both must have data (which implies they are either a entity
|
||||
# or bound to a subfield in a entity).
|
||||
# or bound to a subfield in an entity).
|
||||
value1, data1 = get_compound_value_and_data(obj1)
|
||||
if data1 is None:
|
||||
return NotImplemented
|
||||
|
||||
@ -35,7 +35,6 @@ def utc_now() -> datetime.datetime:
|
||||
return datetime.datetime.now(datetime.timezone.utc)
|
||||
|
||||
|
||||
# noinspection PyUnresolvedReferences
|
||||
def empty_weakref(objtype: Type[T]) -> ReferenceType[T]:
|
||||
"""Return an invalidated weak-reference for the specified type."""
|
||||
# At runtime, all weakrefs are the same; our type arg is just
|
||||
|
||||
@ -377,6 +377,7 @@ def _filter_tool_config(cfg: str) -> str:
|
||||
|
||||
# Try to be as strict as we can about using types everywhere.
|
||||
warn_unused_ignores = True
|
||||
warn_no_return = True
|
||||
warn_return_any = True
|
||||
warn_redundant_casts = True
|
||||
warn_unreachable = True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user