mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-08 08:45:43 +08:00
Tidying
This commit is contained in:
parent
58766a8f6e
commit
8fd97b1ee9
6
.idea/dictionaries/ericf.xml
generated
6
.idea/dictionaries/ericf.xml
generated
@ -41,6 +41,7 @@
|
|||||||
<w>adbcfaca</w>
|
<w>adbcfaca</w>
|
||||||
<w>adbpath</w>
|
<w>adbpath</w>
|
||||||
<w>addgame</w>
|
<w>addgame</w>
|
||||||
|
<w>addlevel</w>
|
||||||
<w>addr</w>
|
<w>addr</w>
|
||||||
<w>addrstr</w>
|
<w>addrstr</w>
|
||||||
<w>adisp</w>
|
<w>adisp</w>
|
||||||
@ -344,6 +345,7 @@
|
|||||||
<w>compounddict</w>
|
<w>compounddict</w>
|
||||||
<w>compoundlist</w>
|
<w>compoundlist</w>
|
||||||
<w>conditionalize</w>
|
<w>conditionalize</w>
|
||||||
|
<w>configdict</w>
|
||||||
<w>configerror</w>
|
<w>configerror</w>
|
||||||
<w>confighash</w>
|
<w>confighash</w>
|
||||||
<w>configkey</w>
|
<w>configkey</w>
|
||||||
@ -619,6 +621,7 @@
|
|||||||
<w>fdict</w>
|
<w>fdict</w>
|
||||||
<w>fecfc</w>
|
<w>fecfc</w>
|
||||||
<w>feedparser</w>
|
<w>feedparser</w>
|
||||||
|
<w>ffaeff</w>
|
||||||
<w>ffap</w>
|
<w>ffap</w>
|
||||||
<w>fhash</w>
|
<w>fhash</w>
|
||||||
<w>fhashes</w>
|
<w>fhashes</w>
|
||||||
@ -761,6 +764,7 @@
|
|||||||
<w>genutils</w>
|
<w>genutils</w>
|
||||||
<w>getaccountid</w>
|
<w>getaccountid</w>
|
||||||
<w>getactivity</w>
|
<w>getactivity</w>
|
||||||
|
<w>getcampaign</w>
|
||||||
<w>getclass</w>
|
<w>getclass</w>
|
||||||
<w>getcollide</w>
|
<w>getcollide</w>
|
||||||
<w>getcollidemodel</w>
|
<w>getcollidemodel</w>
|
||||||
@ -772,7 +776,9 @@
|
|||||||
<w>getdata</w>
|
<w>getdata</w>
|
||||||
<w>getinputdevice</w>
|
<w>getinputdevice</w>
|
||||||
<w>getkillerplayer</w>
|
<w>getkillerplayer</w>
|
||||||
|
<w>getlevel</w>
|
||||||
<w>getlevelname</w>
|
<w>getlevelname</w>
|
||||||
|
<w>getlevels</w>
|
||||||
<w>getlog</w>
|
<w>getlog</w>
|
||||||
<w>getmaps</w>
|
<w>getmaps</w>
|
||||||
<w>getmodel</w>
|
<w>getmodel</w>
|
||||||
|
|||||||
@ -159,6 +159,7 @@ def test_assign() -> None:
|
|||||||
dataclass_assign(tclass, {'lfval': [1]})
|
dataclass_assign(tclass, {'lfval': [1]})
|
||||||
|
|
||||||
|
|
||||||
|
# noinspection PyTypeHints
|
||||||
def test_validate() -> None:
|
def test_validate() -> None:
|
||||||
"""Testing validation."""
|
"""Testing validation."""
|
||||||
|
|
||||||
|
|||||||
@ -80,6 +80,7 @@ class EntityTest(entity.Entity):
|
|||||||
fval2 = entity.Field('f2', entity.Float3Value())
|
fval2 = entity.Field('f2', entity.Float3Value())
|
||||||
|
|
||||||
|
|
||||||
|
# noinspection PyTypeHints
|
||||||
def test_entity_values() -> None:
|
def test_entity_values() -> None:
|
||||||
"""Test various entity assigns for value and type correctness."""
|
"""Test various entity assigns for value and type correctness."""
|
||||||
ent = EntityTest()
|
ent = EntityTest()
|
||||||
@ -133,6 +134,7 @@ def test_entity_values() -> None:
|
|||||||
assert dict(ent.str_int_dict.items()) == {'foo': 123}
|
assert dict(ent.str_int_dict.items()) == {'foo': 123}
|
||||||
|
|
||||||
|
|
||||||
|
# noinspection PyTypeHints
|
||||||
def test_entity_values_2() -> None:
|
def test_entity_values_2() -> None:
|
||||||
"""Test various entity assigns for value and type correctness."""
|
"""Test various entity assigns for value and type correctness."""
|
||||||
|
|
||||||
@ -189,6 +191,7 @@ def test_entity_values_2() -> None:
|
|||||||
assert static_type_equals(ent.grp.compoundlist[0].subval, bool)
|
assert static_type_equals(ent.grp.compoundlist[0].subval, bool)
|
||||||
|
|
||||||
|
|
||||||
|
# noinspection PyTypeHints
|
||||||
def test_field_copies() -> None:
|
def test_field_copies() -> None:
|
||||||
"""Test copying various values between fields."""
|
"""Test copying various values between fields."""
|
||||||
ent1 = EntityTest()
|
ent1 = EntityTest()
|
||||||
|
|||||||
@ -121,6 +121,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]:
|
||||||
|
|||||||
@ -53,6 +53,7 @@ def utc_now() -> datetime.datetime:
|
|||||||
return datetime.datetime.now(datetime.timezone.utc)
|
return datetime.datetime.now(datetime.timezone.utc)
|
||||||
|
|
||||||
|
|
||||||
|
# noinspection PyUnresolvedReferences
|
||||||
def empty_weakref(objtype: Type[T]) -> ReferenceType[T]:
|
def empty_weakref(objtype: Type[T]) -> ReferenceType[T]:
|
||||||
"""Return an invalidated weak-reference for the specified type."""
|
"""Return an invalidated weak-reference for the specified type."""
|
||||||
# At runtime, all weakrefs are the same; our type arg is just
|
# At runtime, all weakrefs are the same; our type arg is just
|
||||||
@ -99,7 +100,7 @@ class DispatchMethodWrapper(Generic[TARG, TRET]):
|
|||||||
registry: Dict[Any, Callable]
|
registry: Dict[Any, Callable]
|
||||||
|
|
||||||
|
|
||||||
# noinspection PyProtectedMember
|
# noinspection PyProtectedMember,PyTypeHints
|
||||||
def dispatchmethod(
|
def dispatchmethod(
|
||||||
func: Callable[[Any, TARG],
|
func: Callable[[Any, TARG],
|
||||||
TRET]) -> DispatchMethodWrapper[TARG, TRET]:
|
TRET]) -> DispatchMethodWrapper[TARG, TRET]:
|
||||||
|
|||||||
@ -47,8 +47,11 @@ def build_apple(arch: str, debug: bool = False) -> None:
|
|||||||
os.chdir(builddir)
|
os.chdir(builddir)
|
||||||
|
|
||||||
# TEMP: Check out a particular commit while the branch head is broken.
|
# TEMP: Check out a particular commit while the branch head is broken.
|
||||||
# efrotools.run('git checkout 1a9c71dca298c03517e8236b81cf1d9c8c521cbf')
|
# We can actually fix this to use the current one, but something
|
||||||
efrotools.run(f'git checkout {PYTHON_VERSION_MAJOR}')
|
# broke in the underlying build even on old commits so keeping it
|
||||||
|
# locked for now...
|
||||||
|
efrotools.run('git checkout bf1ed73d0d5ff46862ba69dd5eb2ffaeff6f19b6')
|
||||||
|
# efrotools.run(f'git checkout {PYTHON_VERSION_MAJOR}')
|
||||||
|
|
||||||
# On mac we currently have to add the _scproxy module or urllib will
|
# On mac we currently have to add the _scproxy module or urllib will
|
||||||
# fail.
|
# fail.
|
||||||
@ -152,7 +155,7 @@ def build_apple(arch: str, debug: bool = False) -> None:
|
|||||||
# Turn doc strings on; looks like it only adds a few hundred k.
|
# Turn doc strings on; looks like it only adds a few hundred k.
|
||||||
txt = txt.replace('--without-doc-strings', '--with-doc-strings')
|
txt = txt.replace('--without-doc-strings', '--with-doc-strings')
|
||||||
|
|
||||||
# We're currently aiming at 10.13+ on mac
|
# Set mac/ios version reqs
|
||||||
# (see issue with utimensat and futimens).
|
# (see issue with utimensat and futimens).
|
||||||
txt = efrotools.replace_one(txt, 'MACOSX_DEPLOYMENT_TARGET=10.8',
|
txt = efrotools.replace_one(txt, 'MACOSX_DEPLOYMENT_TARGET=10.8',
|
||||||
'MACOSX_DEPLOYMENT_TARGET=10.13')
|
'MACOSX_DEPLOYMENT_TARGET=10.13')
|
||||||
@ -178,7 +181,7 @@ def build_apple(arch: str, debug: bool = False) -> None:
|
|||||||
dline = 'python$(PYTHON_VER)m'
|
dline = 'python$(PYTHON_VER)m'
|
||||||
splitlen = len(txt.split(dline))
|
splitlen = len(txt.split(dline))
|
||||||
if splitlen != 14:
|
if splitlen != 14:
|
||||||
raise Exception('unexpected configure lines')
|
raise RuntimeError(f'Unexpected configure line count {splitlen}.')
|
||||||
txt = txt.replace(dline, 'python$(PYTHON_VER)dm')
|
txt = txt.replace(dline, 'python$(PYTHON_VER)dm')
|
||||||
|
|
||||||
efrotools.writefile('Makefile', txt)
|
efrotools.writefile('Makefile', txt)
|
||||||
@ -282,7 +285,7 @@ def build_android(rootdir: str, arch: str, debug: bool = False) -> None:
|
|||||||
efrotools.writefile('pybuild/packages/python.py', ftxt)
|
efrotools.writefile('pybuild/packages/python.py', ftxt)
|
||||||
|
|
||||||
# Set this to a particular cpython commit to target exact releases from git
|
# Set this to a particular cpython commit to target exact releases from git
|
||||||
commit = '43364a7ae01fbe4288ef42622259a0038ce1edcc' # 3.7.6 release
|
commit = 'd7c567b08f9d7d6aef21b881340a2b72731129db' # 3.7.7 release
|
||||||
|
|
||||||
if commit is not None:
|
if commit is not None:
|
||||||
ftxt = efrotools.readfile('pybuild/source.py')
|
ftxt = efrotools.readfile('pybuild/source.py')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user