Skip to content

Commit

Permalink
generate types
Browse files Browse the repository at this point in the history
  • Loading branch information
predragnikolic committed Apr 16, 2024
1 parent ef522a8 commit 6819c68
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
24 changes: 12 additions & 12 deletions lsp_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RegExp = str


class SemanticTokenTypes(Enum):
class SemanticTokenTypes(StrEnum):
""" A set of predefined token types. This set is not fixed
an clients can specify additional token types via the
corresponding client capabilities.
Expand Down Expand Up @@ -46,7 +46,7 @@ class SemanticTokenTypes(Enum):
""" @since 3.17.0 """


class SemanticTokenModifiers(Enum):
class SemanticTokenModifiers(StrEnum):
""" A set of predefined token modifiers. This set is not fixed
an clients can specify additional token types via the
corresponding client capabilities.
Expand All @@ -64,7 +64,7 @@ class SemanticTokenModifiers(Enum):
DefaultLibrary = 'defaultLibrary'


class DocumentDiagnosticReportKind(Enum):
class DocumentDiagnosticReportKind(StrEnum):
""" The document diagnostic report kinds.
@since 3.17.0 """
Expand Down Expand Up @@ -165,7 +165,7 @@ class SymbolTag(IntEnum):
""" Render a symbol as obsolete, usually using a strike-out. """


class UniquenessLevel(Enum):
class UniquenessLevel(StrEnum):
""" Moniker uniqueness level to define scope of the moniker.
@since 3.16.0 """
Expand All @@ -181,7 +181,7 @@ class UniquenessLevel(Enum):
""" The moniker is globally unique """


class MonikerKind(Enum):
class MonikerKind(StrEnum):
""" The moniker kind.
@since 3.16.0 """
Expand Down Expand Up @@ -405,7 +405,7 @@ class TraceValue(Enum):
""" Verbose message tracing. """


class MarkupKind(Enum):
class MarkupKind(StrEnum):
""" Describes the content type that a client supports in various
result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
Expand All @@ -417,7 +417,7 @@ class MarkupKind(Enum):
""" Markdown is supported as a content format """


class LanguageKind(Enum):
class LanguageKind(StrEnum):
""" Predefined Language kinds
@since 3.18.0
@proposed """
Expand Down Expand Up @@ -500,7 +500,7 @@ class InlineCompletionTriggerKind(IntEnum):
""" Completion was triggered automatically while editing. """


class PositionEncodingKind(Enum):
class PositionEncodingKind(StrEnum):
""" A set of predefined position encoding kinds.
@since 3.17.0 """
Expand Down Expand Up @@ -602,7 +602,7 @@ class CodeActionTriggerKind(IntEnum):
also be triggered when file content changes. """


class FileOperationPatternKind(Enum):
class FileOperationPatternKind(StrEnum):
""" A pattern kind describing if a glob pattern matches a file a folder or
both.
Expand All @@ -623,7 +623,7 @@ class NotebookCellKind(IntEnum):
""" A code-cell is source code. """


class ResourceOperationKind(Enum):
class ResourceOperationKind(StrEnum):
Create = 'create'
""" Supports creating new files and folders. """
Rename = 'rename'
Expand All @@ -632,7 +632,7 @@ class ResourceOperationKind(Enum):
""" Supports deleting existing files and folders. """


class FailureHandlingKind(Enum):
class FailureHandlingKind(StrEnum):
Abort = 'abort'
""" Applying the workspace change is simply aborted if one of the changes provided
fails. All operations executed before the failing operation stay executed. """
Expand All @@ -654,7 +654,7 @@ class PrepareSupportDefaultBehavior(IntEnum):
according the to language's syntax rule. """


class TokenFormat(Enum):
class TokenFormat(StrEnum):
Relative = 'relative'


Expand Down
24 changes: 12 additions & 12 deletions lsp_types_sublime_text_33.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RegExp = str


class SemanticTokenTypes(Enum):
class SemanticTokenTypes(StrEnum):
""" A set of predefined token types. This set is not fixed
an clients can specify additional token types via the
corresponding client capabilities.
Expand Down Expand Up @@ -46,7 +46,7 @@ class SemanticTokenTypes(Enum):
""" @since 3.17.0 """


class SemanticTokenModifiers(Enum):
class SemanticTokenModifiers(StrEnum):
""" A set of predefined token modifiers. This set is not fixed
an clients can specify additional token types via the
corresponding client capabilities.
Expand All @@ -64,7 +64,7 @@ class SemanticTokenModifiers(Enum):
DefaultLibrary = 'defaultLibrary'


class DocumentDiagnosticReportKind(Enum):
class DocumentDiagnosticReportKind(StrEnum):
""" The document diagnostic report kinds.
@since 3.17.0 """
Expand Down Expand Up @@ -165,7 +165,7 @@ class SymbolTag(IntEnum):
""" Render a symbol as obsolete, usually using a strike-out. """


class UniquenessLevel(Enum):
class UniquenessLevel(StrEnum):
""" Moniker uniqueness level to define scope of the moniker.
@since 3.16.0 """
Expand All @@ -181,7 +181,7 @@ class UniquenessLevel(Enum):
""" The moniker is globally unique """


class MonikerKind(Enum):
class MonikerKind(StrEnum):
""" The moniker kind.
@since 3.16.0 """
Expand Down Expand Up @@ -405,7 +405,7 @@ class TraceValue(Enum):
""" Verbose message tracing. """


class MarkupKind(Enum):
class MarkupKind(StrEnum):
""" Describes the content type that a client supports in various
result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
Expand All @@ -417,7 +417,7 @@ class MarkupKind(Enum):
""" Markdown is supported as a content format """


class LanguageKind(Enum):
class LanguageKind(StrEnum):
""" Predefined Language kinds
@since 3.18.0
@proposed """
Expand Down Expand Up @@ -500,7 +500,7 @@ class InlineCompletionTriggerKind(IntEnum):
""" Completion was triggered automatically while editing. """


class PositionEncodingKind(Enum):
class PositionEncodingKind(StrEnum):
""" A set of predefined position encoding kinds.
@since 3.17.0 """
Expand Down Expand Up @@ -602,7 +602,7 @@ class CodeActionTriggerKind(IntEnum):
also be triggered when file content changes. """


class FileOperationPatternKind(Enum):
class FileOperationPatternKind(StrEnum):
""" A pattern kind describing if a glob pattern matches a file a folder or
both.
Expand All @@ -623,7 +623,7 @@ class NotebookCellKind(IntEnum):
""" A code-cell is source code. """


class ResourceOperationKind(Enum):
class ResourceOperationKind(StrEnum):
Create = 'create'
""" Supports creating new files and folders. """
Rename = 'rename'
Expand All @@ -632,7 +632,7 @@ class ResourceOperationKind(Enum):
""" Supports deleting existing files and folders. """


class FailureHandlingKind(Enum):
class FailureHandlingKind(StrEnum):
Abort = 'abort'
""" Applying the workspace change is simply aborted if one of the changes provided
fails. All operations executed before the failing operation stay executed. """
Expand All @@ -654,7 +654,7 @@ class PrepareSupportDefaultBehavior(IntEnum):
according the to language's syntax rule. """


class TokenFormat(Enum):
class TokenFormat(StrEnum):
Relative = 'relative'


Expand Down

0 comments on commit 6819c68

Please sign in to comment.