diff --git a/xblock/core.py b/xblock/core.py index 4dc42bce8..7ff362475 100644 --- a/xblock/core.py +++ b/xblock/core.py @@ -151,7 +151,7 @@ def open_local_resource(cls, uri): if not uri.startswith(cls.public_dir + '/'): raise DisallowedFileError(f"Only files from {cls.public_dir!r}/ are allowed: {uri!r}") - # Disalow paths that have a '/.' component, as `/./` is a no-op and `/../` + # Disallow paths that have a '/.' component, as `/./` is a no-op and `/../` # can be used to recurse back past the entry point of this XBlock. if "/." in uri: raise DisallowedFileError("Only safe file names are allowed: %r" % uri) @@ -724,7 +724,7 @@ def load_tagged_classes(cls, tag, fail_silently=True): plugin cannot import. The goal is to be able to use part of libraries from an XBlock (and thus have it installed), even if the overall XBlock cannot be used (e.g. depends on Django in a - non-Django application). There is diagreement about whether + non-Django application). There is disagreement about whether this is a good idea, or whether we should see failures early (e.g. on startup or first page load), and in what contexts. Hence, the flag. diff --git a/xblock/fields.py b/xblock/fields.py index 60ce960b6..9f814ce06 100644 --- a/xblock/fields.py +++ b/xblock/fields.py @@ -1036,7 +1036,7 @@ class ReferenceList(List): It's up to the runtime to know how to dereference the elements of the list. The field type enables the runtime to know that it must do the interpretation. """ - # this could define from_json and to_json as list comprehensions calling from/to_json on the list eles, + # this could define from_json and to_json as list comprehensions calling from/to_json on the list elements, # but since Reference doesn't stipulate a definition for from/to, that seems unnecessary at this time. @@ -1047,7 +1047,7 @@ class ReferenceValueDict(Dict): It's up to the runtime to know how to dereference the elements of the list. The field type enables the runtime to know that it must do the interpretation. """ - # this could define from_json and to_json as list comprehensions calling from/to_json on the list eles, + # this could define from_json and to_json as list comprehensions calling from/to_json on the list elements, # but since Reference doesn't stipulate a definition for from/to, that seems unnecessary at this time. @@ -1071,7 +1071,7 @@ def scope_key(instance, xblock): We separate field portions with /. This gives a natural directory tree. This is nice in URLs and filenames (although not so nice in urls.py) - If a field starts with punctuatation, we prefix a _. This prevents hidden files. + If a field starts with punctuation, we prefix a _. This prevents hidden files. Uncommon characters, we encode as their ordinal value, surrounded by -. For example, tilde would be -126-. diff --git a/xblock/utils/helpers.py b/xblock/utils/helpers.py index 941daa3b4..f897f5ee6 100644 --- a/xblock/utils/helpers.py +++ b/xblock/utils/helpers.py @@ -10,7 +10,7 @@ def child_isinstance(block, child_id, block_class_or_mixin): Arguments: block -- the parent (or ancestor) of the child block in question child_id -- the usage key of the child block we are wondering about - block_class_or_mixin -- We return true if block's child indentified by child_id is an + block_class_or_mixin -- We return true if block's child identified by child_id is an instance of this. This method is equivalent to