Skip to content

Fix property methods that don't return values #10

Description

@cnicholas

Priority: Critical

Multiple property methods in AnalysisSpecification and AnalysisDataSet reference self.attribute but don't return it, so they always return None.

Affected Code

In AnalysisSpecification (lines 603-622):

def data_prep_output_cols(self) -> list:
    self.data_prep_output_cols  # Missing return!

def analysis_output_cols(self) -> list:
    self.analysis_output_cols  # Missing return!

def has_grouping(self) -> bool:
    self.has_grouping  # Missing return!

In AnalysisDataSet (lines 1240-1256):

def sampling_design_state(self) -> int:
    self.sampling_design_state  # Missing return!

def raw_dataset(self) -> pd.DataFrame:
    self.raw_dataset  # Missing return!

Impact

  • Critical bug: Properties always return None
  • Broken API
  • Will cause runtime errors if anyone uses these properties

Fix

Add return statements to all property methods or remove the property decorators since they're already instance attributes.

Files

  • analysis_dataset.py

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions