python: run isort, add shebangs on all files
This commit is contained in:
parent
e74cb5522a
commit
a6c976b309
15 changed files with 55 additions and 31 deletions
|
@ -0,0 +1 @@
|
|||
#!/usr/bin/env python3
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
#!/usr/bin/env python3
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 = [
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
#####
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!venv/bin/python3
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Obtained with `pip install PyGithub`, better within a venv
|
||||
from github import Github
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
#!/usr/bin/env python3
|
|
@ -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)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import copy
|
||||
|
||||
|
||||
|
|
|
@ -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_")
|
||||
|
|
Loading…
Reference in a new issue