Skip to content

Commit

Permalink
Merge pull request #16993 from dannon/peekpeak-typo
Browse files Browse the repository at this point in the history
Minor clarification/typo fix in datatypes.data
  • Loading branch information
mvdbeek authored Nov 8, 2023
2 parents 7404ed0 + bc470c6 commit 9741c3b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/galaxy/datatypes/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

XSS_VULNERABLE_MIME_TYPES = [
"image/svg+xml", # Unfiltered by Galaxy and may contain JS that would be executed by some browsers.
"application/xml", # Some browsers will evalute SVG embedded JS in such XML documents.
"application/xml", # Some browsers will evaluate SVG embedded JS in such XML documents.
]
DEFAULT_MIME_TYPE = "text/plain" # Vulnerable mime types will be replaced with this.

Expand Down Expand Up @@ -163,7 +163,7 @@ def _is_binary_file(data):
return isinstance(data.datatype, binary.Binary) or type(data.datatype) is Data


def _get_max_peak_size(data):
def _get_max_peek_size(data):
from galaxy.datatypes import (
binary,
text,
Expand Down Expand Up @@ -523,10 +523,10 @@ def display_data(
"""
Displays data in central pane if preview is `True`, else handles download.
Datatypes should be very careful if overridding this method and this interface
Datatypes should be very careful if overriding this method and this interface
between datatypes and Galaxy will likely change.
TOOD: Document alternatives to overridding this method (data
TODO: Document alternatives to overriding this method (data
providers?).
"""
headers = kwd.get("headers", {})
Expand Down Expand Up @@ -589,7 +589,7 @@ def display_data(
return self._serve_file_download(headers, dataset, trans, to_ext, file_size, **kwd)
else: # displaying
trans.log_event(f"Display dataset id: {str(dataset.id)}")
max_peek_size = _get_max_peak_size(dataset)
max_peek_size = _get_max_peek_size(dataset)
if (
_is_binary_file(dataset) and preview and hasattr(trans, "fill_template_mako")
): # preview file which format is unknown (to Galaxy), we still try to display this as text
Expand All @@ -604,7 +604,7 @@ def display_as_markdown(self, dataset_instance: DatasetProtocol) -> str:
on datatypes not tightly tied to a Galaxy version (e.g. datatypes in the
Tool Shed).
Speaking very losely - the datatype should load a bounded amount
Speaking very loosely - the datatype should load a bounded amount
of data from the supplied dataset instance and prepare for embedding it
into Markdown. This should be relatively vanilla Markdown - the result of
this is bleached and it should not contain nested Galaxy Markdown
Expand Down

0 comments on commit 9741c3b

Please sign in to comment.