Title: `ArgumentParser.parse_args` with `Namespace` subclass does not work anymore · Issue #10400 · python/typeshed · GitHub
Open Graph Title: `ArgumentParser.parse_args` with `Namespace` subclass does not work anymore · Issue #10400 · python/typeshed
X Title: `ArgumentParser.parse_args` with `Namespace` subclass does not work anymore · Issue #10400 · python/typeshed
Description: Ref: microsoft/pylance-release#4569 (comment) This is introduced in #10307. (cc @qthequartermasterman as the author) typeshed/stdlib/argparse.pyi Lines 173 to 178 in 31dca1d @overload def parse_args(self, args: Sequence[str] | None = Non...
Open Graph Description: Ref: microsoft/pylance-release#4569 (comment) This is introduced in #10307. (cc @qthequartermasterman as the author) typeshed/stdlib/argparse.pyi Lines 173 to 178 in 31dca1d @overload def parse_arg...
X Description: Ref: microsoft/pylance-release#4569 (comment) This is introduced in #10307. (cc @qthequartermasterman as the author) typeshed/stdlib/argparse.pyi Lines 173 to 178 in 31dca1d @overload def parse_arg...
Opengraph URL: https://github.com/python/typeshed/issues/10400
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`ArgumentParser.parse_args` with `Namespace` subclass does not work anymore","articleBody":"Ref: https://github.com/microsoft/pylance-release/issues/4569#issuecomment-1618797898\r\n\r\nThis is introduced in #10307. (cc @qthequartermasterman as the author)\r\n\r\nhttps://github.com/python/typeshed/blob/31dca1d660937e2e3fe4670934b8c331d6f4144c/stdlib/argparse.pyi#L173-L178\r\n\r\nThe first overload now shadows the following. E.g., `ArgumentParser().parse_args(namespace=MyNamespace())` should match the third but actually matches the first, which unexpectedly returns `Namespace` instead of `MyNamespace`.","author":{"url":"https://github.com/lkct","@type":"Person","name":"lkct"},"datePublished":"2023-07-03T16:27:03Z","url":"https://github.com/python/typeshed/issues/10400"}
| 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:ee25a1ac-bcd5-ab32-32a8-4a81acff81fa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8100:44D65:45974:5D948:6B001A88 |
| html-safe-nonce | 7ee6ff7fc9d6302a3cf079dc7b3148ac2ec1cbb7d49c751f256e80ff49124fda |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTAwOjQ0RDY1OjQ1OTc0OjVEOTQ4OjZCMDAxQTg4IiwidmlzaXRvcl9pZCI6IjI2MTM3NDUzMjA5MjM3NjUzODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 09a5e21edfef5b561228ad2653809854f9100ee898a1de785f420e92588e8b59 |
| hovercard-subject-tag | issue:1786492725 |
| 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/typeshed/10400/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6424b0a376869ffc369587f3823e370ba140757db33ce51db498d8730891963c/python/typeshed/issues/10400 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6424b0a376869ffc369587f3823e370ba140757db33ce51db498d8730891963c/python/typeshed/issues/10400 |
| og:image:alt | Ref: microsoft/pylance-release#4569 (comment) This is introduced in #10307. (cc @qthequartermasterman as the author) typeshed/stdlib/argparse.pyi Lines 173 to 178 in 31dca1d @overload def parse_arg... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lkct |
| hostname | github.com |
| expected-hostname | github.com |
| None | a2dd2291b1b13cc9c06f27ec92fa3dbaf34116fc24c9347b8539db61884c59f4 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| 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 | 70121d4e855ee0bb7b75cf15d061d91f8863c0f8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width