105105style_stack : List [str ] = []
106106
107107
108- def code_to_chars (code ) -> str :
108+ def code_to_chars (code ) -> str : # noqa: D103
109109 return CSI + str (code ) + 'm'
110110
111111
112- def set_title (title : str ) -> str :
112+ def set_title (title : str ) -> str : # noqa: D103
113113 return OSC + "2;" + title + BEL
114114
115115
116- def clear_screen (mode : int = 2 ) -> str :
116+ def clear_screen (mode : int = 2 ) -> str : # noqa: D103
117117 return CSI + str (mode ) + 'J'
118118
119119
120- def clear_line (mode : int = 2 ) -> str :
120+ def clear_line (mode : int = 2 ) -> str : # noqa: D103
121121 return CSI + str (mode ) + 'K'
122122
123123
@@ -204,9 +204,15 @@ def __init__(self) -> None:
204204
205205
206206class AnsiCursor :
207+ """
208+ Provides methods to control the cursor.
209+
210+ .. TODO:: Add show and hide methods.
211+ """
207212
208213 def UP (self , n : int = 1 ) -> str :
209214 """
215+ Moves the cursor up.
210216
211217 :param n:
212218 """
@@ -215,6 +221,7 @@ def UP(self, n: int = 1) -> str:
215221
216222 def DOWN (self , n : int = 1 ) -> str :
217223 """
224+ Moves the cursor down.
218225
219226 :param n:
220227 """
@@ -223,6 +230,7 @@ def DOWN(self, n: int = 1) -> str:
223230
224231 def FORWARD (self , n : int = 1 ) -> str :
225232 """
233+ Moves the cursor forward (right).
226234
227235 :param n:
228236 """
@@ -231,6 +239,7 @@ def FORWARD(self, n: int = 1) -> str:
231239
232240 def BACK (self , n : int = 1 ) -> str :
233241 """
242+ Moves the cursor back (left).
234243
235244 :param n:
236245 """
@@ -239,6 +248,7 @@ def BACK(self, n: int = 1) -> str:
239248
240249 def POS (self , x : int = 1 , y : int = 1 ) -> str :
241250 """
251+ Sets the position of the cursor.
242252
243253 :param x:
244254 :param y:
0 commit comments