Skip to content
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

Prototype a new CLI #904

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Improve Amaranth CLI message when given component name fails to match…
… regex.
  • Loading branch information
cr1901 authored and whitequark committed Oct 3, 2023
commit 1fd9388f616b08dba5b9f60c5767cdada53efb0b
3 changes: 2 additions & 1 deletion amaranth_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def component(reference):
raise argparse.ArgumentTypeError(f"'{qual_name}:{mod_name}' refers to an object that is not elaboratable")
return obj
else:
raise argparse.ArgumentTypeError(f"{reference!r} is not a Python object reference")
raise argparse.ArgumentTypeError(f"{reference!r} can not be parsed as a Python object reference, "
"expecting a name like: 'path.to.module:ObjectInModule'")

parser = argparse.ArgumentParser(
"amaranth", description="""
Expand Down