Replace pronouns in bio

This commit is contained in:
bad 2022-06-05 18:39:22 +02:00
parent 1cf0531b30
commit ccc029e668
1 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
import re
PRONOUN_REPLACE_REGEX = re.compile(r"\[S*\]")
class PronounUpdate:
pronouns: str
@ -5,4 +10,4 @@ class PronounUpdate:
self.pronouns = pronouns
def replace_pronouns_in_bio(self, bio: str) -> str:
return self.pronouns
return PRONOUN_REPLACE_REGEX.sub(bio, f"[{self.pronouns}]")