From 33e4e428376a35689b3188901df5b9f55f85e064 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Mon, 22 Feb 2021 09:03:21 -0600 Subject: [PATCH] lint fixes and tidying --- assets/src/ba_data/python/bastd/ui/coop/browser.py | 7 +++---- docs/ba_module.md | 2 +- tools/batools/build.py | 6 +++--- tools/efro/util.py | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/assets/src/ba_data/python/bastd/ui/coop/browser.py b/assets/src/ba_data/python/bastd/ui/coop/browser.py index 43ba6458..c8d0eee5 100644 --- a/assets/src/ba_data/python/bastd/ui/coop/browser.py +++ b/assets/src/ba_data/python/bastd/ui/coop/browser.py @@ -253,10 +253,9 @@ class CoopBrowserWindow(ba.Window): # starting point. if (app.accounts.account_tournament_list is not None and app.accounts.account_tournament_list[0] - == _ba.get_account_state_num() and all([ - t_id in app.accounts.tournament_info - for t_id in app.accounts.account_tournament_list[1] - ])): + == _ba.get_account_state_num() + and all(t_id in app.accounts.tournament_info + for t_id in app.accounts.account_tournament_list[1])): tourney_data = [ app.accounts.tournament_info[t_id] for t_id in app.accounts.account_tournament_list[1] diff --git a/docs/ba_module.md b/docs/ba_module.md index 5964a1da..a3edcf44 100644 --- a/docs/ba_module.md +++ b/docs/ba_module.md @@ -1,5 +1,5 @@ -

last updated on 2021-02-15 for Ballistica version 1.6.0 build 20279

+

last updated on 2021-02-22 for Ballistica version 1.6.0 build 20280

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 let me know. Happy modding!


diff --git a/tools/batools/build.py b/tools/batools/build.py index ac437641..2be1274d 100644 --- a/tools/batools/build.py +++ b/tools/batools/build.py @@ -29,11 +29,11 @@ class PipRequirement: PIP_REQUIREMENTS = [ - PipRequirement(modulename='pylint', minversion=[2, 6, 0]), - PipRequirement(modulename='mypy', minversion=[0, 800]), + PipRequirement(modulename='pylint', minversion=[2, 7, 0]), + PipRequirement(modulename='mypy', minversion=[0, 812]), PipRequirement(modulename='yapf', minversion=[0, 30, 0]), PipRequirement(modulename='cpplint', minversion=[1, 5, 4]), - PipRequirement(modulename='pytest', minversion=[6, 2, 1]), + PipRequirement(modulename='pytest', minversion=[6, 2, 2]), PipRequirement(modulename='typing_extensions'), PipRequirement(modulename='pytz'), PipRequirement(modulename='ansiwrap'), diff --git a/tools/efro/util.py b/tools/efro/util.py index d4bf0440..c149ffe0 100644 --- a/tools/efro/util.py +++ b/tools/efro/util.py @@ -384,7 +384,7 @@ def make_hash(obj: Any) -> int: import copy if isinstance(obj, (set, tuple, list)): - return hash(tuple([make_hash(e) for e in obj])) + return hash(tuple(make_hash(e) for e in obj)) if not isinstance(obj, dict): return hash(obj)