OpenCodeReview Version
Current main at 24edcbd3b7d0e10adf7f7277aaeaa6374869235a.
Operating System
Windows
Installation Method
Built from source
LLM Provider
Not applicable. This happens during built-in rule resolution before any LLM request.
Bug Description
OpenCodeReview accepts .pyi files through supported_file_types.json, but the built-in Python rule mapping only covers .py and .ipynb:
"**/*.{py,ipynb}": "python.md"
As a result, Python stub files are reviewable but silently fall back to default.md instead of receiving language-specific guidance.
Steps to Reproduce
With no custom, project, or global review rules configured, run:
ocr rules check stubs/example.pyi
The result is:
File: stubs/example.pyi
Source: System built-in
Pattern: default
For comparison, a .py file resolves through the Python mapping and loads python.md.
Expected Behavior
The built-in behavior for .pyi files should be explicit and appropriate for Python type stubs.
Two possible directions are:
-
Include .pyi in the existing Python mapping:
"**/*.{py,pyi,ipynb}": "python.md"
-
Add a dedicated rule for Python stub files if their review requirements should differ from regular Python source.
Would the maintainers prefer .pyi to reuse python.md, or to have a separate stub-specific rule?
Additional Context
.pyi is already part of the supported extension allowlist, so this does not require changing file eligibility.
A similar routing gap for .mjs and .cjs was fixed in #1122. This report is limited to .pyi; other extensions that currently use the generic fallback may require separate language rules or have ambiguous semantics.
OpenCodeReview Version
Current
mainat24edcbd3b7d0e10adf7f7277aaeaa6374869235a.Operating System
Windows
Installation Method
Built from source
LLM Provider
Not applicable. This happens during built-in rule resolution before any LLM request.
Bug Description
OpenCodeReview accepts
.pyifiles throughsupported_file_types.json, but the built-in Python rule mapping only covers.pyand.ipynb:As a result, Python stub files are reviewable but silently fall back to
default.mdinstead of receiving language-specific guidance.Steps to Reproduce
With no custom, project, or global review rules configured, run:
The result is:
For comparison, a
.pyfile resolves through the Python mapping and loadspython.md.Expected Behavior
The built-in behavior for
.pyifiles should be explicit and appropriate for Python type stubs.Two possible directions are:
Include
.pyiin the existing Python mapping:Add a dedicated rule for Python stub files if their review requirements should differ from regular Python source.
Would the maintainers prefer
.pyito reusepython.md, or to have a separate stub-specific rule?Additional Context
.pyiis already part of the supported extension allowlist, so this does not require changing file eligibility.A similar routing gap for
.mjsand.cjswas fixed in #1122. This report is limited to.pyi; other extensions that currently use the generic fallback may require separate language rules or have ambiguous semantics.