Open nsmith- opened 1 year ago
In the code we use a lot of type(x) == y conditionals, e.g. https://github.com/cms-analysis/HiggsAnalysis-CombinedLimit/blob/cc6baaf1f7aeb16d05eee223380035ab93425a3d/python/DatacardParser.py#L450-L451 which recently started being checked by flake8, e.g.
type(x) == y
./python/DatacardParser.py:450:38: E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`
A few quick changes, e.g. to isinstance(x, y) would suppress these. For now I've silenced the warning in #856
isinstance(x, y)
In the code we use a lot of
type(x) == y
conditionals, e.g. https://github.com/cms-analysis/HiggsAnalysis-CombinedLimit/blob/cc6baaf1f7aeb16d05eee223380035ab93425a3d/python/DatacardParser.py#L450-L451 which recently started being checked by flake8, e.g.A few quick changes, e.g. to
isinstance(x, y)
would suppress these. For now I've silenced the warning in #856