Skip to content

Commit 2d34fec

Browse files
committed
Codegen: remove unneeded has_description property
1 parent 9264b2a commit 2d34fec

File tree

4 files changed

+0
-20
lines changed

4 files changed

+0
-20
lines changed

misc/codegen/lib/ql.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ def is_single(self):
8181
def is_child(self):
8282
return self.prev_child is not None
8383

84-
@property
85-
def has_description(self) -> bool:
86-
return bool(self.description)
87-
8884
@property
8985
def is_indexed(self) -> bool:
9086
return self.is_repeated and not self.is_unordered

misc/codegen/templates/ql_class.mustache

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,9 @@ module Generated {
8383

8484
/**
8585
* {{>ql_property_doc}} *
86-
{{#has_description}}
8786
{{#description}}
8887
* {{.}}
8988
{{/description}}
90-
{{/has_description}}
9189
*/
9290
final {{type}} {{getter}}({{#is_indexed}}int index{{/is_indexed}}) {
9391
exists({{type}} immediate | immediate = this.get{{#is_unordered}}An{{/is_unordered}}Immediate{{singular}}({{#is_indexed}}index{{/is_indexed}}) and
@@ -98,11 +96,9 @@ module Generated {
9896
{{^type_is_hideable}}
9997
/**
10098
* {{>ql_property_doc}} *
101-
{{#has_description}}
10299
{{#description}}
103100
* {{.}}
104101
{{/description}}
105-
{{/has_description}}
106102
*/
107103
{{type}} {{getter}}({{#is_indexed}}int index{{/is_indexed}}) {
108104
{{^synth}}

misc/codegen/templates/ql_db.mustache

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ module Raw {
1818
{{^synth}}
1919
/**
2020
* {{>ql_property_doc}} *
21-
{{#has_description}}
2221
{{#description}}
2322
* {{.}}
2423
{{/description}}
25-
{{/has_description}}
2624
*/
2725
{{type}} {{getter}}({{#is_indexed}}int index{{/is_indexed}}) {
2826
{{tablename}}({{#tableparams}}{{^first}}, {{/first}}{{param}}{{/tableparams}})

misc/codegen/test/test_ql.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,6 @@ def test_has_doc(doc, internal, expected):
159159
assert stub.has_qldoc is expected
160160

161161

162-
def test_property_with_description():
163-
prop = ql.Property("X", "int", description=["foo", "bar"])
164-
assert prop.has_description is True
165-
166-
167-
def test_class_without_description():
168-
prop = ql.Property("X", "int")
169-
assert prop.has_description is False
170-
171-
172162
def test_synth_accessor_has_first_constructor_param_marked():
173163
params = ["a", "b", "c"]
174164
x = ql.SynthUnderlyingAccessor("foo", "bar", params)

0 commit comments

Comments
 (0)