CodeQL library for Python
Search

Class TypeHintComment

A type-hint comment. Any comment that starts with # type:

Import path

import python

Direct supertypes

Indirect supertypes

Inherited predicates

getContents

Gets the contents of the comment excluding the leading ‘#’

from Comment
getFollowing

Gets this immediately following comment. Blanks line are allowed between this comment and the following comment, but code or other comments are not.

from Comment
getLocationfrom Comment
getText

Gets the full text of the comment including the leading ‘#’

from Comment
toString

Gets a textual representation of this element.

from Comment

Charpred