Skip to content

Commit 0287f36

Browse files
committed
only show non-var affixes in affix table
1 parent e5576cc commit 0287f36

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

pyconlang/book/conlang/dictionary.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def show_entry(self, entry: Entry) -> str:
102102
]
103103

104104
return (
105-
", ".join(forms)
106-
+ f" [ph({scope} {form})] pr[{scope} {form}] {entry.description()}"
105+
", ".join(forms)
106+
+ f" [ph({scope} {form})] pr[{scope} {form}] {entry.description()}"
107107
)
108108

109109
@staticmethod
@@ -147,9 +147,12 @@ def show_scope(self, scope: Scope) -> list[str]:
147147
return ["|Affix|Description|Sources|", "|-|-|-|"] + list(
148148
map(
149149
self.show_affix,
150-
sorted(
151-
self.translator.lexicon.affix_mapping[scope].values(),
152-
key=lambda affix: affix.description,
150+
filter(
151+
lambda affix: not affix.is_var(), # todo: should var affixes also work?
152+
sorted(
153+
self.translator.lexicon.affix_mapping[scope].values(),
154+
key=lambda affix: affix.description,
155+
)
153156
),
154157
)
155158
)

0 commit comments

Comments
 (0)