Skip to content

Commit

Permalink
rich -> data
Browse files Browse the repository at this point in the history
  • Loading branch information
fmatter committed Oct 13, 2023
1 parent 5bf9a3e commit 113e251
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* project template
* a bug with the `--targets` argument
* `landingpage.md`
* `rich` option automatically makes `data` true

## [0.1.0] - 2023-10-12

Expand Down
6 changes: 6 additions & 0 deletions src/pylingdocs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Config:
def __init__(self):
self.data = load(DATA_DIR / "config.yaml")
self.fix_paths()
self.dependents()

def load_from_dir(self, path="."):
locp = Path(path) / "config.yaml"
Expand All @@ -48,6 +49,11 @@ def load_from_dir(self, path="."):
else:
log.warning(f"No config file found at {locp}")
self.fix_paths()
self.dependents()

def dependents(self):
if self.data["output"]["rich"]:
self.data["output"]["data"] = True

def fix_paths(self):
for k, v in self.data["paths"].items():
Expand Down

0 comments on commit 113e251

Please sign in to comment.