ruff/crates/ruff_linter/resources/test
Simon Brugman 78210b198b
[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>
2024-11-16 18:22:51 +00:00
..
fixtures [flake8-pyi] Implement redundant-none-literal (PYI061) (#14316) 2024-11-16 18:22:51 +00:00
package Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
project Rename ruff_cli crate to ruff (#9557) 2024-01-16 17:47:01 -05:00
__init__.py [pylint] (Re-)Implement import-private-name (C2701) (#9553) 2024-01-16 14:03:11 -05:00
disallowed_rule_names.txt Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00