Title: Add stricter linting to CI · Issue #996 · python/typeshed · GitHub
Open Graph Title: Add stricter linting to CI · Issue #996 · python/typeshed
X Title: Add stricter linting to CI · Issue #996 · python/typeshed
Description: There are several common kinds of mistakes in typeshed code that can be detected by a static linter. I wrote a small tool the other day to detect some: https://github.com/JelleZijlstra/stublint. It currently detects certain problems with...
Open Graph Description: There are several common kinds of mistakes in typeshed code that can be detected by a static linter. I wrote a small tool the other day to detect some: https://github.com/JelleZijlstra/stublint. It...
X Description: There are several common kinds of mistakes in typeshed code that can be detected by a static linter. I wrote a small tool the other day to detect some: https://github.com/JelleZijlstra/stublint. It...
Opengraph URL: https://github.com/python/typeshed/issues/996
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add stricter linting to CI","articleBody":"There are several common kinds of mistakes in typeshed code that can be detected by a static linter. I wrote a small tool the other day to detect some: https://github.com/JelleZijlstra/stublint. It currently detects certain problems with platform and version checks, typevars that aren't marked private, extraneous code inside functions, and some missing annotations.\r\n\r\nHow should we incorporate these checks in to typeshed's CI? A few options:\r\n- Extend https://github.com/ambv/flake8-pyi with more checks (currently it doesn't add any stub-specific checks). This would automatically get us flake8 core features like control over what error codes to enable, but it would require me to rewrite much of stublint's checks.\r\n- Move stublint's code into typeshed and run it in CI. Using a single repo makes it easier to coordinate changes: we're seeing pretty frequently that changes to some subset of mypy, typing, and typeshed need to be coordinated. Putting typeshed's linter in the same repo avoids that kind of difficulty. It also makes it easier to justify writing checks that are very specific to typeshed, but overall it seems better to stick to a single linting tool (flake8) to run in CI. \r\n\r\nI feel like extending flake8-pyi is the better option, but would like to hear from others.","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2017-03-14T04:48:48Z","url":"https://github.com/python/typeshed/issues/996"}
| 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:6fac0e1a-2d9a-769c-27f9-28de9898a230 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E8A2:3430F7:2A9F69:39CC0D:6B00250C |
| html-safe-nonce | dd77d2a711f9bb11d647acc737d0818fc90f3f8cbc832bbaf107de6e2072f8e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEEyOjM0MzBGNzoyQTlGNjk6MzlDQzBEOjZCMDAyNTBDIiwidmlzaXRvcl9pZCI6Ijc3ODM3NzIzNjMzNjcxMzAzODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4aacfd1d86e17fa5a27b0925f5c4c97615477305d67db6c1f1580d2a7dd40fcd |
| hovercard-subject-tag | issue:213967971 |
| 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/996/issue_layout |
| twitter:image | https://opengraph.githubassets.com/be04ff7b0baf28b5e2b01b75c31cfcd22bf53f36a0c2c55abfd6c8a828f9f555/python/typeshed/issues/996 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/be04ff7b0baf28b5e2b01b75c31cfcd22bf53f36a0c2c55abfd6c8a828f9f555/python/typeshed/issues/996 |
| og:image:alt | There are several common kinds of mistakes in typeshed code that can be detected by a static linter. I wrote a small tool the other day to detect some: https://github.com/JelleZijlstra/stublint. It... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JelleZijlstra |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0 |
| 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 | 44c658b24abf00491fb7ae5f56d42c9f38cbeab2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width