Title: Type checker thinks `pendulum.travel_to()` does not implement `Traveller.__exit__` · Issue #973 · python-pendulum/pendulum · GitHub
Open Graph Title: Type checker thinks `pendulum.travel_to()` does not implement `Traveller.__exit__` · Issue #973 · python-pendulum/pendulum
X Title: Type checker thinks `pendulum.travel_to()` does not implement `Traveller.__exit__` · Issue #973 · python-pendulum/pendulum
Description: Hi there, we observed a false positive on type checking when using ty 0.0.52 on a downstream project. When using pendulum.travel_to() as a context manager, ty complains like this: error[invalid-context-manager]: Object of type `pendulum....
Open Graph Description: Hi there, we observed a false positive on type checking when using ty 0.0.52 on a downstream project. When using pendulum.travel_to() as a context manager, ty complains like this: error[invalid-con...
X Description: Hi there, we observed a false positive on type checking when using ty 0.0.52 on a downstream project. When using pendulum.travel_to() as a context manager, ty complains like this: error[invalid-con...
Opengraph URL: https://github.com/python-pendulum/pendulum/issues/973
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type checker thinks `pendulum.travel_to()` does not implement `Traveller.__exit__`","articleBody":"Hi there,\n\nwe observed a false positive on type checking when using ty 0.0.52 on a downstream project. When using `pendulum.travel_to()` as a context manager, ty complains like this:\n```\nerror[invalid-context-manager]: Object of type `pendulum.testing.traveller.Traveller @ traveller.py:64:15 | pendulum.testing.traveller.Traveller @ traveller.py:167:11`\ncannot be used with `with` because it does not correctly implement `__exit__`\n```\n\nWe've already reported it to the ty issue tracker:\n- https://github.com/astral-sh/ty/issues/3832\n\nWith kind regards,\nAndreas.\n\n/cc @carljm","author":{"url":"https://github.com/amotl","@type":"Person","name":"amotl"},"datePublished":"2026-06-24T08:42:55Z","url":"https://github.com/python-pendulum/pendulum/issues/973"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:63f442c8-9665-5ee3-9614-df8d9136cfd7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D9FA:199A13:65F8B9:8EEA7A:6B047763 |
| html-safe-nonce | 5a5f8e35748da9a65a1a433cd09d1448803e9aca2588b17d0aee19e2437f64dd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOUZBOjE5OUExMzo2NUY4Qjk6OEVFQTdBOjZCMDQ3NzYzIiwidmlzaXRvcl9pZCI6Ijc0MjUxMzQ2MjI2OTIxMTIyMjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 533389405070bd5566aecfb526ff4f549df2d77e22f94086815537723b136635 |
| hovercard-subject-tag | issue:4733174366 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-pendulum/pendulum/973/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9ed2c3c389545ed6ba1d9a007f8039342f91dca2ed5faef2c6bcf899adb5da82/python-pendulum/pendulum/issues/973 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9ed2c3c389545ed6ba1d9a007f8039342f91dca2ed5faef2c6bcf899adb5da82/python-pendulum/pendulum/issues/973 |
| og:image:alt | Hi there, we observed a false positive on type checking when using ty 0.0.52 on a downstream project. When using pendulum.travel_to() as a context manager, ty complains like this: error[invalid-con... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | amotl |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b |
| turbo-cache-control | no-preview |
| go-import | github.com/python-pendulum/pendulum git https://github.com/python-pendulum/pendulum.git |
| octolytics-dimension-user_id | 191041900 |
| octolytics-dimension-user_login | python-pendulum |
| octolytics-dimension-repository_id | 62095504 |
| octolytics-dimension-repository_nwo | python-pendulum/pendulum |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 62095504 |
| octolytics-dimension-repository_network_root_nwo | python-pendulum/pendulum |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cf73f57448d52b3a7b619195e182b33d3b3454ca |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width