René's URL Explorer Experiment


Title: Respect Ruff rule code hierarchy in select/ignore lists by Copilot · Pull Request #1527 · usethis-python/usethis-python · GitHub

Open Graph Title: Respect Ruff rule code hierarchy in select/ignore lists by Copilot · Pull Request #1527 · usethis-python/usethis-python

X Title: Respect Ruff rule code hierarchy in select/ignore lists by Copilot · Pull Request #1527 · usethis-python/usethis-python

Description: Add is_rule_covered_by() and reconcile_rules() helpers in _tool/rule.py Introduce RuleReconciliation frozen dataclass (replaces tuple return) Update select_rules / ignore_rules in _tool/base.py to use reconciliation Update ignore_rules_in_glob in _tool/impl/base/ruff.py to use reconciliation Fix bug: startswith was too crude — now requires a digit boundary after prefix match (e.g. F covers F101 but not FLY) Add tests for cross-group scenarios (FLY vs F, FLY001 vs F, F101 vs F1) Run full static checks and verify Original prompt This section details on the original issue you should resolve Respect Ruff rule code hierarchy If Ruff selection contains "ALL" then we're already selecting all rules! There's not need to explicitly select another rule, it just gets "absorbed" into this "wildcard" style rule. Similarly, if we want to select a specific rule code like TC001 then if there's already the rule code group like TC then there's no point adding it - we shouldn't. It also goes the other way. We should replace a less general rule with a more general one. If we want to select TC and there's already TC001 then we should replace TC001 with TC. All these principles also apply to ignores! And per-file ignores! Any time there's a list of ruff rules. We should probably keep the current level of abstraction which manages the raw rule lists, but basically move that into helper methods, and so we can add some smart logic on top that manages the hierarchy between rule codes. It is safe to assume that all rule codes follow this pattern - not just Ruff. Comments on the Issue (you are @copilot in this section) Fixes #1526 ✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Open Graph Description: Add is_rule_covered_by() and reconcile_rules() helpers in _tool/rule.py Introduce RuleReconciliation frozen dataclass (replaces tuple return) Update select_rules / ignore_rules in _tool/base.py t...

X Description: Add is_rule_covered_by() and reconcile_rules() helpers in _tool/rule.py Introduce RuleReconciliation frozen dataclass (replaces tuple return) Update select_rules / ignore_rules in _tool/base.py t...

Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1527

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:572e4132-cd3a-5501-14f3-cd945b9c9563
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA83A:3C7284:4ADA1:64EA4:6A4D7DD8
html-safe-nonce9b20ec2f2f5fbdf06c52baef4c889e4a58ef48edb2ca6ff6780bb9ac4061e4c2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODNBOjNDNzI4NDo0QURBMTo2NEVBNDo2QTREN0REOCIsInZpc2l0b3JfaWQiOiI2NDM5MDUyMjA5MzEzMTE5NzA0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7cda172a923816adb9f87e30cf301f564b4a29dc487412c8824d4edc734f17df
hovercard-subject-tagpull_request:3442652628
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/usethis-python/usethis-python/pull/1527/files
twitter:imagehttps://avatars.githubusercontent.com/in/1143301?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/in/1143301?s=400&v=4
og:image:altAdd is_rule_covered_by() and reconcile_rules() helpers in _tool/rule.py Introduce RuleReconciliation frozen dataclass (replaces tuple return) Update select_rules / ignore_rules in _tool/base.py t...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7f8e15305e2ab58890ca84b830615e375f5df303cf471cafcba0c08272981be3
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git
octolytics-dimension-user_id216362695
octolytics-dimension-user_loginusethis-python
octolytics-dimension-repository_id842189705
octolytics-dimension-repository_nwousethis-python/usethis-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id842189705
octolytics-dimension-repository_network_root_nwousethis-python/usethis-python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8608b0750fc35e283e5ec5b094bff942d7a0e197
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/usethis-python/usethis-python/pull/1527/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fusethis-python%2Fusethis-python%2Fpull%2F1527%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fusethis-python%2Fusethis-python%2Fpull%2F1527%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=usethis-python%2Fusethis-python
Reloadhttps://github.com/usethis-python/usethis-python/pull/1527/files
Reloadhttps://github.com/usethis-python/usethis-python/pull/1527/files
Reloadhttps://github.com/usethis-python/usethis-python/pull/1527/files
Please reload this pagehttps://github.com/usethis-python/usethis-python/pull/1527/files
usethis-python https://github.com/usethis-python
usethis-pythonhttps://github.com/usethis-python/usethis-python
Notifications https://github.com/login?return_to=%2Fusethis-python%2Fusethis-python
Fork 5 https://github.com/login?return_to=%2Fusethis-python%2Fusethis-python
Star 19 https://github.com/login?return_to=%2Fusethis-python%2Fusethis-python
Code https://github.com/usethis-python/usethis-python
Issues 163 https://github.com/usethis-python/usethis-python/issues
Pull requests 4 https://github.com/usethis-python/usethis-python/pulls
Actions https://github.com/usethis-python/usethis-python/actions
Security and quality 0 https://github.com/usethis-python/usethis-python/security
Insights https://github.com/usethis-python/usethis-python/pulse
Code https://github.com/usethis-python/usethis-python
Issues https://github.com/usethis-python/usethis-python/issues
Pull requests https://github.com/usethis-python/usethis-python/pulls
Actions https://github.com/usethis-python/usethis-python/actions
Security and quality https://github.com/usethis-python/usethis-python/security
Insights https://github.com/usethis-python/usethis-python/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fusethis-python%2Fusethis-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fusethis-python%2Fusethis-python%2Fissues%2Fnew%2Fchoose
nathanjmcdougallhttps://github.com/nathanjmcdougall
mainhttps://github.com/usethis-python/usethis-python/tree/main
copilot/respect-ruff-rule-hierarchyhttps://github.com/usethis-python/usethis-python/tree/copilot/respect-ruff-rule-hierarchy
Conversation 7 https://github.com/usethis-python/usethis-python/pull/1527
Commits 6 https://github.com/usethis-python/usethis-python/pull/1527/commits
Checks 20 https://github.com/usethis-python/usethis-python/pull/1527/checks
Files changed https://github.com/usethis-python/usethis-python/pull/1527/files
Please reload this pagehttps://github.com/usethis-python/usethis-python/pull/1527/files
Respect Ruff rule code hierarchy in select/ignore lists https://github.com/usethis-python/usethis-python/pull/1527/files#top
Show all changes 6 commits https://github.com/usethis-python/usethis-python/pull/1527/files
7a02298 Initial plan Copilot Mar 25, 2026 https://github.com/usethis-python/usethis-python/pull/1527/commits/7a02298fafa77ac1e29ec596ec93e3eb4fa31ecc
ab0c2c3 Add rule code hierarchy support to select_rules, ignore_rules, and ig… Copilot Mar 25, 2026 https://github.com/usethis-python/usethis-python/pull/1527/commits/ab0c2c3088638cdddc175d0bc97d1a4384b17c1b
8474a4e Fix ruff ERA001 lint error in test comments Copilot Mar 25, 2026 https://github.com/usethis-python/usethis-python/pull/1527/commits/8474a4ed9b9fe2e464874c9578198878972e7554
27ddb5e Merge branch 'main' into copilot/respect-ruff-rule-hierarchy nathanjmcdougall Mar 25, 2026 https://github.com/usethis-python/usethis-python/pull/1527/commits/27ddb5ebcc3c758018d6ba7c5274fd64d6173341
397f896 Replace tuple return from reconcile_rules with RuleReconciliation dat… Copilot Mar 25, 2026 https://github.com/usethis-python/usethis-python/pull/1527/commits/397f896bbcb2dccc4534d408d577980a99fc337d
794435e Fix rule hierarchy bug: FLY is not a subrule of F, require digit boun… Copilot Mar 25, 2026 https://github.com/usethis-python/usethis-python/pull/1527/commits/794435e0483dd2fa64df040e91ce8eeee1fd4642
Clear filters https://github.com/usethis-python/usethis-python/pull/1527/files
Please reload this pagehttps://github.com/usethis-python/usethis-python/pull/1527/files
Please reload this pagehttps://github.com/usethis-python/usethis-python/pull/1527/files
base.py https://github.com/usethis-python/usethis-python/pull/1527/files#diff-5d6bc423e5b313d5aeba5e063fcde573c808a3df7738ed68bb94d82b92a005d7
ruff.py https://github.com/usethis-python/usethis-python/pull/1527/files#diff-1207f8995d85f8d91f298b914c3395c8b8b8e35075e3937f007c3dda4c5180b5
rule.py https://github.com/usethis-python/usethis-python/pull/1527/files#diff-343a5067cfb9f35c9a01b7d1409e061ab9b7af5322301aee3a1ff3b0ab22cfce
test_ruff.py https://github.com/usethis-python/usethis-python/pull/1527/files#diff-b2f7ed409e59821eda2a702039dbd41d3cdf664c804e1e392db2b28031c4b391
test_rule.py https://github.com/usethis-python/usethis-python/pull/1527/files#diff-44d6062d2b041e7156f77a8daadbf2a466f156b5cffeb034294259a872b1b946
src/usethis/_tool/base.pyhttps://github.com/usethis-python/usethis-python/pull/1527/files#diff-5d6bc423e5b313d5aeba5e063fcde573c808a3df7738ed68bb94d82b92a005d7
View file https://github.com/usethis-python/usethis-python/blob/794435e0483dd2fa64df040e91ce8eeee1fd4642/src/usethis/_tool/base.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/usethis-python/usethis-python/pull/1527/{{ revealButtonHref }}
https://github.com/usethis-python/usethis-python/pull/1527/files#diff-5d6bc423e5b313d5aeba5e063fcde573c808a3df7738ed68bb94d82b92a005d7
https://github.com/usethis-python/usethis-python/pull/1527/files#diff-5d6bc423e5b313d5aeba5e063fcde573c808a3df7738ed68bb94d82b92a005d7
https://github.com/usethis-python/usethis-python/pull/1527/files#diff-5d6bc423e5b313d5aeba5e063fcde573c808a3df7738ed68bb94d82b92a005d7
https://github.com/usethis-python/usethis-python/pull/1527/files#diff-5d6bc423e5b313d5aeba5e063fcde573c808a3df7738ed68bb94d82b92a005d7
https://github.com/usethis-python/usethis-python/pull/1527/files#diff-5d6bc423e5b313d5aeba5e063fcde573c808a3df7738ed68bb94d82b92a005d7
https://github.com/usethis-python/usethis-python/pull/1527/files#diff-5d6bc423e5b313d5aeba5e063fcde573c808a3df7738ed68bb94d82b92a005d7
src/usethis/_tool/impl/base/ruff.pyhttps://github.com/usethis-python/usethis-python/pull/1527/files#diff-1207f8995d85f8d91f298b914c3395c8b8b8e35075e3937f007c3dda4c5180b5
View file https://github.com/usethis-python/usethis-python/blob/794435e0483dd2fa64df040e91ce8eeee1fd4642/src/usethis/_tool/impl/base/ruff.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/usethis-python/usethis-python/pull/1527/{{ revealButtonHref }}
https://github.com/usethis-python/usethis-python/pull/1527/files#diff-1207f8995d85f8d91f298b914c3395c8b8b8e35075e3937f007c3dda4c5180b5
https://github.com/usethis-python/usethis-python/pull/1527/files#diff-1207f8995d85f8d91f298b914c3395c8b8b8e35075e3937f007c3dda4c5180b5
https://github.com/usethis-python/usethis-python/pull/1527/files#diff-1207f8995d85f8d91f298b914c3395c8b8b8e35075e3937f007c3dda4c5180b5
https://github.com/usethis-python/usethis-python/pull/1527/files#diff-1207f8995d85f8d91f298b914c3395c8b8b8e35075e3937f007c3dda4c5180b5
src/usethis/_tool/rule.pyhttps://github.com/usethis-python/usethis-python/pull/1527/files#diff-343a5067cfb9f35c9a01b7d1409e061ab9b7af5322301aee3a1ff3b0ab22cfce
View file https://github.com/usethis-python/usethis-python/blob/794435e0483dd2fa64df040e91ce8eeee1fd4642/src/usethis/_tool/rule.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/usethis-python/usethis-python/pull/1527/{{ revealButtonHref }}
https://github.com/usethis-python/usethis-python/pull/1527/files#diff-343a5067cfb9f35c9a01b7d1409e061ab9b7af5322301aee3a1ff3b0ab22cfce
Please reload this pagehttps://github.com/usethis-python/usethis-python/pull/1527/files
Please reload this pagehttps://github.com/usethis-python/usethis-python/pull/1527/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.