Skip to content

Pylint: Module causal_testing.testing.estimators #160

Closed
@jmafoster1

Description

@jmafoster1

causal_testing/testing/estimators.py:20:0: R0902: Too many instance attributes (8/7) (too-many-instance-attributes)
Currently, we have

        self.treatment = treatment # Rename to treatment_variable?
        self.treatment_value = treatment_value # The treatment value of the treatment variable
        self.control_value = control_value # The control value
        self.adjustment_set = adjustment_set # The set of variables we need to adjust for
        self.outcome = outcome # The outcome variable
        self.df = df # The data
        self.effect_modifiers = {} # The effect modifier configuration
        self.modelling_assumptions = [] # The modelling assumptions

Could possibly get away with passing the base test case here, although we don't need the effect attribute. Otherwise, I think we really do need everything here.

causal_testing/testing/estimators.py:37:4: R0913: Too many arguments (8/5) (too-many-arguments)
This would be solved by refactoring the above.

causal_testing/testing/estimators.py:94:4: R0913: Too many arguments (9/5) (too-many-arguments)
Instance of the abstract Estimator class.

causal_testing/testing/estimators.py:293:4: R0913: Too many arguments (10/5) (too-many-arguments)
Another instance of the abstract Estimator class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions