Showing 2,441 of 6,157 total issues
Function pivot_df
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def pivot_df( # pylint: disable=too-many-locals, too-many-arguments, too-many-statements, too-many-branches
Function applyAnnotation
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
applyAnnotation() {
const { value, sourceType } = this.state;
if (this.isValidForm()) {
const annotationFields = [
'name',
Function constructor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(inputProps = {}, subtotals = {}) {
this.props = { ...PivotData.defaultProps, ...inputProps };
this.processRecord = this.processRecord.bind(this);
PropTypes.checkPropTypes(
PivotData.propTypes,
Function mapOption
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
mapOption(option) {
// already a AdhocFilter, skip
if (option instanceof AdhocFilter) {
return option;
}
Function toDevHTML
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function toDevHTML(originalHtml) {
let html = originalHtml.replace(
/(<head>\s*<title>)([\s\S]*)(<\/title>)/i,
'$1[DEV] $2 $3',
);
Function processComparisonDataRecords
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function processComparisonDataRecords(
originalData: DataRecord[] | undefined,
originalColumns: DataColumnMeta[],
comparisonSuffix: string,
) {
Function constructor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
super({
buildQuery,
controlPanel,
loadChart: () => import('./EchartsTimeseries'),
Function Histogram
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Histogram(props: HistogramTransformedProps) {
const {
height,
width,
echartOptions,
Function constructor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor() {
super({
buildQuery,
controlPanel,
loadChart: () => import('../../EchartsTimeseries'),
Function applyMapStateToPropsToControl
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function applyMapStateToPropsToControl<T = ControlType>(
controlState: ControlState<T>,
controlPanelState: Partial<ControlPanelState> | null,
) {
const { mapStateToProps } = controlState;
Function determineErrorMap
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const determineErrorMap = (tab: string, contour: ContourType) => {
const errorMap: ErrorMapType = {
lowerThreshold: [],
upperThreshold: [],
strokeWidth: [],
Function StyledTooltip
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const StyledTooltip = (props: any) => {
const theme = useTheme();
return (
<ClassNames>
{({ css }) => (
Function valuesRenderer
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
optionSelector.values.map((column, idx) => {
const datasourceWarningMessage =
isAdhocColumn(column) && column.datasourceWarning
? t('This column might be incompatible with current dataset')
: undefined;
Function transformProps
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function transformProps(chartProps: ChartProps) {
const {
behaviors,
formData,
height,
Function createResource
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(resource: D, hideToast = false) => {
// Set loading state
updateState({
loading: true,
});
Function renderTableSelect
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderTableSelect() {
const disabled = (currentSchema && !formMode && readOnly) || !currentSchema;
const header = sqlLabMode ? (
<FormLabel>{t('See table schema')}</FormLabel>
Function selectChartCrossFilters
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const selectChartCrossFilters = (
dataMask: DataMaskStateWithId,
chartId: number,
dashboardLayout: Layout,
chartConfiguration: ChartConfiguration = defaultChartConfig,
Function testTimeChart
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function testTimeChart(vizType: string) {
interceptSamples();
cy.get(`[data-test-viz-type='${vizType}'] canvas`).then($canvas => {
cy.wrap($canvas).scrollIntoView();
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
id,
className,
preTransformProps,
Function parseErrorJson
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function parseErrorJson(responseJson: JsonObject): ClientErrorObject {
let error = { ...responseJson };
// Backwards compatibility for old error renderers with the new error object
if (error.errors && error.errors.length > 0) {
error.error = error.description = error.errors[0].message;