Skip to content

Commit

Permalink
Check if pyproject has ipdb config first
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebarbaruiva authored and gotcha committed Mar 8, 2021
1 parent 69ed8d9 commit 1056bd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ipdb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ def get_config():
elif filepath.endswith('pyproject.toml'):
import toml
toml_file = toml.load(filepath)
parser["ipdb"] = toml_file["tool"].get("ipdb")
if "ipdb" in toml_file["tool"]:
parser["ipdb"] = toml_file["tool"]["ipdb"]
else:
read_func(ConfigFile(filepath))
return parser
Expand Down

0 comments on commit 1056bd1

Please sign in to comment.