Skip to content

Weird looking arg-parser logic in examples #2217

@jleibs

Description

@jleibs

The minimal example now contains the code:

_, unknown = __import__("argparse").ArgumentParser().parse_known_args()
[__import__("logging").warning(f"unknown arg: {arg}") for arg in unknown]

with no comment or other explanation.

I believe this may be a workaround to keep things from failing in conjunction with the run-all script, but this seems like the wrong approach. This complexity should be moved into the runner, not obscuring the example code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    examplesIssues relating to the Rerun examples🏎️ Quick IssueCan be fixed in a few hours or less😤 annoyingSomething in the UI / SDK is annoying to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions