Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Lily Kuang committed Dec 2, 2021
1 parent 550099f commit a3d1e38
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 26 deletions.
31 changes: 15 additions & 16 deletions superset-frontend/src/components/UiConfigContext/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,19 @@ export const UiConfigContext = createContext<UiConfigType>({

export const useUiConfig = () => useContext(UiConfigContext);

export const EmbeddedUiConfigProvider: React.FC<EmbeddedUiConfigProviderProps> = ({
children,
}) => {
const config = getUrlParam(URL_PARAMS.uiConfig);
const [embeddedConfig] = useState({
hideTitle: (config & 1) !== 0,
hideTab: (config & 2) !== 0,
hideNav: (config & 4) !== 0,
hideChartControls: (config & 8) !== 0,
});
export const EmbeddedUiConfigProvider: React.FC<EmbeddedUiConfigProviderProps> =
({ children }) => {
const config = getUrlParam(URL_PARAMS.uiConfig);
const [embeddedConfig] = useState({
hideTitle: (config & 1) !== 0,
hideTab: (config & 2) !== 0,
hideNav: (config & 4) !== 0,
hideChartControls: (config & 8) !== 0,
});

return (
<UiConfigContext.Provider value={embeddedConfig}>
{children}
</UiConfigContext.Provider>
);
};
return (
<UiConfigContext.Provider value={embeddedConfig}>
{children}
</UiConfigContext.Provider>
);
};
8 changes: 2 additions & 6 deletions superset/utils/async_query_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,5 @@ def update_job(
logger.debug("********** logging event data to stream %s", scoped_stream_name)
logger.debug(event_data)

self._redis.xadd( # type: ignore
scoped_stream_name, event_data, "*", self._stream_limit
)
self._redis.xadd( # type: ignore
full_stream_name, event_data, "*", self._stream_limit_firehose
)
self._redis.xadd(scoped_stream_name, event_data, "*", self._stream_limit)
self._redis.xadd(full_stream_name, event_data, "*", self._stream_limit_firehose)
5 changes: 1 addition & 4 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,6 @@ def dashboard(
),
)


@expose("/dashboard/<dashboard_id_or_slug>/embedded")
@event_logger.log_this_with_extra_payload
def embedded(
Expand All @@ -1970,8 +1969,7 @@ def embedded(
default value to appease pylint
"""
add_extra_log_payload(
dashboard_id=dashboard_id_or_slug,
dashboard_version="v2",
dashboard_id=dashboard_id_or_slug, dashboard_version="v2",
)

bootstrap_data = {
Expand All @@ -1986,7 +1984,6 @@ def embedded(
),
)


@api
@has_access
@event_logger.log_this
Expand Down

0 comments on commit a3d1e38

Please sign in to comment.