1
0
Fork 0

python: run isort, add shebangs on all files

This commit is contained in:
Félix Piédallu 2024-02-07 14:49:55 +01:00
parent e74cb5522a
commit a6c976b309
15 changed files with 55 additions and 31 deletions

View file

@ -0,0 +1 @@
#!/usr/bin/env python3

View file

@ -2,12 +2,13 @@
import argparse
import json
import toml
import os
from pathlib import Path
import toml
from jinja2 import Environment, FileSystemLoader
def value_for_lang(values, lang):
if not isinstance(values, dict):
return values

View file

@ -1,15 +1,16 @@
import os
import hmac
import shlex
import hashlib
#!/usr/bin/env python3
import asyncio
import hashlib
import hmac
import os
import shlex
import tempfile
from make_readme import generate_READMEs
from sanic import Sanic, response
from sanic.response import text
from make_readme import generate_READMEs
app = Sanic(__name__)
github_webhook_secret = open("github_webhook_secret", "r").read().strip()

View file

@ -0,0 +1 @@
#!/usr/bin/env python3

View file

@ -1,9 +1,11 @@
#!/usr/bin/python3
import json
import sys
import requests
import os
import subprocess
import sys
import requests
catalog = requests.get("https://raw.githubusercontent.com/YunoHost/apps/master/apps.json").json()

View file

@ -1,7 +1,8 @@
#!/usr/bin/python3
import json
import csv
import json
def find_cpe(app_id):
with open("../../patches/add-cpe/cpe.csv", newline='') as f:

View file

@ -1,13 +1,15 @@
import time
#!/usr/bin/env python3
import glob
import hashlib
import os
import re
import sys
import requests
import toml
import os
import glob
import time
from datetime import datetime
import requests
import toml
from rest_api import GithubAPI, GitlabAPI, RefType
STRATEGIES = [

View file

@ -1,8 +1,11 @@
from enum import Enum
#!/usr/bin/env python3
import re
import requests
from enum import Enum
from typing import List
import requests
class RefType(Enum):
tags = 1

View file

@ -1,14 +1,17 @@
#!venv/bin/python3
#!/usr/bin/env python3
import sys, os, time
import urllib.request, json
import json
import os
import re
import sys
import time
import urllib.request
from github import Github
import github
from github import Github
# Debug
from rich.traceback import install
install(width=150, show_locals=True, locals_max_length=None, locals_max_string=None)
#####

View file

@ -1,4 +1,4 @@
#!venv/bin/python3
#!/usr/bin/env python3
# Obtained with `pip install PyGithub`, better within a venv
from github import Github

View file

@ -2,10 +2,10 @@
import json
import sys
from difflib import SequenceMatcher
from functools import cache
from pathlib import Path
from typing import Any, Dict, Generator, List, Tuple
from difflib import SequenceMatcher
import jsonschema
import toml

View file

@ -0,0 +1 @@
#!/usr/bin/env python3

View file

@ -1,7 +1,9 @@
#!/usr/bin/env python3
import argparse
import json
import os
import re
import json
import subprocess
from glob import glob
@ -226,7 +228,8 @@ def _convert_v1_manifest_to_v2(app_path):
def _dump_v2_manifest_as_toml(manifest):
import re
from tomlkit import document, nl, table, dumps, comment
from tomlkit import comment, document, dumps, nl, table
toml_manifest = document()
toml_manifest.add("packaging_format", 2)

View file

@ -1,3 +1,5 @@
#!/usr/bin/env python3
import copy

View file

@ -1,12 +1,15 @@
import time
import toml
import requests
import tempfile
#!/usr/bin/env python3
import json
import os
import sys
import json
import tempfile
import time
from collections import OrderedDict
import requests
import toml
token = open(os.path.dirname(__file__) + "/../../.github_token").read().strip()
tmpdir = tempfile.mkdtemp(prefix="update_app_levels_")