Title: [DISCUSSION] Adding public submodules to `__all__` · Issue #2763 · python-telegram-bot/python-telegram-bot · GitHub
Open Graph Title: [DISCUSSION] Adding public submodules to `__all__` · Issue #2763 · python-telegram-bot/python-telegram-bot
X Title: [DISCUSSION] Adding public submodules to `__all__` · Issue #2763 · python-telegram-bot/python-telegram-bot
Description: What kind of feature are you missing? Where do you notice a shortcoming of PTB? Currently, in the v14 branch we for e.g do: from telegram import error. But if a user does from telegram import *, it does not import the public submodule er...
Open Graph Description: What kind of feature are you missing? Where do you notice a shortcoming of PTB? Currently, in the v14 branch we for e.g do: from telegram import error. But if a user does from telegram import *, it...
X Description: What kind of feature are you missing? Where do you notice a shortcoming of PTB? Currently, in the v14 branch we for e.g do: from telegram import error. But if a user does from telegram import *, it...
Opengraph URL: https://github.com/python-telegram-bot/python-telegram-bot/issues/2763
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[DISCUSSION] Adding public submodules to `__all__`","articleBody":"### What kind of feature are you missing? Where do you notice a shortcoming of PTB?\r\n\r\nCurrently, in the v14 branch we for e.g do: `from telegram import error`. But if a user does `from telegram import *`, it does not import the public submodule `error`, when it should.\r\n\r\n[PEP-8](https://www.python.org/dev/peps/pep-0008/#public-and-internal-interfaces) says that documented interfaces are considered public and `\"To better support introspection, modules should explicitly declare the names in their public API using the __all__ attribute.\"`.\r\n\r\nAdditionally, PEP-8 also says that `__all__` should be placed [_above_](https://www.python.org/dev/peps/pep-0008/#module-level-dunder-names) the imports.\r\n\r\n### Describe the solution you'd like\r\n\r\nImport and add public submodules to `__all__`, place `__all__` above imports.\r\n\r\n#### Additional context\r\n\r\nOriginal discussion: https://github.com/python-telegram-bot/python-telegram-bot/pull/2759#discussion_r740045558\r\n","author":{"url":"https://github.com/harshil21","@type":"Person","name":"harshil21"},"datePublished":"2021-11-04T12:03:35Z","url":"https://github.com/python-telegram-bot/python-telegram-bot/issues/2763"}
| 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:e0b57066-8297-a898-6ceb-6326bce4ef52 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9060:1773CF:B9950C:F3D702:6B026CC4 |
| html-safe-nonce | d966b16efe3a31a91bd38e1b543e6307a977c1cc35ec496b4cd07bf51b81bb8a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDYwOjE3NzNDRjpCOTk1MEM6RjNENzAyOjZCMDI2Q0M0IiwidmlzaXRvcl9pZCI6Ijc5ODY0OTMwNjMwOTY4NTU3NDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 188672aa7298c8f535064336f99ada92777b12c938c2ae00fafd3db9e646dc4e |
| hovercard-subject-tag | issue:1044692033 |
| 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-telegram-bot/python-telegram-bot/2763/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8ae0d477bd468f653da76d96a65e8f9a40f79cc7a26d5a2b8302ff7b54efe52c/python-telegram-bot/python-telegram-bot/issues/2763 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8ae0d477bd468f653da76d96a65e8f9a40f79cc7a26d5a2b8302ff7b54efe52c/python-telegram-bot/python-telegram-bot/issues/2763 |
| og:image:alt | What kind of feature are you missing? Where do you notice a shortcoming of PTB? Currently, in the v14 branch we for e.g do: from telegram import error. But if a user does from telegram import *, it... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | harshil21 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-telegram-bot/python-telegram-bot git https://github.com/python-telegram-bot/python-telegram-bot.git |
| octolytics-dimension-user_id | 16178365 |
| octolytics-dimension-user_login | python-telegram-bot |
| octolytics-dimension-repository_id | 38696925 |
| octolytics-dimension-repository_nwo | python-telegram-bot/python-telegram-bot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 38696925 |
| octolytics-dimension-repository_network_root_nwo | python-telegram-bot/python-telegram-bot |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width