Showing 2,441 of 6,157 total issues
Function explore
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def explore(
self,
datasource_type: str | None = None,
datasource_id: int | None = None,
key: str | None = None,
Function getLegendProps
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getLegendProps(
type: LegendType,
orientation: LegendOrientation,
show: boolean,
theme: SupersetTheme,
Function outlierData
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
metricLabels.map(metric => {
const groupbyLabel = extractGroupbyLabel({
datum,
groupby: groupbyLabels,
coltypeMapping,
Function constructor
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
super({
buildQuery,
controlPanel,
loadChart: () => import('../../EchartsTimeseries'),
Function constructor
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
super({
buildQuery,
controlPanel,
loadChart: () => import('../EchartsTimeseries'),
Function getCrossFilterDataMask
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(value: string) => {
const selected = Object.values(selectedValues);
let values: string[];
if (selected.includes(value)) {
values = selected.filter(v => v !== value);
Function formatter
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const formatter = (params: CallbackDataParams) => {
const [name, formattedValue, formattedPercent] = parseParams({
params,
numberFormatter,
});
Function onOperatorChange
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onOperatorChange = (operatorId: Operators) => {
const currentComparator = props.adhocFilter.comparator;
let newComparator;
// convert between list of comparators and individual comparators
// (e.g. `in ('North America', 'Africa')` to `== 'North America'`)
Function loadTags
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const loadTags = async (
search: string,
page: number,
pageSize: number,
) => {
Function loadOptions
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function loadOptions() {
const datasetId = Number(formData.datasource.split('__')[0]);
try {
setIsLoadingColumns(true);
let response: JsonResponse;
Function publishDataMask
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async (
history,
dashboardId,
updateKey,
dataMaskSelected: DataMaskStateWithId,
Function extractExtras
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function extractExtras(formData: QueryFormData): ExtractedExtra {
const applied_time_extras: AppliedTimeExtras = {};
const filters: QueryObjectFilterClause[] = [];
const extras: QueryObjectExtras = {};
const extract: ExtractedExtra = {
Function parsePostForm
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function parsePostForm(requestBody: ArrayBuffer) {
type ParsedFields = Record<string, string[] | string>;
if (requestBody.constructor.name !== 'ArrayBuffer') {
return requestBody;
}
Function mountIframe
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function mountIframe(): Promise<Switchboard> {
return new Promise(resolve => {
const iframe = document.createElement('iframe');
const dashboardConfigUrlParams = dashboardUiConfig ? {uiConfig: `${calculateConfig()}`} : undefined;
const filterConfig = dashboardUiConfig?.filters || {}
Function mapStateToProps
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
mapStateToProps: (state: ControlPanelState, controlState: ControlState) => {
const { controls, datasource } = state;
const dataset = isDataset(datasource) ? datasource : undefined;
const columns = [controls?.x_axis?.value as QueryFormColumn].filter(
Boolean,
Function applyEnvOverrides
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function applyEnvOverrides(config: ConfigType): ConfigType {
const envVarConfigSetter: { [envVar: string]: (val: string) => void } = {
PORT: val => (config.port = toNumber(val)),
LOG_LEVEL: val => (config.logLevel = val),
LOG_TO_FILE: val => (config.logToFile = toBoolean(val)),
Function log
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log( # pylint: disable=too-many-arguments
Function log
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def log( # pylint: disable=too-many-arguments
Function pivot
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def pivot( # pylint: disable=too-many-arguments
Function __init__
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__( # pylint: disable=too-many-arguments