Skip to content

Commit

Permalink
In the contentsmanager we must use get() to load the pyproject.toml file
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Aug 31, 2021
1 parent d466514 commit 23d28d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jupytext/contentsmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,10 @@ def get_config_file(self, directory):
if self.file_exists(pyproject_path):
import toml

with open(pyproject_path, "r") as stream:
doc = toml.loads(stream.read())
if doc.get("tool", {}).get("jupytext") is not None:
return pyproject_path
model = self.get(pyproject_path, type="file")
doc = toml.loads(model["content"])
if doc.get("tool", {}).get("jupytext") is not None:
return pyproject_path

if not directory:
return None
Expand Down

0 comments on commit 23d28d3

Please sign in to comment.