Replace pronouns in bio
This commit is contained in:
parent
1cf0531b30
commit
ccc029e668
1 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
import re
|
||||||
|
|
||||||
|
PRONOUN_REPLACE_REGEX = re.compile(r"\[S*\]")
|
||||||
|
|
||||||
|
|
||||||
class PronounUpdate:
|
class PronounUpdate:
|
||||||
pronouns: str
|
pronouns: str
|
||||||
|
|
||||||
|
@ -5,4 +10,4 @@ class PronounUpdate:
|
||||||
self.pronouns = pronouns
|
self.pronouns = pronouns
|
||||||
|
|
||||||
def replace_pronouns_in_bio(self, bio: str) -> str:
|
def replace_pronouns_in_bio(self, bio: str) -> str:
|
||||||
return self.pronouns
|
return PRONOUN_REPLACE_REGEX.sub(bio, f"[{self.pronouns}]")
|
||||||
|
|
Loading…
Reference in a new issue