auto/terraform: typing hints for base terraform module
This commit is contained in:
parent
ccf0ce6a06
commit
51f580a304
4 changed files with 35 additions and 16 deletions
|
@ -3,6 +3,7 @@ import datetime
|
|||
import math
|
||||
import string
|
||||
import random
|
||||
from typing import Dict
|
||||
|
||||
from sqlalchemy import text
|
||||
from tldextract import tldextract
|
||||
|
@ -17,7 +18,7 @@ from app.terraform.terraform import TerraformAutomation
|
|||
class ProxyAutomation(TerraformAutomation):
|
||||
subgroup_max = math.inf
|
||||
|
||||
def get_subgroups(self):
|
||||
def get_subgroups(self) -> Dict[int, Dict[int, int]]:
|
||||
conn = db.engine.connect()
|
||||
result = conn.execute(text("""
|
||||
SELECT origin.group_id, proxy.psg, COUNT(proxy.id) FROM proxy, origin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue