Skip to content

Commit f5633be

Browse files
committed
Codegen: rename has_doc to has_qldoc
1 parent 418118f commit f5633be

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

misc/codegen/lib/ql.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ def has_children(self) -> bool:
141141
def last_base(self) -> str:
142142
return self.bases[-1].base if self.bases else ""
143143

144-
@property
145-
def has_doc(self) -> bool:
146-
return bool(self.doc) or self.ql_internal
147-
148144

149145
@dataclass
150146
class SynthUnderlyingAccessor:
@@ -174,7 +170,7 @@ def has_synth_accessors(self) -> bool:
174170
return bool(self.synth_accessors)
175171

176172
@property
177-
def has_doc(self) -> bool:
173+
def has_qldoc(self) -> bool:
178174
return bool(self.doc) or self.ql_internal
179175

180176

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{#has_doc}}
1+
{{#has_qldoc}}
22
/**
33
{{#doc}}
44
* {{.}}
@@ -7,4 +7,4 @@
77
* INTERNAL: Do not use.
88
{{/ql_internal}}
99
*/
10-
{{/has_doc}}
10+
{{/has_qldoc}}

misc/codegen/test/test_ql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ def test_class_with_children():
155155
([], True, True),
156156
])
157157
def test_has_doc(doc, ql_internal, expected):
158-
cls = ql.Class("Class", doc=doc, ql_internal=ql_internal)
159-
assert cls.has_doc is expected
158+
stub = ql.Stub("Class", base_import="foo", import_prefix="bar", doc=doc, ql_internal=ql_internal)
159+
assert stub.has_qldoc is expected
160160

161161

162162
def test_property_with_description():

0 commit comments

Comments
 (0)