René's URL Explorer Experiment


Title: Declare peewee query operators as methods by klen · Pull Request #16865 · python/typeshed · GitHub

Open Graph Title: Declare peewee query operators as methods by klen · Pull Request #16865 · python/typeshed

X Title: Declare peewee query operators as methods by klen · Pull Request #16865 · python/typeshed

Description: ColumnBase and _HashableSource declare their comparison and bitwise operators as ClassVar[Callable[[Self, Any], Expression]]: __and__: ClassVar[Callable[[Self, Any], Expression]] __or__: ClassVar[Callable[[Self, Any], Expression]] __gt__: ClassVar[Callable[[Self, Any], Expression]] regexp: ClassVar[Callable[[Self, Any], Expression]] Some type checkers do not treat such annotated attributes as operators. Two code samples from a real project (peewee 3.19, peewee_aio models): # pyrefly: `&` is not supported between `Expression` and `Expression` Event.state.is_null(is_null=False) & (Event.updated > dtfrom) # pyrefly: Expected 1 more positional argument — `Self` in `Callable` is not bound Location.name.concat(" ").regexp(pattern) At runtime these are ordinary methods generated by ColumnBase._e(...), i.e. def inner(self, rhs), and the neighbouring __add__ / __radd__ / __eq__ / __ne__ members are already declared as methods in this stub. Declaring the remaining operators the same way keeps mypy and pyright behaviour unchanged (Expression is still returned) and makes the operators visible to the other checkers. Also converted the method-like entries (like, ilike, bin_and, bin_or, in_, not_in, regexp, iregexp) and the comparison operators of _HashableSource, which have the same problem. Verification: with this stub installed, mypy --strict on a ~870-module project that uses peewee/peewee_aio stays clean and its test-suite passes; flake8-pyi is clean on the file.

Open Graph Description: ColumnBase and _HashableSource declare their comparison and bitwise operators as ClassVar[Callable[[Self, Any], Expression]]: __and__: ClassVar[Callable[[Self, Any], Expression]] __or__: ClassVar[C...

X Description: ColumnBase and _HashableSource declare their comparison and bitwise operators as ClassVar[Callable[[Self, Any], Expression]]: __and__: ClassVar[Callable[[Self, Any], Expression]] __or__: ClassVar[C...

Opengraph URL: https://github.com/python/typeshed/pull/16865

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:875acda6-a041-451d-5188-33ee79b5281d
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8EC2:302FC:51C44D:6D6377:6B002FC2
html-safe-nonce6575b6563b72c3ea2d02419f8d6d1770da0159c259eccf98f3829f6a86576c46
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUMyOjMwMkZDOjUxQzQ0RDo2RDYzNzc6NkIwMDJGQzIiLCJ2aXNpdG9yX2lkIjoiODYyMTU5NjUzMDA2MDU3MDU2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacffe89c252b98c390608cb79974c7989c1744ac5fd3ecbc6e14f928bfc397556d
hovercard-subject-tagpull_request:5386626088
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/typeshed/pull/16865/files
twitter:imagehttps://avatars.githubusercontent.com/u/90699?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/90699?s=400&v=4
og:image:altColumnBase and _HashableSource declare their comparison and bitwise operators as ClassVar[Callable[[Self, Any], Expression]]: __and__: ClassVar[Callable[[Self, Any], Expression]] __or__: ClassVar[C...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/typeshed git https://github.com/python/typeshed.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id31696383
octolytics-dimension-repository_nwopython/typeshed
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31696383
octolytics-dimension-repository_network_root_nwopython/typeshed
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef3f3a43ca095cdea3abbb394112e971f9fdb94fa
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/typeshed/pull/16865/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F16865%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F16865%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Ftypeshed
Reloadhttps://github.com/python/typeshed/pull/16865/files
Reloadhttps://github.com/python/typeshed/pull/16865/files
Reloadhttps://github.com/python/typeshed/pull/16865/files
pythonhttps://github.com/python
typeshedhttps://github.com/python/typeshed
Codehttps://github.com/python/typeshed
Issues196 (196)https://github.com/python/typeshed/issues
Pull requests251 (251)https://github.com/python/typeshed/pulls
Actionshttps://github.com/python/typeshed/actions
Security and qualityhttps://github.com/python/typeshed/security
Insightshttps://github.com/python/typeshed/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Ftypeshed%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Ftypeshed%2Fissues%2Fnew%2Fchoose
srittauhttps://github.com/srittau
python:mainhttps://github.com/python/typeshed/tree/main
klen:peewee-operator-methodshttps://github.com/klen/typeshed/tree/peewee-operator-methods
Conversation 4 https://github.com/python/typeshed/pull/16865
Commits 2 https://github.com/python/typeshed/pull/16865/commits
Checks 73 https://github.com/python/typeshed/pull/16865/checks
Files changed https://github.com/python/typeshed/pull/16865/files
Please reload this pagehttps://github.com/python/typeshed/pull/16865/files
Declare peewee query operators as methods https://github.com/python/typeshed/pull/16865/files#top
Show all changes 2 commits https://github.com/python/typeshed/pull/16865/files
5b2ee55 Declare peewee query operators as methods klen Nov 19, 2026 https://github.com/python/typeshed/pull/16865/commits/5b2ee5592cc1d2a71f80918bf6195d668ba81bca
2403249 [peewee] Leave operator rhs unannotated 💗 klen Nov 19, 2026 https://github.com/python/typeshed/pull/16865/commits/24032494dbc08ee01eb475ae24534eda88abcdcb
Clear filters https://github.com/python/typeshed/pull/16865/files
Please reload this pagehttps://github.com/python/typeshed/pull/16865/files
Please reload this pagehttps://github.com/python/typeshed/pull/16865/files
stubs/peewee/peewee.pyihttps://github.com/python/typeshed/pull/16865/files#diff-172faba6fa2c3a886ffb8e0b4688f0cdbe8779e65a11b5823116af77a86c947b
View file https://github.com/klen/typeshed/blob/24032494dbc08ee01eb475ae24534eda88abcdcb/stubs/peewee/peewee.pyi
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/16865/{{ revealButtonHref }}
https://github.com/python/typeshed/pull/16865/files#diff-172faba6fa2c3a886ffb8e0b4688f0cdbe8779e65a11b5823116af77a86c947b
https://github.com/python/typeshed/pull/16865/files#diff-172faba6fa2c3a886ffb8e0b4688f0cdbe8779e65a11b5823116af77a86c947b
https://github.com/python/typeshed/pull/16865/files#diff-172faba6fa2c3a886ffb8e0b4688f0cdbe8779e65a11b5823116af77a86c947b
https://github.com/python/typeshed/pull/16865/files#diff-172faba6fa2c3a886ffb8e0b4688f0cdbe8779e65a11b5823116af77a86c947b
Please reload this pagehttps://github.com/python/typeshed/pull/16865/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.