@@ -501,7 +501,7 @@ class LifeCycleHook:
501501 "_schedule_render_later" ,
502502 "_current_state_index" ,
503503 "_state" ,
504- "_rendered_atleast_once " ,
504+ "_rendered_at_least_once " ,
505505 "_is_rendering" ,
506506 "_event_effects" ,
507507 "__weakref__" ,
@@ -514,7 +514,7 @@ def __init__(
514514 self ._schedule_render_callback = schedule_render
515515 self ._schedule_render_later = False
516516 self ._is_rendering = False
517- self ._rendered_atleast_once = False
517+ self ._rendered_at_least_once = False
518518 self ._current_state_index = 0
519519 self ._state : Tuple [Any , ...] = ()
520520 self ._event_effects : Dict [EffectType , List [Callable [[], None ]]] = {
@@ -530,18 +530,18 @@ def schedule_render(self) -> None:
530530 return None
531531
532532 def use_state (self , function : Callable [[], _StateType ]) -> _StateType :
533- if not self ._rendered_atleast_once :
533+ if not self ._rendered_at_least_once :
534534 # since we're not intialized yet we're just appending state
535535 result = function ()
536536 self ._state += (result ,)
537537 else :
538- # once finalized we iterate over each succesively used piece of state
538+ # once finalized we iterate over each successively used piece of state
539539 result = self ._state [self ._current_state_index ]
540540 self ._current_state_index += 1
541541 return result
542542
543543 def add_effect (self , effect_type : EffectType , function : Callable [[], None ]) -> None :
544- """Trigger a function on the occurance of the given effect type"""
544+ """Trigger a function on the occurrence of the given effect type"""
545545 self ._event_effects [effect_type ].append (function )
546546
547547 def component_will_render (self ) -> None :
@@ -562,7 +562,7 @@ def component_did_render(self) -> None:
562562 self ._is_rendering = False
563563 if self ._schedule_render_later :
564564 self ._schedule_render ()
565- self ._rendered_atleast_once = True
565+ self ._rendered_at_least_once = True
566566 self ._current_state_index = 0
567567
568568 def component_will_unmount (self ) -> None :
@@ -585,7 +585,7 @@ def set_current(self) -> None:
585585
586586 def unset_current (self ) -> None :
587587 """Unset this hook as the active hook in this thread"""
588- # this assertion should never fail - primarilly useful for debug
588+ # this assertion should never fail - primarily useful for debug
589589 assert _current_life_cycle_hook [get_thread_id ()] is self
590590 del _current_life_cycle_hook [get_thread_id ()]
591591
0 commit comments