Skip to content

Commit

Permalink
return empty frozenset
Browse files Browse the repository at this point in the history
  • Loading branch information
pstokkink committed Feb 17, 2025
1 parent 1642c50 commit aa3077f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/schematools/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def _find_scope_by_id(self, id):
return scope

@cached_property
def scopes(self) -> frozenset[Scope] | None:
def scopes(self) -> frozenset[Scope]:
try:
scopes = self._resolve_scope(self.get("auth"))
if isinstance(scopes, Scope):
Expand All @@ -447,7 +447,7 @@ def scopes(self) -> frozenset[Scope] | None:
)
return frozenset({self._find_scope_by_id(_PUBLIC_SCOPE)})
except RuntimeError:
return None
return frozenset()

@cached_property
def auth(self) -> frozenset[str]:
Expand Down Expand Up @@ -1151,7 +1151,7 @@ def schema(self) -> DatasetSchema:
return self._parent_schema

@cached_property
def scopes(self) -> frozenset[Scope] | None:
def scopes(self) -> frozenset[Scope]:
try:
scopes = self.schema._resolve_scope(self.get("auth"))
if isinstance(scopes, Scope):
Expand All @@ -1167,7 +1167,7 @@ def scopes(self) -> frozenset[Scope] | None:
)
return frozenset({self.schema._find_scope_by_id(_PUBLIC_SCOPE)})
except RuntimeError:
return None
return frozenset()

@cached_property
def auth(self) -> frozenset[str]:
Expand Down Expand Up @@ -1878,7 +1878,7 @@ def scopes(self) -> frozenset[Scope]:
)
return frozenset({self.schema._find_scope_by_id(_PUBLIC_SCOPE)})
except RuntimeError:
return None
return frozenset()

@cached_property
def auth(self) -> frozenset[str]:
Expand Down

0 comments on commit aa3077f

Please sign in to comment.