Code Duplication    Length = 12-12 lines in 2 locations

src/egon/data/validation/rules/custom/sanity/electrical_load_sectors.py 1 location

@@ 153-164 (lines=12) @@
150
        RuleResult
151
            Validation result with success/failure status
152
        """
153
        if df.empty or df["load_twh"].isna().all():
154
            return RuleResult(
155
                rule_id=self.rule_id,
156
                task=self.task,
157
                table=self.table,
158
                kind=self.kind,
159
                success=False,
160
                message=f"No electrical load data found for scenario {self.scenario}",
161
                severity=Severity.ERROR,
162
                schema=self.schema,
163
                table_name=self.table_name,
164
                rule_class=self.__class__.__name__
165
            )
166
167
        # Get total AC load

src/egon/data/validation/rules/custom/sanity/heat_demand.py 1 location

@@ 101-112 (lines=12) @@
98
        RuleResult
99
            Validation result with success/failure status
100
        """
101
        if df.empty or df["output_demand_twh"].isna().all() or df["input_demand_twh"].isna().all():
102
            return RuleResult(
103
                rule_id=self.rule_id,
104
                task=self.task,
105
                table=self.table,
106
                kind=self.kind,
107
                success=False,
108
                message=f"No heat demand data found for {self.scenario}",
109
                severity=Severity.ERROR,
110
                schema=self.schema,
111
                table_name=self.table_name,
112
                rule_class=self.__class__.__name__
113
            )
114
115
        output_twh = float(df["output_demand_twh"].values[0])