(self)
| 207 | ) |
| 208 | |
| 209 | def did_mount(self): |
| 210 | if self.ttf_font_regex.match(self.font): |
| 211 | max_retries = 3 |
| 212 | retry_count = 0 |
| 213 | |
| 214 | while retry_count < max_retries: |
| 215 | try: |
| 216 | self.page.fonts.update({"custom_font": self.font}) |
| 217 | self.font = "custom_font" |
| 218 | self.code_textfield.text_style.font_family = self.font |
| 219 | self.code_textfield.update() |
| 220 | self.page.update() |
| 221 | break |
| 222 | except Exception as e: |
| 223 | retry_count += 1 |
| 224 | print(f"Attempt {retry_count} failed: {e}") |
| 225 | if retry_count == max_retries: |
| 226 | print("Max retries reached. Operation failed.") |
| 227 | |
| 228 | def apply_syntax_highlighting(self, text, language): |
| 229 | rules = self.syntax_rules.get(language, {}) |
nothing calls this directly
no outgoing calls
no test coverage detected