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

[STY] apply linting on all files #522

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading