Skip to content

Commit

Permalink
lint (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau authored Jun 20, 2024
1 parent 2c21267 commit 1d1eef8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 1 addition & 3 deletions macros/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from .macros import (
library_table,
)
from .macros import library_table
from .main import define_env

__all__ = [
Expand Down
17 changes: 13 additions & 4 deletions macros/macros.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pathlib import Path
import json
from pathlib import Path

import ruamel.yaml
from jinja2 import Environment, FileSystemLoader, select_autoescape
Expand Down Expand Up @@ -38,7 +38,11 @@ def library_table() -> str:

for file in activity_path.glob("*"):

if file.is_dir() or file is None or "valueConstraints" in file.stem:
if (
file.is_dir()
or file is None
or "valueConstraints" in file.stem
):
continue

with open(file) as f:
Expand All @@ -48,9 +52,14 @@ def library_table() -> str:
{
"name": content["@id"],
"description": (
content["description"] if "description" in content else ""
content["description"]
if "description" in content
else ""
),
"uri": (
f"{LIBRARY_URL}/tree/master/activities/"
f"{activity_path.stem}/{file.stem}{file.suffix}"
),
"uri": f"{LIBRARY_URL}/tree/master/activities/{activity_path.stem}/{file.stem}{file.suffix}",
}
)

Expand Down

0 comments on commit 1d1eef8

Please sign in to comment.