(self)
| 141 | ] |
| 142 | |
| 143 | def generate(self) -> str: |
| 144 | password_list = [] |
| 145 | for count, chars in self.category_map: |
| 146 | password_list.extend(choice(chars) for i in range(count)) |
| 147 | shuffle(password_list) |
| 148 | return ''.join(password_list) |
| 149 | |
| 150 | @classmethod |
| 151 | def create_from_rules(cls, rule_string: str, length: Optional[int] = None, |
no outgoing calls