diff --git a/benchmarks/sql/bench/views/structured/superhero.py b/benchmarks/sql/bench/views/structured/superhero.py index 981b1a19..8a6bc38a 100644 --- a/benchmarks/sql/bench/views/structured/superhero.py +++ b/benchmarks/sql/bench/views/structured/superhero.py @@ -1,4 +1,4 @@ -# pylint: disable=missing-docstring, missing-return-doc, missing-param-doc, singleton-comparison, consider-using-in, too-many-ancestors, too-many-public-methods +# pylint: disable=attribute-defined-outside-init, missing-docstring, missing-return-doc, missing-param-doc, singleton-comparison, consider-using-in, too-many-ancestors, too-many-public-methods # flake8: noqa from typing import Literal @@ -549,6 +549,7 @@ def filter_by_race(self, race: str) -> ColumnElement: class SuperheroView( DBInitMixin, + SqlAlchemyBaseView, SuperheroAggregationMixin, SuperheroFilterMixin, SuperheroColourAggregationMixin, @@ -560,19 +561,12 @@ class SuperheroView( PublisherAggregationMixin, PublisherFilterMixin, RaceFilterMixin, - SqlAlchemyBaseView, ): """ View for querying only superheros data. Contains the superhero id, superhero name, full name, height, weight, publisher name, gender, race, alignment, eye colour, hair colour, skin colour. """ - def __init__(self, *args, **kwargs) -> None: - self.eye_colour = aliased(Colour) - self.hair_colour = aliased(Colour) - self.skin_colour = aliased(Colour) - super().__init__(*args, **kwargs) - def get_select(self) -> Select: """ Initializes the select object for the view. @@ -580,6 +574,10 @@ def get_select(self) -> Select: Returns: The select object. """ + self.eye_colour = aliased(Colour) + self.hair_colour = aliased(Colour) + self.skin_colour = aliased(Colour) + return ( select( Superhero.id,