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

Bug: Parsing ~/.ipdb breaks if [ipdb] section is manually added #230

Open
zachriggle opened this issue Jul 20, 2021 · 1 comment
Open

Bug: Parsing ~/.ipdb breaks if [ipdb] section is manually added #230

zachriggle opened this issue Jul 20, 2021 · 1 comment

Comments

@zachriggle
Copy link

zachriggle commented Jul 20, 2021

Thanks @gotcha for your excellent debugger tool, ipdb.

I'm playing around with extending some of the features of the configuration parser (see other GH issues I'm filing later today).

The first issue that I've run into is that, to save the user effort, the ipdb section of the config file is automatically created, and all configuration entries are read in under that.

This means that this works:

context=10

But this breaks with a DuplicateSectionError:

[ipdb]
context=10

While this syntactical sugar is very convenient, it does make some things I'm planning more difficult. Would you be amenable to having the secondary syntax also valid? It would require only minor modification to __main__.ConfigFile to check whether the regex r'^[ipdb]$' appears anywhere in the read config file.

Note: I would create a Pull Request for this, as it seems to be a simple change, but my employer bans me from contributing to FOSS projects.

@alexandrebarbaruiva
Copy link
Contributor

Hello, @zachriggle, what advantage does having [ipdb] inside a .ipdb file presents? I'd assume a .ipdb file has only ipdb related configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants