Modification du typage

This commit is contained in:
Benjamin Drieu 2023-05-09 14:16:01 +02:00 committed by root
parent 0b4241a883
commit 128ff2f481

View File

@ -138,7 +138,7 @@ class Bot:
self.send_raw("JOIN {} \n".format(project.channel)) # Joins channel self.send_raw("JOIN {} \n".format(project.channel)) # Joins channel
self.projects.append(project) self.projects.append(project)
def get_project(self, name: str) -> Project | None: def get_project(self, name: str) -> Project:
for project in self.projects: for project in self.projects:
if name[0] != '#' and project.name == name: if name[0] != '#' and project.name == name:
return project return project