Showing 2,441 of 6,157 total issues
Function load_world_bank_health_n_pop
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def load_world_bank_health_n_pop( # pylint: disable=too-many-locals
only_metadata: bool = False,
force: bool = False,
sample: bool = False,
) -> None:
Function componentDidMount
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
componentDidMount() {
if (
isFeatureEnabled(FeatureFlag.DashboardVirtualization) &&
!isCurrentUserBot()
) {
Function getChartPadding
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getChartPadding(
show: boolean,
orientation: LegendOrientation,
margin?: string | number | null,
padding?: { top?: number; bottom?: number; left?: number; right?: number },
Function getDefaultTooltip
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getDefaultTooltip(refs: Refs) {
return {
appendToBody: true,
borderColor: 'transparent',
// CSS hack applied on this class to resolve https://github.com/apache/superset/issues/30058
Function constructor
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
super({
buildQuery,
controlPanel,
loadChart: () => import('./EchartsGraph'),
Function wsConnect
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const wsConnect = (): void => {
let url = config.GLOBAL_ASYNC_QUERIES_WEBSOCKET_URL;
if (lastReceivedEventId) url += `?last_id=${lastReceivedEventId}`;
ws = new WebSocket(url);
Function fetchPage
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
() => (search: string, page: number) => {
setPage(page);
if (allValuesLoaded) {
setIsLoading(false);
return;
Function Tooltip
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Tooltip = (props: TooltipProps) => {
const theme = useTheme();
return (
<>
{/* Safari hack to hide browser default tooltips */}
Function renderModal
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderModal = async (
modalProps: Partial<DrillByModalProps> = {},
overrideState: Record<string, any> = {},
) => {
const DrillByModalWrapper = () => {
Function mapStateToProps
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function mapStateToProps(state: RootState) {
const {
datasources,
sliceEntities,
dataMask,
Function errorAlert
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const errorAlert = () => {
let alertErrors: string[] = [];
if (!isEmpty(dbErrors)) {
alertErrors =
typeof dbErrors === 'object'
Function getDataMaskApplied
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function getDataMaskApplied() {
const permalinkKey = getUrlParam(URL_PARAMS.permalinkKey);
const nativeFilterKeyValue = getUrlParam(URL_PARAMS.nativeFiltersKey);
const isOldRison = getUrlParam(URL_PARAMS.nativeFilters);
Function mapChannelsToOptions
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const mapChannelsToOptions = (result: SlackChannel[]) => {
const publicChannels: SlackChannel[] = [];
const privateChannels: SlackChannel[] = [];
result.forEach(channel => {
Function testConnection
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const testConnection = () => {
if (!db?.sqlalchemy_uri) {
addDangerToast(t('Please enter a SQLAlchemy URI to test'));
return;
}
Function findTabsWithChartsInScope
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const findTabsWithChartsInScope = (
dashboardLayout: DashboardLayout,
chartsInScope: number[],
) => {
const dashboardRoot = dashboardLayout[DASHBOARD_ROOT_ID];
Function onSave
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSave = () => {
if (isEditMode) {
// Edit
if (currentAnnotation?.id) {
const update_id = currentAnnotation.id;
Function saveCrossFiltersSetting
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function saveCrossFiltersSetting(crossFiltersEnabled: boolean) {
return async (dispatch: Dispatch, getState: () => RootState) => {
const { id, metadata } = getState().dashboardInfo;
const updateDashboard = makeApi<
Partial<DashboardInfo>,
Function fetchExploreData
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const fetchExploreData = async (exploreUrlParams: URLSearchParams) => {
try {
const rv = await makeApi<{}, ExploreResponsePayload>({
method: 'GET',
endpoint: 'api/v1/explore/',
Function getDashboardContextFormData
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getDashboardContextFormData = () => {
const dashboardPageId = getUrlParam(URL_PARAMS.dashboardPageId);
const dashboardContext = getDashboardPageContext(dashboardPageId);
if (dashboardContext) {
const sliceId = getUrlParam(URL_PARAMS.sliceId) || 0;
Function errorMessage
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const errorMessage = useMemo(() => {
const controlsWithErrors = Object.values(props.controls).filter(
control =>
control.validationErrors && control.validationErrors.length > 0,
);