зеркало из https://github.com/github/codeql.git
Codegen: rename `has_doc` to `has_qldoc`
This commit is contained in:
Родитель
418118fc89
Коммит
f5633be837
|
@ -141,10 +141,6 @@ class Class:
|
|||
def last_base(self) -> str:
|
||||
return self.bases[-1].base if self.bases else ""
|
||||
|
||||
@property
|
||||
def has_doc(self) -> bool:
|
||||
return bool(self.doc) or self.ql_internal
|
||||
|
||||
|
||||
@dataclass
|
||||
class SynthUnderlyingAccessor:
|
||||
|
@ -174,7 +170,7 @@ class Stub:
|
|||
return bool(self.synth_accessors)
|
||||
|
||||
@property
|
||||
def has_doc(self) -> bool:
|
||||
def has_qldoc(self) -> bool:
|
||||
return bool(self.doc) or self.ql_internal
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{#has_doc}}
|
||||
{{#has_qldoc}}
|
||||
/**
|
||||
{{#doc}}
|
||||
* {{.}}
|
||||
|
@ -7,4 +7,4 @@
|
|||
* INTERNAL: Do not use.
|
||||
{{/ql_internal}}
|
||||
*/
|
||||
{{/has_doc}}
|
||||
{{/has_qldoc}}
|
||||
|
|
|
@ -155,8 +155,8 @@ def test_class_with_children():
|
|||
([], True, True),
|
||||
])
|
||||
def test_has_doc(doc, ql_internal, expected):
|
||||
cls = ql.Class("Class", doc=doc, ql_internal=ql_internal)
|
||||
assert cls.has_doc is expected
|
||||
stub = ql.Stub("Class", base_import="foo", import_prefix="bar", doc=doc, ql_internal=ql_internal)
|
||||
assert stub.has_qldoc is expected
|
||||
|
||||
|
||||
def test_property_with_description():
|
||||
|
|
Загрузка…
Ссылка в новой задаче