mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-19 21:37:57 +08:00
tidying
This commit is contained in:
parent
34d2182d2a
commit
0206f386fa
12
.idea/dictionaries/ericf.xml
generated
12
.idea/dictionaries/ericf.xml
generated
@ -30,8 +30,8 @@
|
||||
<w>achname</w>
|
||||
<w>achs</w>
|
||||
<w>acinstance</w>
|
||||
<w>ack'ed</w>
|
||||
<w>ack</w>
|
||||
<w>ack'ed</w>
|
||||
<w>acked</w>
|
||||
<w>acks</w>
|
||||
<w>acnt</w>
|
||||
@ -155,8 +155,8 @@
|
||||
<w>bacommon</w>
|
||||
<w>badguy</w>
|
||||
<w>bafoundation</w>
|
||||
<w>ballistica's</w>
|
||||
<w>ballistica</w>
|
||||
<w>ballistica's</w>
|
||||
<w>ballisticacore</w>
|
||||
<w>ballisticacorecb</w>
|
||||
<w>bamaster</w>
|
||||
@ -815,8 +815,8 @@
|
||||
<w>gamedata</w>
|
||||
<w>gameinstance</w>
|
||||
<w>gamemap</w>
|
||||
<w>gamepad's</w>
|
||||
<w>gamepad</w>
|
||||
<w>gamepad's</w>
|
||||
<w>gamepadadvanced</w>
|
||||
<w>gamepads</w>
|
||||
<w>gamepadselect</w>
|
||||
@ -1207,8 +1207,8 @@
|
||||
<w>lsqlite</w>
|
||||
<w>lssl</w>
|
||||
<w>lstart</w>
|
||||
<w>lstr's</w>
|
||||
<w>lstr</w>
|
||||
<w>lstr's</w>
|
||||
<w>lstrs</w>
|
||||
<w>lsval</w>
|
||||
<w>ltex</w>
|
||||
@ -1847,8 +1847,8 @@
|
||||
<w>sessionname</w>
|
||||
<w>sessionplayer</w>
|
||||
<w>sessionplayers</w>
|
||||
<w>sessionteam's</w>
|
||||
<w>sessionteam</w>
|
||||
<w>sessionteam's</w>
|
||||
<w>sessionteams</w>
|
||||
<w>sessiontype</w>
|
||||
<w>setactivity</w>
|
||||
@ -2184,8 +2184,8 @@
|
||||
<w>txtw</w>
|
||||
<w>typeargs</w>
|
||||
<w>typecheck</w>
|
||||
<w>typechecker's</w>
|
||||
<w>typechecker</w>
|
||||
<w>typechecker's</w>
|
||||
<w>typedval</w>
|
||||
<w>typeshed</w>
|
||||
<w>typestr</w>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<!-- 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,
|
||||
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>
|
||||
|
||||
@ -169,6 +169,7 @@ def test_validate() -> None:
|
||||
dataclass_validate(tclass)
|
||||
|
||||
# No longer valid.
|
||||
# noinspection PyTypeHints
|
||||
tclass.ival = None # type: ignore
|
||||
with pytest.raises(TypeError):
|
||||
dataclass_validate(tclass)
|
||||
|
||||
@ -73,6 +73,7 @@ def test_entity_values() -> None:
|
||||
|
||||
# Simple int field.
|
||||
with pytest.raises(TypeError):
|
||||
# noinspection PyTypeHints
|
||||
ent.ival = 'strval' # type: ignore
|
||||
assert static_type_equals(ent.ival, int)
|
||||
assert isinstance(ent.ival, int)
|
||||
@ -82,6 +83,7 @@ def test_entity_values() -> None:
|
||||
|
||||
# Simple float field.
|
||||
with pytest.raises(TypeError):
|
||||
# noinspection PyTypeHints
|
||||
ent.fval = 'foo' # type: ignore
|
||||
assert static_type_equals(ent.fval, float)
|
||||
ent.fval = 2
|
||||
@ -98,6 +100,7 @@ def test_entity_values() -> None:
|
||||
assert len(ent.slval) == 1
|
||||
assert list(ent.slval) == ['blah']
|
||||
with pytest.raises(TypeError):
|
||||
# noinspection PyTypeHints
|
||||
ent.slval = ['foo', 'bar', 1] # type: ignore
|
||||
|
||||
# Simple value dict field.
|
||||
@ -133,6 +136,7 @@ def test_entity_values_2() -> None:
|
||||
assert static_type_equals(ent.grp.isubval, int)
|
||||
assert isinstance(ent.grp.isubval, int)
|
||||
with pytest.raises(TypeError):
|
||||
# noinspection PyTypeHints
|
||||
ent.grp.isubval = 'blah' # type: ignore
|
||||
|
||||
# Compound value inheritance.
|
||||
@ -166,6 +170,7 @@ def test_entity_values_2() -> None:
|
||||
|
||||
# Enum value
|
||||
with pytest.raises(ValueError):
|
||||
# noinspection PyTypeHints
|
||||
ent.enumval = None # type: ignore
|
||||
assert ent.enumval == EnumTest.FIRST
|
||||
|
||||
@ -231,6 +236,7 @@ def test_field_copies() -> None:
|
||||
# And not if they don't...
|
||||
# (in this case mypy errors too but that may not always be the case)
|
||||
with pytest.raises(ValueError):
|
||||
# noinspection PyTypeHints
|
||||
ent1.compoundlist3 = ent1.compoundlist # type: ignore
|
||||
|
||||
# Copying a CompoundDict
|
||||
@ -249,6 +255,7 @@ def test_field_copies() -> None:
|
||||
# two CompoundValues have the same type but different layouts based
|
||||
# on their __init__ args or whatnot)
|
||||
with pytest.raises(ValueError):
|
||||
# noinspection PyTypeHints
|
||||
ent1.compounddict3 = ent1.compounddict # type: ignore
|
||||
# Make sure invalid key types get caught when setting a full dict:
|
||||
with pytest.raises(TypeError):
|
||||
|
||||
@ -103,6 +103,7 @@ 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]:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user