This commit is contained in:
Eric Froemling 2020-12-22 09:51:16 -08:00
parent 34d2182d2a
commit 0206f386fa
5 changed files with 16 additions and 7 deletions

View File

@ -30,8 +30,8 @@
<w>achname</w> <w>achname</w>
<w>achs</w> <w>achs</w>
<w>acinstance</w> <w>acinstance</w>
<w>ack'ed</w>
<w>ack</w> <w>ack</w>
<w>ack'ed</w>
<w>acked</w> <w>acked</w>
<w>acks</w> <w>acks</w>
<w>acnt</w> <w>acnt</w>
@ -155,8 +155,8 @@
<w>bacommon</w> <w>bacommon</w>
<w>badguy</w> <w>badguy</w>
<w>bafoundation</w> <w>bafoundation</w>
<w>ballistica's</w>
<w>ballistica</w> <w>ballistica</w>
<w>ballistica's</w>
<w>ballisticacore</w> <w>ballisticacore</w>
<w>ballisticacorecb</w> <w>ballisticacorecb</w>
<w>bamaster</w> <w>bamaster</w>
@ -815,8 +815,8 @@
<w>gamedata</w> <w>gamedata</w>
<w>gameinstance</w> <w>gameinstance</w>
<w>gamemap</w> <w>gamemap</w>
<w>gamepad's</w>
<w>gamepad</w> <w>gamepad</w>
<w>gamepad's</w>
<w>gamepadadvanced</w> <w>gamepadadvanced</w>
<w>gamepads</w> <w>gamepads</w>
<w>gamepadselect</w> <w>gamepadselect</w>
@ -1207,8 +1207,8 @@
<w>lsqlite</w> <w>lsqlite</w>
<w>lssl</w> <w>lssl</w>
<w>lstart</w> <w>lstart</w>
<w>lstr's</w>
<w>lstr</w> <w>lstr</w>
<w>lstr's</w>
<w>lstrs</w> <w>lstrs</w>
<w>lsval</w> <w>lsval</w>
<w>ltex</w> <w>ltex</w>
@ -1847,8 +1847,8 @@
<w>sessionname</w> <w>sessionname</w>
<w>sessionplayer</w> <w>sessionplayer</w>
<w>sessionplayers</w> <w>sessionplayers</w>
<w>sessionteam's</w>
<w>sessionteam</w> <w>sessionteam</w>
<w>sessionteam's</w>
<w>sessionteams</w> <w>sessionteams</w>
<w>sessiontype</w> <w>sessiontype</w>
<w>setactivity</w> <w>setactivity</w>
@ -2184,8 +2184,8 @@
<w>txtw</w> <w>txtw</w>
<w>typeargs</w> <w>typeargs</w>
<w>typecheck</w> <w>typecheck</w>
<w>typechecker's</w>
<w>typechecker</w> <w>typechecker</w>
<w>typechecker's</w>
<w>typedval</w> <w>typedval</w>
<w>typeshed</w> <w>typeshed</w>
<w>typestr</w> <w>typestr</w>

View File

@ -1,5 +1,5 @@
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND --> <!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
<h4><em>last updated on 2020-12-21 for Ballistica version 1.5.29 build 20262</em></h4> <h4><em>last updated on 2020-12-21 for Ballistica version 1.5.29 build 20263</em></h4>
<p>This page documents the Python classes and functions in the 'ba' module, <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> 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> <hr>

View File

@ -169,6 +169,7 @@ def test_validate() -> None:
dataclass_validate(tclass) dataclass_validate(tclass)
# No longer valid. # No longer valid.
# noinspection PyTypeHints
tclass.ival = None # type: ignore tclass.ival = None # type: ignore
with pytest.raises(TypeError): with pytest.raises(TypeError):
dataclass_validate(tclass) dataclass_validate(tclass)

View File

@ -73,6 +73,7 @@ def test_entity_values() -> None:
# Simple int field. # Simple int field.
with pytest.raises(TypeError): with pytest.raises(TypeError):
# noinspection PyTypeHints
ent.ival = 'strval' # type: ignore ent.ival = 'strval' # type: ignore
assert static_type_equals(ent.ival, int) assert static_type_equals(ent.ival, int)
assert isinstance(ent.ival, int) assert isinstance(ent.ival, int)
@ -82,6 +83,7 @@ def test_entity_values() -> None:
# Simple float field. # Simple float field.
with pytest.raises(TypeError): with pytest.raises(TypeError):
# noinspection PyTypeHints
ent.fval = 'foo' # type: ignore ent.fval = 'foo' # type: ignore
assert static_type_equals(ent.fval, float) assert static_type_equals(ent.fval, float)
ent.fval = 2 ent.fval = 2
@ -98,6 +100,7 @@ def test_entity_values() -> None:
assert len(ent.slval) == 1 assert len(ent.slval) == 1
assert list(ent.slval) == ['blah'] assert list(ent.slval) == ['blah']
with pytest.raises(TypeError): with pytest.raises(TypeError):
# noinspection PyTypeHints
ent.slval = ['foo', 'bar', 1] # type: ignore ent.slval = ['foo', 'bar', 1] # type: ignore
# Simple value dict field. # Simple value dict field.
@ -133,6 +136,7 @@ def test_entity_values_2() -> None:
assert static_type_equals(ent.grp.isubval, int) assert static_type_equals(ent.grp.isubval, int)
assert isinstance(ent.grp.isubval, int) assert isinstance(ent.grp.isubval, int)
with pytest.raises(TypeError): with pytest.raises(TypeError):
# noinspection PyTypeHints
ent.grp.isubval = 'blah' # type: ignore ent.grp.isubval = 'blah' # type: ignore
# Compound value inheritance. # Compound value inheritance.
@ -166,6 +170,7 @@ def test_entity_values_2() -> None:
# Enum value # Enum value
with pytest.raises(ValueError): with pytest.raises(ValueError):
# noinspection PyTypeHints
ent.enumval = None # type: ignore ent.enumval = None # type: ignore
assert ent.enumval == EnumTest.FIRST assert ent.enumval == EnumTest.FIRST
@ -231,6 +236,7 @@ def test_field_copies() -> None:
# And not if they don't... # And not if they don't...
# (in this case mypy errors too but that may not always be the case) # (in this case mypy errors too but that may not always be the case)
with pytest.raises(ValueError): with pytest.raises(ValueError):
# noinspection PyTypeHints
ent1.compoundlist3 = ent1.compoundlist # type: ignore ent1.compoundlist3 = ent1.compoundlist # type: ignore
# Copying a CompoundDict # Copying a CompoundDict
@ -249,6 +255,7 @@ def test_field_copies() -> None:
# two CompoundValues have the same type but different layouts based # two CompoundValues have the same type but different layouts based
# on their __init__ args or whatnot) # on their __init__ args or whatnot)
with pytest.raises(ValueError): with pytest.raises(ValueError):
# noinspection PyTypeHints
ent1.compounddict3 = ent1.compounddict # type: ignore ent1.compounddict3 = ent1.compounddict # type: ignore
# Make sure invalid key types get caught when setting a full dict: # Make sure invalid key types get caught when setting a full dict:
with pytest.raises(TypeError): with pytest.raises(TypeError):

View File

@ -103,6 +103,7 @@ class EntityMixin:
self.d_data = target.d_data self.d_data = target.d_data
# Make sure target blows up if someone tries to use it. # Make sure target blows up if someone tries to use it.
# noinspection PyTypeHints
target.d_data = None # type: ignore target.d_data = None # type: ignore
def pruned_data(self) -> Dict[str, Any]: def pruned_data(self) -> Dict[str, Any]: