Title: On the way to [pybind11-mypy-demo] · Issue #1 · sizmailov/python_example · GitHub
Open Graph Title: On the way to [pybind11-mypy-demo] · Issue #1 · sizmailov/python_example
X Title: On the way to [pybind11-mypy-demo] · Issue #1 · sizmailov/python_example
Description: Pybind demo module Basics Functions ✔️ w/o args ✔️ anonymous args ✔️ named args ✔️ defaulted args *args / **kwargs Classes ✔️ overloaded init ✔️ instance property ro/rw ✔️ class property ro/rw ✔️ instance attribute ✔️ class attribute Stu...
Open Graph Description: Pybind demo module Basics Functions ✔️ w/o args ✔️ anonymous args ✔️ named args ✔️ defaulted args *args / **kwargs Classes ✔️ overloaded init ✔️ instance property ro/rw ✔️ class property ro/rw ✔️ i...
X Description: Pybind demo module Basics Functions ✔️ w/o args ✔️ anonymous args ✔️ named args ✔️ defaulted args *args / **kwargs Classes ✔️ overloaded init ✔️ instance property ro/rw ✔️ class property ro/rw ✔️ i...
Opengraph URL: https://github.com/sizmailov/python_example/issues/1
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"On the way to [pybind11-mypy-demo]","articleBody":"## Pybind demo module\r\n\r\n### Basics \r\n - Functions\r\n - :heavy_check_mark: w/o args \r\n - :heavy_check_mark: anonymous args \r\n - :heavy_check_mark: named args \r\n - :heavy_check_mark: defaulted args\r\n - *args / **kwargs\r\n - Classes\r\n - :heavy_check_mark: overloaded init\r\n - :heavy_check_mark: instance property ro/rw\r\n - :heavy_check_mark: class property ro/rw\r\n - :heavy_check_mark: instance attribute\r\n - :heavy_check_mark: class attribute\r\n\r\n## Stubgen features\r\n\r\n#### Render values:\r\n- defaulted function argument values\r\n- \"builtin-valued\" attributes as is\r\n- custom type valued attributes as comments\r\n- pybind11-enum-valued attributes/arg default values\r\n- module-valued class attributes\r\n\r\n#### Render class/static members\r\n- class function \r\n- static function\r\n- :heavy_check_mark: class property -\u003e ClassVar\r\n\r\n#### Correct order of module elements\r\n- Sort classes in topo-alpha order (`ZBase` class would go before `ADerived` but `Cat` goes before `Dog`)\r\n\r\n#### Render docstrings\r\n- Add CLI option\r\n- :question: Add docstring preprocessing hooks\r\n- Strip overloads annotations \r\n\r\n#### Proper imports\r\n- Import modules as underscored aliases\r\n\r\n#### Corner cases\r\n- Skip `__hash__ = None` for non-hashable types\r\n- don't render `__init__` for non-constructable classes\r\n- [conditionally] strip `numpy.ndarray` shape info\r\n- [conditionally] strip `std::array` shape info\r\n \r\n#### Robustness to bad docstrings \r\n- [conditionally] Render C++ types in signatures as strings (arguments or/and return type)\r\n- [conditionally] Render Invalid python expression as argument default value as strings\r\n- [conditionally] Produce error/warnings on above \r\n\r\n\r\n\u003cdetails\u003e\u003csummary\u003eMisc things to test (unordered)\u003c/summary\u003e\r\n\r\n- exclude umbrella `(*args, **kwargs)` overload header from overload list\r\n- static/class functions and ro/rw properties\r\n- regular ro/rw properties\r\n- kw-only function arguments\r\n- positional-only function arguments\r\n- non-constructable types (with missing `__init__`)\r\n- numpy arrays (how to handle shape?)\r\n- don't produce import statement for nested classes\r\n- (?) exclude `__hash__ = None` line for non-hashable types that have `__eq__`\r\n- (?) test nested class argument defined in submodule\r\n- import names that not defined in module as underscored aliases\r\n- test copy/opaque pybind types (including `pybind11/stl.h` and `pybind11/stl_bind.h`)\r\n- test registered exception render\r\n- render classes in alpha-topological order (so `ZBase` class would go before `ADerived` but `Cat` goes before `Dog`)\r\n- render functions after classes\r\n- render module attributes that depend on the following classes with string types annotation (e.g. `x: 'Foo' = ...`)\r\n- fix pybind versions (e.g. replace `iterator` with `Iterator`)\r\n- skip pybind11-internal attributes\r\n- render pybind-overloaded \"magic\" python methods (e.g. `__add__`)\r\n- [optional] render docstrings\r\n\r\n\r\n\u003c/details\u003e","author":{"url":"https://github.com/sizmailov","@type":"Person","name":"sizmailov"},"datePublished":"2021-01-08T09:57:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/1/python_example/issues/1"}
| 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:c0493da0-20ec-6197-2982-7b728bce3b31 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD62:B411C:14CBA2C:1CF0753:69726E22 |
| html-safe-nonce | a0c1b13664d69bda1eaac5eb5146d9bf95503655c1db3cd9aec828ca806a4fa1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDYyOkI0MTFDOjE0Q0JBMkM6MUNGMDc1Mzo2OTcyNkUyMiIsInZpc2l0b3JfaWQiOiIzODgzMzA4NjcxMTU1OTkwMDUwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 446bb8f59328da13f7cbb3617144bad1e34cd7c0eadb9e653b9a1eeee0ce0307 |
| hovercard-subject-tag | issue:781995665 |
| 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/sizmailov/python_example/1/issue_layout |
| twitter:image | https://opengraph.githubassets.com/12844a0c540a57fb7cf5ad2b48964e13a90f11ae8c123a3f27c85e43d81351d1/sizmailov/python_example/issues/1 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/12844a0c540a57fb7cf5ad2b48964e13a90f11ae8c123a3f27c85e43d81351d1/sizmailov/python_example/issues/1 |
| og:image:alt | Pybind demo module Basics Functions ✔️ w/o args ✔️ anonymous args ✔️ named args ✔️ defaulted args *args / **kwargs Classes ✔️ overloaded init ✔️ instance property ro/rw ✔️ class property ro/rw ✔️ i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sizmailov |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3be355d8ea7ca74c4edec03a70ecaa8211862649e90886d88a4db13e6778e4c3 |
| turbo-cache-control | no-preview |
| go-import | github.com/sizmailov/python_example git https://github.com/sizmailov/python_example.git |
| octolytics-dimension-user_id | 2975991 |
| octolytics-dimension-user_login | sizmailov |
| octolytics-dimension-repository_id | 327432695 |
| octolytics-dimension-repository_nwo | sizmailov/python_example |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 50649061 |
| octolytics-dimension-repository_parent_nwo | pybind/python_example |
| octolytics-dimension-repository_network_root_id | 50649061 |
| octolytics-dimension-repository_network_root_nwo | pybind/python_example |
| 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 | 4ae5b6c1e16519c3e3ad37a388f7cca2192a79a8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width