Skip to content

Commit 1d1eef8

Browse files
authored
lint (#522)
1 parent 2c21267 commit 1d1eef8

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

macros/__init__.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
from .macros import (
2-
library_table,
3-
)
1+
from .macros import library_table
42
from .main import define_env
53

64
__all__ = [

macros/macros.py

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from pathlib import Path
21
import json
2+
from pathlib import Path
33

44
import ruamel.yaml
55
from jinja2 import Environment, FileSystemLoader, select_autoescape
@@ -38,7 +38,11 @@ def library_table() -> str:
3838

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

41-
if file.is_dir() or file is None or "valueConstraints" in file.stem:
41+
if (
42+
file.is_dir()
43+
or file is None
44+
or "valueConstraints" in file.stem
45+
):
4246
continue
4347

4448
with open(file) as f:
@@ -48,9 +52,14 @@ def library_table() -> str:
4852
{
4953
"name": content["@id"],
5054
"description": (
51-
content["description"] if "description" in content else ""
55+
content["description"]
56+
if "description" in content
57+
else ""
58+
),
59+
"uri": (
60+
f"{LIBRARY_URL}/tree/master/activities/"
61+
f"{activity_path.stem}/{file.stem}{file.suffix}"
5262
),
53-
"uri": f"{LIBRARY_URL}/tree/master/activities/{activity_path.stem}/{file.stem}{file.suffix}",
5463
}
5564
)
5665

0 commit comments

Comments
 (0)