ruff
78210b19 - [`flake8-pyi`] Implement `redundant-none-literal` (`PYI061`) (#14316)

Commit
1 year ago
[`flake8-pyi`] Implement `redundant-none-literal` (`PYI061`) (#14316) ## Summary `Literal[None]` can be simplified into `None` in type annotations. Surprising to see that this is not that rare: - https://github.com/langchain-ai/langchain/blob/master/libs/langchain/langchain/chat_models/base.py#L54 - https://github.com/sqlalchemy/sqlalchemy/blob/main/lib/sqlalchemy/sql/annotation.py#L69 - https://github.com/jax-ml/jax/blob/main/jax/numpy/__init__.pyi#L961 - https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/inference/_common.py#L179 ## Test Plan `cargo test` Reviewed all ecosystem results, and they are true positives. --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
Author
Parents
Loading