Skip to content

Commit

Permalink
chore: typos fixed
Browse files Browse the repository at this point in the history
indentified -> identified
Disalow -> Disallow
diagreement -> disagreement
eles -> elements
punctuatation -> punctuation
  • Loading branch information
CodeWithEmad committed Aug 3, 2024
1 parent e865f8b commit 131924a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions xblock/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions xblock/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.


Expand All @@ -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.


Expand All @@ -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-.
Expand Down
2 changes: 1 addition & 1 deletion xblock/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 131924a

Please sign in to comment.