mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 18:01:36 +00:00
Pre-commit (#1467)
* pre-commit run trailing-whitespace -a * pre-commit run end-of-file-fixer -a * pre-commit run double-quote-string-fixer -a * pre-commit run requirements-txt-fixer -a * add pyupgrade hook * remove pre-commit default_language_version 3.7 (since no upwards incompatible hooks)
This commit is contained in:
@@ -211,7 +211,7 @@ def update():
|
||||
browser.update(body)
|
||||
result = gapi.call(cbcm.chromebrowsers(), 'update', deviceId=device_id,
|
||||
customer=customer_id, body=browser,
|
||||
projection='BASIC', fields="deviceId")
|
||||
projection='BASIC', fields='deviceId')
|
||||
print(f'Updated browser {result["deviceId"]}')
|
||||
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ def print_members():
|
||||
todrive = True
|
||||
i += 1
|
||||
else:
|
||||
controlflow.invalid_argument_exit(myarg, "gam print chatmembers")
|
||||
controlflow.invalid_argument_exit(myarg, 'gam print chatmembers')
|
||||
if not space:
|
||||
controlflow.system_error_exit(2,
|
||||
'space <ChatSpace> is required.')
|
||||
@@ -117,7 +117,7 @@ def create_message():
|
||||
body['thread'] = {'name': sys.argv[i+1]}
|
||||
i += 2
|
||||
else:
|
||||
controlflow.invalid_argument_exit(myarg, "gam create chat")
|
||||
controlflow.invalid_argument_exit(myarg, 'gam create chat')
|
||||
if not space:
|
||||
controlflow.system_error_exit(2,
|
||||
'space <ChatSpace> is required.')
|
||||
@@ -151,7 +151,7 @@ def delete_message():
|
||||
name = sys.argv[i+1]
|
||||
i += 2
|
||||
else:
|
||||
controlflow.invalid_argument_exit(myarg, "gam delete chat")
|
||||
controlflow.invalid_argument_exit(myarg, 'gam delete chat')
|
||||
if not name:
|
||||
controlflow.system_error_exit(2,
|
||||
'name <String> is required.')
|
||||
@@ -182,7 +182,7 @@ def update_message():
|
||||
name = sys.argv[i+1]
|
||||
i += 2
|
||||
else:
|
||||
controlflow.invalid_argument_exit(myarg, "gam update chat")
|
||||
controlflow.invalid_argument_exit(myarg, 'gam update chat')
|
||||
if not name:
|
||||
controlflow.system_error_exit(2,
|
||||
'name <String> is required.')
|
||||
|
||||
@@ -203,7 +203,7 @@ def printHistory():
|
||||
if 'channel' in citem:
|
||||
citem['channel'] = citem['channel'].lower()
|
||||
else:
|
||||
channel_match = re.search(r"\/channels\/([^/]*)", citem['name'])
|
||||
channel_match = re.search(r'\/channels\/([^/]*)', citem['name'])
|
||||
if channel_match:
|
||||
try:
|
||||
citem['channel'] = channel_match.group(1)
|
||||
@@ -212,7 +212,7 @@ def printHistory():
|
||||
if 'platform' in citem:
|
||||
citem['platform'] = citem['platform'].lower()
|
||||
else:
|
||||
platform_match = re.search(r"\/platforms\/([^/]*)", citem['name'])
|
||||
platform_match = re.search(r'\/platforms\/([^/]*)', citem['name'])
|
||||
if platform_match:
|
||||
try:
|
||||
citem['platform'] = platform_match.group(1)
|
||||
|
||||
Reference in New Issue
Block a user