1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00

Apply suggestions of mypy

This commit is contained in:
Dipl. Ing. Péter Varkoly 2024-09-11 09:13:26 +02:00
parent d75b071fec
commit e05fbeb950
4 changed files with 8 additions and 6 deletions

View file

@ -57,6 +57,8 @@ def intersect(a: str, b: str) -> str:
class BaseRights:
_user_groups: set[str] = set([])
def __init__(self, configuration: "config.Configuration") -> None:
"""Initialize BaseRights.

View file

@ -71,7 +71,7 @@ class Rights(rights.BaseRights):
collection_pattern = rights_config.get(section, "collection")
allowed_groups = rights_config.get(section, "groups", fallback="").split(",")
try:
group_match = self._user_groups.intersection(allowed_groups) > 0
group_match = len(self._user_groups.intersection(allowed_groups)) > 0
except Exception:
pass
# Use empty format() for harmonized handling of curly braces