From d22b62ef91b49ebfd96eb86b67323608b0adc839 Mon Sep 17 00:00:00 2001
From: Julian Rother <julian@cccv.de>
Date: Thu, 9 Dec 2021 02:23:59 +0100
Subject: [PATCH] Workaround for linter bug

Pylint non-deterministicly fails to detect that a method is overwritten later
and complains that the method does not exist. This is pretty annoying and
remains unfixed in the most recent version.
---
 uffd/user/models.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/uffd/user/models.py b/uffd/user/models.py
index ea54d7c2..51e6793e 100644
--- a/uffd/user/models.py
+++ b/uffd/user/models.py
@@ -152,6 +152,10 @@ class User(db.Model):
 		self.mail = value
 		return True
 
+	# Somehow pylint non-deterministically fails to detect that .update_groups is set in invite.modes
+	def update_groups(self):
+		pass
+
 def get_next_unix_gid():
 	next_gid = max(current_app.config['GROUP_MIN_GID'],
 	               db.session.query(func.max(Group.unix_gid + 1)).scalar() or 0)
-- 
GitLab