Skip to content
Snippets Groups Projects
  • Nat Goodspeed's avatar
    be0e3cb2
    MAINT-7831: Update viewer_manifest.py to use 'with self.prefix(...):' · be0e3cb2
    Nat Goodspeed authored
    Now that LLManifest.prefix() supports use as a context manager:
    
        with self.prefix(...):
            ...
    
    convert existing calls to that form.
    
    This was an interesting exercise because it surfaced at least two places where
    the indentation did not match the self.prefix() nesting, plus another place
    where existing code was undented without a self.end_prefix() call. (That last
    was an uncaught logic bug.) This underscores the value of using a SINGLE
    consistent, idiomatic mechanism to limit the scope of each self.prefix() call.
    be0e3cb2
    History
    MAINT-7831: Update viewer_manifest.py to use 'with self.prefix(...):'
    Nat Goodspeed authored
    Now that LLManifest.prefix() supports use as a context manager:
    
        with self.prefix(...):
            ...
    
    convert existing calls to that form.
    
    This was an interesting exercise because it surfaced at least two places where
    the indentation did not match the self.prefix() nesting, plus another place
    where existing code was undented without a self.end_prefix() call. (That last
    was an uncaught logic bug.) This underscores the value of using a SINGLE
    consistent, idiomatic mechanism to limit the scope of each self.prefix() call.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.