-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: subpath bad matching #202
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #202 +/- ##
==========================================
- Coverage 82.66% 82.59% -0.07%
==========================================
Files 27 27
Lines 3242 3241 -1
Branches 671 672 +1
==========================================
- Hits 2680 2677 -3
- Misses 344 345 +1
- Partials 218 219 +1
☔ View full report in Codecov by Sentry. |
Any base path matched by a subpath with a different root will also return the nodes of the subpath (which is obviously erroneous)
f4bc029
to
f1e651e
Compare
f1e651e
to
9107ff1
Compare
Hmm i'm not sure what Codecov means by "Consider uploading the report" |
I think this change is fine. I would like Mike to take a look at it though since it has potential impact to supervisor |
Any news ? |
I chatted with Mike about this earlier this week. He hasn't had time to test it yet |
any updates ? |
This LGTM. I can't see this causing a problem. |
Although uncommon, i saw nothing in the dbus spec forbidding sub-path matching possible parent paths.
Current implementation of Introspect assumes this is the case though resulting in path being presented where they are not for instance instrospect on
/a
returning subnodesb
andd
when the registered paths are/a/b
and/c/a/d
This mr tests and fixes the issue.
Note: a more efficient way to fix would have been to use str.removeprefix but it is only available from python3.9.