Skip to content

ngclient: review _preorder_depth_first_walk() #1398

@jku

Description

@jku

This is for the new client that's currently in experimental-client branch: but I'm hoping this issue is handled after the experimental client is merged to develop

We've not touched _preorder_depth_first_walk() or _visit_child_role() yet: they need some love:
First things:

  • type annotations would make the whole thing a lot easier to read and reason about
  • docstrings are old style
  • evaluate if some functionality could/should be in API (e.g. in DelegatedRole)

Then maybe:

  • maybe the code can be made simpler?
  • review the use of fnmatch(): it seems a bit suspicious (again using filesystem path functions for what I think are url fragments)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions