ci: Try to fix mypy

This commit is contained in:
Alexandre Aubin 2021-11-28 16:24:13 +01:00
parent bfa5092c10
commit d831ccef4c
10 changed files with 21 additions and 11 deletions

View file

@ -3,6 +3,7 @@
import os
import json
import subprocess
from typing import List
from moulinette.utils import log
from moulinette.utils.process import check_output
@ -17,7 +18,7 @@ class MyDiagnoser(Diagnoser):
id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1]
cache_duration = 600
dependencies = []
dependencies: List[str] = []
def run(self):

View file

@ -3,6 +3,7 @@
import re
import os
import random
from typing import List
from moulinette.utils import log
from moulinette.utils.network import download_text
@ -19,7 +20,7 @@ class MyDiagnoser(Diagnoser):
id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1]
cache_duration = 600
dependencies = []
dependencies: List[str] = []
def run(self):

View file

@ -2,7 +2,7 @@
import os
import re
from typing import List
from datetime import datetime, timedelta
from publicsuffix2 import PublicSuffixList
@ -21,11 +21,12 @@ from yunohost.dns import _build_dns_conf, _get_dns_zone_for_domain
logger = log.getActionLogger("yunohost.diagnosis")
class MyDiagnoser(Diagnoser):
id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1]
cache_duration = 600
dependencies = ["ip"]
dependencies: List[str] = ["ip"]
def run(self):

View file

@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
from typing import List
from yunohost.diagnosis import Diagnoser
from yunohost.service import _get_services
@ -10,7 +11,7 @@ class MyDiagnoser(Diagnoser):
id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1]
cache_duration = 600
dependencies = ["ip"]
dependencies: List[str] = ["ip"]
def run(self):

View file

@ -3,6 +3,7 @@
import os
import random
import requests
from typing import List
from moulinette.utils.filesystem import read_file
@ -17,7 +18,7 @@ class MyDiagnoser(Diagnoser):
id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1]
cache_duration = 600
dependencies = ["ip"]
dependencies: List[str] = ["ip"]
def run(self):

View file

@ -3,6 +3,7 @@
import os
import dns.resolver
import re
from typing import List
from subprocess import CalledProcessError
@ -24,7 +25,7 @@ class MyDiagnoser(Diagnoser):
id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1]
cache_duration = 600
dependencies = ["ip"]
dependencies: List[str] = ["ip"]
def run(self):

View file

@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
from typing import List
from yunohost.diagnosis import Diagnoser
from yunohost.service import service_status
@ -10,7 +11,7 @@ class MyDiagnoser(Diagnoser):
id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1]
cache_duration = 300
dependencies = []
dependencies: List[str] = []
def run(self):

View file

@ -3,6 +3,7 @@ import os
import psutil
import datetime
import re
from typing import List
from moulinette.utils.process import check_output
@ -13,7 +14,7 @@ class MyDiagnoser(Diagnoser):
id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1]
cache_duration = 300
dependencies = []
dependencies: List[str] = []
def run(self):

View file

@ -2,6 +2,7 @@
import os
import re
from typing import List
from yunohost.settings import settings_get
from yunohost.diagnosis import Diagnoser
@ -13,7 +14,7 @@ class MyDiagnoser(Diagnoser):
id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1]
cache_duration = 300
dependencies = []
dependencies: List[str] = []
def run(self):

View file

@ -1,6 +1,7 @@
#!/usr/bin/env python
import os
from typing import List
from yunohost.app import app_list
@ -11,7 +12,7 @@ class MyDiagnoser(Diagnoser):
id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1]
cache_duration = 300
dependencies = []
dependencies: List[str] = []
def run(self):