mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2026-08-15 13:03:08 +00:00
[ci] auto-format
This commit is contained in:
parent
9c1ff8b0f2
commit
9b1f5b6a63
1 changed files with 4 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import json
|
||||
import sys
|
||||
|
||||
|
||||
def get_latest_version():
|
||||
"""Get latest version entry from index.json"""
|
||||
with open('index.json', 'r') as file:
|
||||
|
|
@ -8,6 +9,7 @@ def get_latest_version():
|
|||
latest_version = list(content["versions"].keys())[0]
|
||||
return latest_version
|
||||
|
||||
|
||||
def get_latest_api():
|
||||
"""Get latest api entry from index.json"""
|
||||
with open('index.json', 'r') as file:
|
||||
|
|
@ -15,8 +17,9 @@ def get_latest_api():
|
|||
latest_api = content["versions"][get_latest_version()]["api_version"]
|
||||
return latest_api
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 2:
|
||||
print(f"Usage: python3 {__file__.split('/')[-1]} function")
|
||||
sys.exit(1)
|
||||
print(globals()[sys.argv[1]]()) # used to call the fucntion passed as cli parameter
|
||||
print(globals()[sys.argv[1]]()) # used to call the fucntion passed as cli parameter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue