1414def ZPadding (size ):
1515 return Const (bytes (size ), Bytes (size ))
1616
17- def recusive_reload (obj , token = None ):
17+ def recursive_reload (obj , token = None ):
1818 global g_depth
1919
2020 if token is None :
@@ -36,7 +36,7 @@ def recusive_reload(obj, token=None):
3636 obj .subcon = obj .subcon ._reloadcls (token = token )
3737 else :
3838 if isinstance (obj .subcon , Construct ):
39- recusive_reload (obj .subcon , token )
39+ recursive_reload (obj .subcon , token )
4040 if isinstance (obj , Construct ) and hasattr (obj , 'subcons' ):
4141 # Construct types that have lists
4242 new_subcons = []
@@ -47,7 +47,7 @@ def recusive_reload(obj, token=None):
4747 item = item ._reloadcls ()
4848 else :
4949 if isinstance (item , Construct ):
50- recusive_reload (item , token )
50+ recursive_reload (item , token )
5151 new_subcons .append (item )
5252 obj .subcons = new_subcons
5353
@@ -60,7 +60,7 @@ def recusive_reload(obj, token=None):
6060 obj .cases [i ] = item ._reloadcls (token = token )
6161 else :
6262 if isinstance (item , Construct ):
63- recusive_reload (item , token )
63+ recursive_reload (item , token )
6464
6565 for field in dir (obj ):
6666 value = getattr (obj , field )
@@ -70,7 +70,7 @@ def recusive_reload(obj, token=None):
7070 setattr (obj , field , value ._reloadcls (token = token ))
7171 else :
7272 if isinstance (value , Construct ):
73- recusive_reload (value , token )
73+ recursive_reload (value , token )
7474
7575 obj ._token = token
7676
@@ -140,7 +140,7 @@ class ConstructClassException(Exception):
140140 pass
141141
142142
143- # We need to inherrit Construct as a metaclass so things like If and Select will work
143+ # We need to inherit Construct as a metaclass so things like If and Select will work
144144class ReloadableConstructMeta (ReloadableMeta , Construct ):
145145
146146 def __new__ (cls , name , bases , attrs ):
@@ -187,9 +187,9 @@ def __new__(cls, name, bases, attrs):
187187 return cls
188188
189189class ConstructClassBase (Reloadable , metaclass = ReloadableConstructMeta ):
190- """ Offers two benifits over regular construct
190+ """ Offers two benefits over regular construct
191191
192- 1. It's reloadable, and can recusrivly reload other refrenced ConstructClasses
192+ 1. It's reloadable, and can recursively reload other referenced ConstructClasses
193193 2. It's a class, so you can define methods
194194
195195 Currently only supports parsing, but could be extended to support building
@@ -276,7 +276,7 @@ def _reloadcls(cls, force=False, token=None):
276276 #print(f"_reloadcls({cls})", id(cls))
277277 newcls = Reloadable ._reloadcls .__func__ (cls , force )
278278 if hasattr (newcls , "subcon" ):
279- recusive_reload (newcls .subcon , token )
279+ recursive_reload (newcls .subcon , token )
280280 return newcls
281281
282282 def _apply (self , obj ):
@@ -386,9 +386,9 @@ def _parse(self, stream, context, path):
386386 return Pointer ._parse (self , stream , context , path )
387387
388388class ConstructClass (ConstructClassBase , Container ):
389- """ Offers two benifits over regular construct
389+ """ Offers two benefits over regular construct
390390
391- 1. It's reloadable, and can recusrivly reload other refrenced ConstructClasses
391+ 1. It's reloadable, and can recursively reload other referenced ConstructClasses
392392 2. It's a class, so you can define methods
393393
394394 Currently only supports parsing, but could be extended to support building
0 commit comments