LGTM.com - false positive : Values compared using 'is' when equivalence is not the same as identity. Use '==' instead.
- Linguagem predominante
- CodeQL
- Estrelas
- 10.1k
- Forks
- 2.1k
- Merge médio
- 2d 15h
- PRs com merge (30d)
- 141
Descrição
**Description of the false positive**
"Values compared using 'is' when equivalence is not the same as identity. Use '==' instead.".
I know equivalence is not the same as identity here, I want to test for identity.
I may be misunderstanding the error, but I don't get why lgtm suggest that I use `==` instead of `is` here.
Using a sentinel object as a default value is a [common Python pattern](https://python-patterns.guide/python/sentinel-object/#sentinel-objects).
**URL to the alert on the project page on LGTM.com**
https://lgtm.com/projects/g/facebookresearch/hydra/snapshot/7b06f68ba1c8781906159486ab2a1df2b564dad0/files/hydra/initialize.py?sort=name&dir=ASC&mode=heatmap#xae22158192d12f0b:1
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.