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
|
@ -24,7 +24,7 @@ class AbstractConfiguration(db.Model): # type: ignore
|
|||
|
||||
@property
|
||||
@abstractmethod
|
||||
def brn(self) -> str:
|
||||
def brn(self) -> BRN:
|
||||
raise NotImplementedError()
|
||||
|
||||
def destroy(self) -> None:
|
||||
|
@ -80,12 +80,12 @@ class AbstractResource(db.Model): # type: ignore
|
|||
|
||||
def deprecate(self, *, reason: str) -> None:
|
||||
if self.deprecated is not None:
|
||||
logging.info("Deprecating %s (reason=%s)", (self.brn, reason))
|
||||
logging.info("Deprecating %s (reason=%s)", self.brn, reason)
|
||||
self.deprecated = datetime.utcnow()
|
||||
self.deprecation_reason = reason
|
||||
self.updated = datetime.utcnow()
|
||||
else:
|
||||
logging.info("Not deprecating %s (reason=%s) because it's already deprecated", (self.brn, reason))
|
||||
logging.info("Not deprecating %s (reason=%s) because it's already deprecated", self.brn, reason)
|
||||
|
||||
def destroy(self) -> None:
|
||||
if self.deprecated is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue