lint: tidy up code some more, pylint is enforcing
This commit is contained in:
parent
66b3ccc0f0
commit
61564e8c01
17 changed files with 72 additions and 38 deletions
|
@ -1,6 +1,5 @@
|
|||
from typing import Optional, List
|
||||
|
||||
from flask import current_app
|
||||
from tldextract import extract
|
||||
|
||||
from app.brm.brn import BRN
|
||||
|
@ -20,8 +19,14 @@ class Origin(AbstractConfiguration):
|
|||
proxies = db.relationship("Proxy", back_populates="origin")
|
||||
|
||||
@property
|
||||
def brn(self) -> str:
|
||||
return f"brn:{current_app.config['GLOBAL_NAMESPACE']}:{self.group_id}:mirror:conf:origin/{self.domain_name}"
|
||||
def brn(self) -> BRN:
|
||||
return BRN(
|
||||
group_id=self.group_id,
|
||||
product="mirror",
|
||||
provider="conf",
|
||||
resource_type="origin",
|
||||
resource_id="self.domain_name"
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def csv_header(cls) -> List[str]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue