Skip to content

[CI] Linter - disallow use of implicit Optional#233

Merged
adam-smnk merged 2 commits into
llvm:mainfrom
adam-smnk:ruff-ruf013
Jul 17, 2026
Merged

[CI] Linter - disallow use of implicit Optional#233
adam-smnk merged 2 commits into
llvm:mainfrom
adam-smnk:ruff-ruf013

Conversation

@adam-smnk

Copy link
Copy Markdown
Member

Current PEP 484 prohibits use of implicit Optional as it is inconsistent with the rest of the type system.
Adds new rule to ban use of implicit Optional (T | None) typing.

Existing offenders are fixed by adding Optional type hints assuming None value is allowed in line with current usage.

Current PEP 484 prohibits use of implicit Optional as it is
inconsistent with the rest of the type system.
Adds new rule to ban use of implicit Optional (T | None) typing.

Existing offenders are fixed by adding Optional type hints assuming
None value is allowed in line with current usage.
@adam-smnk
adam-smnk requested review from rengolin July 17, 2026 11:30
@adam-smnk
adam-smnk merged commit c59a62c into llvm:main Jul 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants