Title: Enable `reportUnnecessaryComparison` in basedpyright by Copilot · Pull Request #1399 · usethis-python/usethis-python · GitHub
Open Graph Title: Enable `reportUnnecessaryComparison` in basedpyright by Copilot · Pull Request #1399 · usethis-python/usethis-python
X Title: Enable `reportUnnecessaryComparison` in basedpyright by Copilot · Pull Request #1399 · usethis-python/usethis-python
Description: Enables the reportUnnecessaryComparison basedpyright rule and removes the dead code/redundant conditions it surfaces.
Changes
pyproject.toml: Remove reportUnnecessaryComparison = false override.
_core/readme.py: get_project_name() returns str, never None — simplify the content-building branches, removing two dead elif/else arms.
bitbucket/pipeweld.py: ParallelItem.parallel is typed as non-optional Parallel — remove four if item.parallel is not None: guards and dedent the inner logic.
bitbucket/steps.py: StepItem.step: Step and Step1.step: Step2 are non-optional — remove two redundant if ... is not None filters from list comprehensions.
# Before — item.parallel is Parallel, never None
if item.parallel is not None:
if isinstance(item.parallel.root, schema.ParallelSteps):
...
# After
if isinstance(item.parallel.root, schema.ParallelSteps):
...
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://mirrors.aliyun.com/pypi/packages/70/1b/4273d02565a4e86f238e9fee23e6c5c3bb7b5c237c63228e1b72451db224/uv-0.9.15-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Triggering command: /home/REDACTED/work/usethis-python/usethis-python/.venv/bin/prek prek run -a ps (http block)
If you need me to access, download, or install something from one of these locations, you can either:
Configure Actions setup steps to set up my environment, which run before the firewall is enabled
Add the appropriate URLs or hosts to the custom allowlist in this repository's Copilot coding agent settings (admins only)
Original prompt
This section details on the original issue you should resolve
Open Graph Description: Enables the reportUnnecessaryComparison basedpyright rule and removes the dead code/redundant conditions it surfaces. Changes pyproject.toml: Remove reportUnnecessaryComparison = false override. _...
X Description: Enables the reportUnnecessaryComparison basedpyright rule and removes the dead code/redundant conditions it surfaces. Changes pyproject.toml: Remove reportUnnecessaryComparison = false override. _...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1399
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:578293ac-b36d-d4ba-45d4-80bc75e9bcee |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B250:F420:180821:214376:6A4DB8D4 |
| html-safe-nonce | 6eae7abc9b3abc246b0f956e713187fba2119224ca376a7ca3d41b91f406d213 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjUwOkY0MjA6MTgwODIxOjIxNDM3Njo2QTREQjhENCIsInZpc2l0b3JfaWQiOiI4NjA1NTU2NzY4NTIzNTMyNTAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1577e9fbabf6f29b4fd6a504af0eb4cd968721d68e5d08ad487931856f590cca |
| hovercard-subject-tag | pull_request:3392524866 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/usethis-python/usethis-python/pull/1399/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | Enables the reportUnnecessaryComparison basedpyright rule and removes the dead code/redundant conditions it surfaces. Changes pyproject.toml: Remove reportUnnecessaryComparison = false override. _... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 32f7b614aca06e6bbd89842b1370df1328264f68 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width