fix: strict optional errors (#1759)

* fix strict optional errors

* fix typing in repository

* fix backup db files location

* update workspace settings
This commit is contained in:
Hayden
2022-10-23 13:04:04 -08:00
committed by GitHub
parent 97d9e2a109
commit 84c23765cd
31 changed files with 253 additions and 139 deletions

View File

@@ -3,6 +3,17 @@ from sqlite3 import IntegrityError
from mealie.lang.providers import Translator
class UnexpectedNone(Exception):
"""Exception raised when a value is None when it should not be."""
def __init__(self, message: str = "Unexpected None Value"):
self.message = message
super().__init__(self.message)
def __str__(self):
return f"{self.message}"
class PermissionDenied(Exception):
"""
This exception is raised when a user tries to access a resource that they do not have permission to access.