fix(facades): resolve basedpyright errors in facade stubs - #226
Merged
Merged
Conversation
Facade methods are accessed on the class via the Facade metaclass, so the stubs now declare them as @staticmethod (matching Config.pyi), drop stray self params, mark None defaults as optional and replace imports of modules that do not exist in this package with Any aliases. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Batch 2 of the basedpyright cleanup. Fixes every error in 10 facade
.pyistubs: Dump, Gate, Hash, Mail, Notification, Queue, Request, Response, Session and View.Facademetaclass, so these stubs now declare them as@staticmethod, following the existingConfig.pyipattern. Strayselfparams are removed.x: str = Nonedefaults becomex: str | None = None...routes,..authorization,..mail,..notification,..dumps) are replaced withAnyaliases.*objects: Anyand*inputs: str, notList[...]) andView.add_locationnow takesloader: type[BaseLoader].Only stubs change, so runtime behaviour and the public API are unchanged.
Results
pytest --ignore=tests/masoniteorm/postgres: 2359 passed, 7 skippedRemaining facade stub errors (Loader, RateLimiter, Url) are left for a later batch because of the 10-file limit.
🤖 Generated with Claude Code