From 2688a53cbba28ecd0a777f0a1a6ebb71cc5df320 Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Thu, 19 Oct 2023 23:05:27 +0200 Subject: [PATCH] style: fix some linter errors --- docs/lexer/safe_ds_lexer/__init__.py | 2 ++ docs/lexer/safe_ds_lexer/_safe_ds_lexer.py | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/lexer/safe_ds_lexer/__init__.py b/docs/lexer/safe_ds_lexer/__init__.py index a1387f96a..526fa29c4 100644 --- a/docs/lexer/safe_ds_lexer/__init__.py +++ b/docs/lexer/safe_ds_lexer/__init__.py @@ -1,3 +1,5 @@ +"""Pygments lexer for Safe-DS markup.""" + from ._safe_ds_lexer import SafeDsLexer __all__ = [ diff --git a/docs/lexer/safe_ds_lexer/_safe_ds_lexer.py b/docs/lexer/safe_ds_lexer/_safe_ds_lexer.py index c85acd35b..7079499d2 100644 --- a/docs/lexer/safe_ds_lexer/_safe_ds_lexer.py +++ b/docs/lexer/safe_ds_lexer/_safe_ds_lexer.py @@ -1,5 +1,4 @@ -"""Pygments lexer for Safe-DS markup.""" - +from typing import ClassVar from pygments.lexer import RegexLexer, words from pygments.token import Comment, Keyword, Name, Number, Operator, String, Whitespace @@ -48,8 +47,8 @@ class SafeDsLexer(RegexLexer): - name = 'safe-ds' - aliases = [ + name: ClassVar[str] = 'safe-ds' + aliases: ClassVar[list[str]] = [ 'Safe-DS', 'safe-ds', 'SafeDS', @@ -57,7 +56,7 @@ class SafeDsLexer(RegexLexer): 'SDS', 'sds' ] - filenames = ['*.sdspipe', '*.sdsstub', '*.sdstest'] + filenames: ClassVar[list[str]] = ['*.sdspipe', '*.sdsstub', '*.sdstest'] tokens = { 'root': [