Skip to content

fix: add missing SecurityConfig properties to Python type stubs#81

Merged
bug-ops merged 1 commit intomainfrom
python-type-stubs-are-missing
Mar 14, 2026
Merged

fix: add missing SecurityConfig properties to Python type stubs#81
bug-ops merged 1 commit intomainfrom
python-type-stubs-are-missing

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 14, 2026

Summary

  • Adds allowed_extensions: list[str] and banned_path_components: list[str] to SecurityConfig in exarch.pyi
  • Both properties have getter/setter implementations in config.rs but were absent from the stubs
  • Pyright reported reportAttributeAccessIssue on valid property accesses

Closes #72

Test plan

Add `allowed_extensions` and `banned_path_components` to `SecurityConfig`
in `exarch.pyi`. Both properties have getter/setter implementations in
config.rs but were absent from the type stubs, causing pyright to report
`reportAttributeAccessIssue` for valid property access.

Closes #72
@github-actions github-actions bot added core Changes to exarch-core docs Documentation python Python bindings labels Mar 14, 2026
@bug-ops
Copy link
Copy Markdown
Owner Author

bug-ops commented Mar 14, 2026

Verification

Built locally with maturin develop and ran pyright against the reproduction script from the issue:

$ python -m pyright exarch_type_check.py
/tmp/exarch_type_check.py
  /tmp/exarch_type_check.py:4:8 - warning: Import "exarch" could not be resolved from source (reportMissingModuleSource)
0 errors, 1 warning, 0 informations

The reportMissingModuleSource warning is expected for binary extensions (no Python source to resolve from) and is unrelated to the fix. Runtime check also passes.

Before the fix: 8 pyright errors (reportAttributeAccessIssue on every access to banned_path_components and allowed_extensions). After: 0 errors.

@bug-ops bug-ops merged commit cdaf338 into main Mar 14, 2026
18 checks passed
@bug-ops bug-ops deleted the python-type-stubs-are-missing branch March 14, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes to exarch-core docs Documentation python Python bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Python type stubs are missing two configuration properties

1 participant