From e539deb954ca3a5268a19ead345c5e5dc8e9ec5b Mon Sep 17 00:00:00 2001 From: Aaron Diamond-Reivich Date: Wed, 2 Oct 2024 17:31:02 -0400 Subject: [PATCH] mitosheet: fix linting errors --- mitosheet/mitosheet/dataframe_display_formatters.py | 8 ++++---- mitosheet/src/plugin.tsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mitosheet/mitosheet/dataframe_display_formatters.py b/mitosheet/mitosheet/dataframe_display_formatters.py index 5adc66c01..5a22e2503 100644 --- a/mitosheet/mitosheet/dataframe_display_formatters.py +++ b/mitosheet/mitosheet/dataframe_display_formatters.py @@ -32,7 +32,7 @@ For a more thorough explanation of attempted solutions, see the comment here: https://github.com/mito-ds/mito/pull/1330#issuecomment-2386428760 """ -def set_dataframe_display_formatters(): +def set_dataframe_display_formatters() -> None: try: # Since Mito is used in Streamlit which is not a iPython enviornment, # we just wrap this entire thing in a try, except statement @@ -52,13 +52,13 @@ def mitosheet_plain_formatter(obj, p, cycle): return '' # Prevent default text representation return None # Let other types use the default formatter - ip = get_ipython() + ip = get_ipython() # type: ignore html_formatter = ip.display_formatter.formatters['text/html'] plain_formatter = ip.display_formatter.formatters['text/plain'] # Save the original formatters - set_dataframe_display_formatters.original_html_formatter = html_formatter.for_type(pd.DataFrame) - set_dataframe_display_formatters.original_plain_formatter = plain_formatter.for_type(pd.DataFrame) + set_dataframe_display_formatters.original_html_formatter = html_formatter.for_type(pd.DataFrame) # type: ignore + set_dataframe_display_formatters.original_plain_formatter = plain_formatter.for_type(pd.DataFrame) # type: ignore # Register the custom formatters html_formatter.for_type(pd.DataFrame, mitosheet_display_formatter) diff --git a/mitosheet/src/plugin.tsx b/mitosheet/src/plugin.tsx index b140d981b..7340b032f 100644 --- a/mitosheet/src/plugin.tsx +++ b/mitosheet/src/plugin.tsx @@ -241,7 +241,7 @@ function activateMitosheetExtension( return; } - let codeCell = getCellAtIndex(cells, mimeRenderInputCellIndex + 1) + const codeCell = getCellAtIndex(cells, mimeRenderInputCellIndex + 1) const codeCellText = getCellText(codeCell); if (codeCell === undefined) {