mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 01:53:57 +08:00
* Convert all text strings to f-strings
Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.
Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.
F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale
* revert pyextra changes
* revert ublox.py
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 55390d273f
22 lines
503 B
Python
Executable File
22 lines
503 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import requests
|
|
from common.params import Params
|
|
import sys
|
|
|
|
|
|
if __name__ == "__main__":
|
|
if len(sys.argv) < 2:
|
|
print(f"{sys.argv[0]} <github username>")
|
|
exit(1)
|
|
|
|
username = sys.argv[1]
|
|
keys = requests.get(f"https://github.com/{username}.keys")
|
|
|
|
if keys.status_code == 200:
|
|
Params().put("GithubSshKeys", keys.text)
|
|
Params().put("GithubUsername", username)
|
|
print("Setup ssh keys successfully")
|
|
else:
|
|
print("Error getting public keys from github")
|