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

Identify duplicate key in error message #622

Closed
crabba opened this issue Dec 28, 2022 · 0 comments
Closed

Identify duplicate key in error message #622

crabba opened this issue Dec 28, 2022 · 0 comments
Labels
devex Developers, developers, developers (developer experience)
Projects

Comments

@crabba
Copy link

crabba commented Dec 28, 2022

It would be helpful to identify which key is duplicated, when reporting duplicate keys in e.g. run inputs

raise Error.MultipleDefinitions(self._sp(meta), "duplicate keys in call inputs")

Current:

        d = dict()
        for k, v in items:
            if k in d:
                raise Error.MultipleDefinitions(self._sp(meta), "duplicate keys in call inputs")
            d[k] = v

Suggested:

                raise Error.MultipleDefinitions(self._sp(meta), f"duplicate key '{k}' in call inputs")
mlin added a commit that referenced this issue Jan 16, 2023
@mlin mlin added the devex Developers, developers, developers (developer experience) label Jan 28, 2023
@mlin mlin added this to Backlog in miniwdl via automation Jan 28, 2023
@mlin mlin moved this from Backlog to Pending release in miniwdl Jan 28, 2023
@mlin mlin closed this as completed Jan 28, 2023
miniwdl automation moved this from Pending release to Done Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devex Developers, developers, developers (developer experience)
Projects
miniwdl
  
Done
Development

No branches or pull requests

2 participants