Title: Add some basic typechecking support by davidshepherd7 · Pull Request #162 · python-smpplib/python-smpplib · GitHub
Open Graph Title: Add some basic typechecking support by davidshepherd7 · Pull Request #162 · python-smpplib/python-smpplib
X Title: Add some basic typechecking support by davidshepherd7 · Pull Request #162 · python-smpplib/python-smpplib
Description: Hi! Are you interested in having type checking for this project? I've been using some type definitions for my own work using the library and figured it would be nice to merge them upstream. So I started out doing that but got a bit carried away and added types for almost everything except the Command objects. I've mostly tried to avoid modifying any code in order to add typechecking. The major exception is that I removed python 2 support because it makes specifying types much easier. I hope that's ok! Other interesting changes: I added a few assertions on the type of things where we would crash anyway, these keep the type checker happy. I was a bit nervous about the (minor) PDU parsing/generating code changes, so I wrote some more unit tests for it. I needed to re-implement #132 to get the tests working. If there are specific changes that you don't want I'm happy to send separate smaller PRs. I did it all as one here because some of the changes rely on each other. If you're happy with this then I can also try to work out a way to add types for the command objects, I think it will be possible with a bit of manual work (and/or keyboard macros).
Open Graph Description: Hi! Are you interested in having type checking for this project? I've been using some type definitions for my own work using the library and figured it would be nice to merge them upstream. So ...
X Description: Hi! Are you interested in having type checking for this project? I've been using some type definitions for my own work using the library and figured it would be nice to merge them upstream....
Opengraph URL: https://github.com/python-smpplib/python-smpplib/pull/162
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:b6f03cfa-a614-55e3-07b9-b15e0540ba34 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | DFD0:D6BAD:53C8A33:7175A3C:697364F5 |
| html-safe-nonce | 49efd4e31f35445e75a9db5fc8b0fcc8ed872431f92af36b3bf99c3841e25b2f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkQwOkQ2QkFEOjUzQzhBMzM6NzE3NUEzQzo2OTczNjRGNSIsInZpc2l0b3JfaWQiOiIyNTY0OTY5NzU2NzI4OTc2NjI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2cf42d4131c5071f0fedffca7aa26d7120313f53966d8de84a491355b972b188 |
| hovercard-subject-tag | pull_request:721948877 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/python-smpplib/python-smpplib/pull/162/checks |
| twitter:image | https://avatars.githubusercontent.com/u/795860?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/795860?s=400&v=4 |
| og:image:alt | Hi! Are you interested in having type checking for this project? I've been using some type definitions for my own work using the library and figured it would be nice to merge them upstream. So ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4cf879a11b0a28a85543899a36aaee9ec9ca2fb7bedad86c0da5731193c95f01 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-smpplib/python-smpplib git https://github.com/python-smpplib/python-smpplib.git |
| octolytics-dimension-user_id | 45378833 |
| octolytics-dimension-user_login | python-smpplib |
| octolytics-dimension-repository_id | 9441405 |
| octolytics-dimension-repository_nwo | python-smpplib/python-smpplib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9441405 |
| octolytics-dimension-repository_network_root_nwo | python-smpplib/python-smpplib |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fe8be790582ef7a55477ce1918ac0ed16b106d31 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width