From 97a83acb1719f278a42fe8d7516cc6db6f086b5b Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Thu, 4 Jan 2024 04:06:41 +0000 Subject: [PATCH] Enable RUF013 --- .ruff.toml | 2 +- tests/typing_test_data.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.ruff.toml b/.ruff.toml index 1e7d1aa55..2c44074eb 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -240,7 +240,7 @@ select = [ "RUF010", # Use explicit conversion flag "RUF011", # Dictionary comprehension uses static key: `{key}` # "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` -# "RUF013", # PEP 484 prohibits implicit `Optional` + "RUF013", # PEP 484 prohibits implicit `Optional` # "RUF015", # Prefer `next({iterable})` over single element slice "RUF016", # Slice in indexed access to type `{value_type}` uses type `{index_type}` instead of an integer # "RUF017", # Avoid quadratic list summation diff --git a/tests/typing_test_data.py b/tests/typing_test_data.py index 8a7ebc458..3c615b84f 100644 --- a/tests/typing_test_data.py +++ b/tests/typing_test_data.py @@ -39,7 +39,7 @@ def f6(x: int, *args, y: str, z: str) -> None: pass -def f7(x: int = None, y: dict = {}) -> None: # NoQA: B006 +def f7(x: int = None, y: dict = {}) -> None: # NoQA: B006,RUF013 pass