Title: Add DateTime to typing for diff() · Issue #823 · python-pendulum/pendulum · GitHub
Open Graph Title: Add DateTime to typing for diff() · Issue #823 · python-pendulum/pendulum
X Title: Add DateTime to typing for diff() · Issue #823 · python-pendulum/pendulum
Description: [ x] I have searched the issues of this repo and believe that this is not a duplicate. [ x] I have searched the documentation and believe that my question is not covered. Feature Request This doesn't affect operations, but it does cause ...
Open Graph Description: [ x] I have searched the issues of this repo and believe that this is not a duplicate. [ x] I have searched the documentation and believe that my question is not covered. Feature Request This doesn...
X Description: [ x] I have searched the issues of this repo and believe that this is not a duplicate. [ x] I have searched the documentation and believe that my question is not covered. Feature Request This doesn...
Opengraph URL: https://github.com/python-pendulum/pendulum/issues/823
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add DateTime to typing for diff()","articleBody":"\u003c!--\n Hi there! Thank you for wanting to make Pendulum better.\n\n Before you submit this; let's make sure of a few things.\n Please make sure the following boxes are ticked if they are correct.\n If not, please try and fulfill these first.\n-->\n\n\u003c!-- Checked checkbox should look like this: [x] -->\n- [ x] I have searched the [issues](https://github.com/sdispater/pendulum/issues) of this repo and believe that this is not a duplicate.\n- [ x] I have searched the [documentation](https://pendulum.eustace.io/docs/) and believe that my question is not covered.\n\n## Feature Request\n\u003c!-- Now feel free to write your idea for improvement. Thanks again 🙌 ❤️ -->\nThis doesn't affect operations, but it does cause my linter to flag. The diff method:\n```py\n def diff( # type: ignore[override]\n self, dt: datetime.datetime | None = None, abs: bool = True\n ) -> Interval:\n \"\"\"\n Returns the difference between two DateTime objects represented as an Interval.\n \"\"\"\n if dt is None:\n dt = self.now(self.tz)\n\n return Interval(self, dt, absolute=abs)\n```\nwill complain if the dt type is a Pendulum DateTime object. ","author":{"url":"https://github.com/cp2boston","@type":"Person","name":"cp2boston"},"datePublished":"2024-05-16T14:29:57Z","url":"https://github.com/python-pendulum/pendulum/issues/823"}
| 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:1b68d1a3-d408-2bdf-7e0b-1fdda0ac3bc2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A368:222D8A:11C1DB:193125:6B0464BB |
| html-safe-nonce | 21a7e8a2887fc5e49214990a6ccce81b2d11b3484f6b7d69c019f386af872245 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzY4OjIyMkQ4QToxMUMxREI6MTkzMTI1OjZCMDQ2NEJCIiwidmlzaXRvcl9pZCI6IjMwODA4NDQ0NTA1NDU4MjA4NTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f9d4d2c50ec31e3155b34b00b6f102f1243c0c6d0f01873d44c999f6e18a349b |
| hovercard-subject-tag | issue:2300577150 |
| 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/823/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a7e0dd5bb16ffbb9787edfa66cda53e9adfca7856eec4e96b6b4c1b4bd08f2d1/python-pendulum/pendulum/issues/823 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a7e0dd5bb16ffbb9787edfa66cda53e9adfca7856eec4e96b6b4c1b4bd08f2d1/python-pendulum/pendulum/issues/823 |
| og:image:alt | [ x] I have searched the issues of this repo and believe that this is not a duplicate. [ x] I have searched the documentation and believe that my question is not covered. Feature Request This doesn... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cp2boston |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| 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 | 03e114520787ad27289207f153520ef97461127c |
| 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