Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
stickerpicker
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneurs
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
salixor
stickerpicker
Validations
3ef92d58
Valider
3ef92d58
rédigé
Il y a 4 ans
par
Tulir Asokan
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Remove the other usage of asyncio.run
parent
bddb5608
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
import.py
+3
-2
3 ajouts, 2 suppressions
import.py
avec
3 ajouts
et
2 suppressions
import.py
+
3
−
2
Voir le fichier @
3ef92d58
...
@@ -30,6 +30,7 @@ parser.add_argument("--output-dir", help="Directory to write packs to", default=
...
@@ -30,6 +30,7 @@ parser.add_argument("--output-dir", help="Directory to write packs to", default=
type
=
str
)
type
=
str
)
parser
.
add_argument
(
"
pack
"
,
help
=
"
Sticker pack URLs to import
"
,
action
=
"
append
"
,
nargs
=
"
*
"
)
parser
.
add_argument
(
"
pack
"
,
help
=
"
Sticker pack URLs to import
"
,
action
=
"
append
"
,
nargs
=
"
*
"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
loop
=
asyncio
.
get_event_loop
()
async
def
whoami
(
url
:
URL
,
access_token
:
str
)
->
str
:
async
def
whoami
(
url
:
URL
,
access_token
:
str
)
->
str
:
...
@@ -51,7 +52,7 @@ except FileNotFoundError:
...
@@ -51,7 +52,7 @@ except FileNotFoundError:
homeserver_url
=
input
(
"
Homeserver URL:
"
)
homeserver_url
=
input
(
"
Homeserver URL:
"
)
access_token
=
input
(
"
Access token:
"
)
access_token
=
input
(
"
Access token:
"
)
whoami_url
=
URL
(
homeserver_url
)
/
"
_matrix
"
/
"
client
"
/
"
r0
"
/
"
account
"
/
"
whoami
"
whoami_url
=
URL
(
homeserver_url
)
/
"
_matrix
"
/
"
client
"
/
"
r0
"
/
"
account
"
/
"
whoami
"
user_id
=
asyncio
.
run
(
whoami
(
whoami_url
,
access_token
))
user_id
=
loop
.
run_until_complete
(
whoami
(
whoami_url
,
access_token
))
with
open
(
args
.
config
,
"
w
"
)
as
config_file
:
with
open
(
args
.
config
,
"
w
"
)
as
config_file
:
json
.
dump
({
json
.
dump
({
"
homeserver
"
:
homeserver_url
,
"
homeserver
"
:
homeserver_url
,
...
@@ -255,4 +256,4 @@ async def main():
...
@@ -255,4 +256,4 @@ async def main():
await
client
.
disconnect
()
await
client
.
disconnect
()
asyncio
.
get_event_
loop
()
.
run_until_complete
(
main
())
loop
.
run_until_complete
(
main
())
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter