mirror of
				https://github.com/Textualize/textual.git
				synced 2025-10-17 02:38:12 +03:00 
			
		
		
		
	Hide some members from the public docs. (#3080)
* Hide some members from the public docs. See relevant issue: #3076. Some methods need to be implemented to make the widget work but the user doesn't really care about them. For that matter, we can hide them from the public documentation. * Use private handler to hide from docs. Related comments: https://github.com/Textualize/textual/pull/3080#issuecomment-1671129733
This commit is contained in:
		 Rodrigo Girão Serrão
					Rodrigo Girão Serrão
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							54ba3578a6
						
					
				
				
					commit
					fbe1c416a4
				
			| @@ -1 +1,5 @@ | ||||
| ::: textual.widget | ||||
|     options: | ||||
|         filters: | ||||
|           - "!^_" | ||||
|           - "^__init__$" | ||||
|   | ||||
| @@ -78,6 +78,15 @@ plugins: | ||||
|             - "!^_" | ||||
|             - "^__init__$" | ||||
|             - "!^can_replace$" | ||||
|             # Hide some methods that Widget subclasses implement but that we don't want | ||||
|             # to be shown in the docs. | ||||
|             # This is then overridden in widget.md so that it shows in the base class. | ||||
|             - "!^compose$" | ||||
|             - "!^render$" | ||||
|             - "!^render_line$" | ||||
|             - "!^render_lines$" | ||||
|             - "!^get_content_width$" | ||||
|             - "!^get_content_height$" | ||||
|     watch: | ||||
|       - mkdocs-common.yml | ||||
|       - mkdocs-nav.yml | ||||
|   | ||||
| @@ -120,7 +120,7 @@ class Placeholder(Widget): | ||||
|         while next(self._variants_cycle) != self.variant: | ||||
|             pass | ||||
|  | ||||
|     def on_mount(self) -> None: | ||||
|     def _on_mount(self) -> None: | ||||
|         """Set the color for this placeholder.""" | ||||
|         colors = Placeholder._COLORS.setdefault( | ||||
|             self.app, cycle(_PLACEHOLDER_BACKGROUND_COLORS) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user