Skip to content

Commit 07e6fbe

Browse files
committed
Version 1.2:
fix: Fix configure() work (some params) feat: Add arg type auto check in configure() for custom params of CTkCodeBox refactor: Refactor of 5%+ code docs: Add some more desc in code about methods of CTkCodeBox
1 parent e1aee80 commit 07e6fbe

File tree

7 files changed

+223
-138
lines changed

7 files changed

+223
-138
lines changed

CTkCodeBoxPlus/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@
66
Homepage: https://github.com/KiTant/CTkCodeBoxPlus
77
"""
88

9-
__version__ = '1.1'
9+
__version__ = '1.2'
1010

1111
from .ctk_code_box import CTkCodeBox
12+
from .dataclasses import *
13+
from .custom_exception_classes import *
1214
from .text_menu import TextMenu
1315
from .add_line_nums import AddLineNums
1416
from .keybinding import _unregister_keybind, _register_keybind

CTkCodeBoxPlus/constants.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
from pygments.lexers import (python, javascript, c_cpp, dotnet, html, shell,
2+
css, data, go, jvm, php, ruby, rust, pascal,
3+
scripting, perl, objective, jsx, sql, special)
4+
5+
common_langs = {
6+
"text": special.TextLexer,
7+
"bash": shell.BashLexer,
8+
"powershell": shell.PowerShellLexer,
9+
"python": python.PythonLexer,
10+
"python2": python.Python2Lexer,
11+
"cython": python.CythonLexer,
12+
"googlesql": sql.GoogleSqlLexer,
13+
"sql": sql.SqlLexer,
14+
"postgres": sql.PostgresLexer,
15+
"mysql": sql.MySqlLexer,
16+
"c": c_cpp.CLexer,
17+
"cpp": c_cpp.CppLexer,
18+
"c++": c_cpp.CppLexer,
19+
"c#": dotnet.CSharpLexer,
20+
"csharp": dotnet.CSharpLexer,
21+
"html": html.HtmlLexer,
22+
"javascript": javascript.JavascriptLexer,
23+
"xml": html.XmlLexer,
24+
"css": css.CssLexer,
25+
"json": data.JsonLexer,
26+
"yaml": data.YamlLexer,
27+
"go": go.GoLexer,
28+
"typescript": javascript.TypeScriptLexer,
29+
"kotlin": jvm.KotlinLexer,
30+
"php": php.PhpLexer,
31+
"ruby": ruby.RubyLexer,
32+
"rust": rust.RustLexer,
33+
"lua": scripting.LuaLexer,
34+
"luau": scripting.LuauLexer,
35+
"pascal": pascal.DelphiLexer,
36+
"delphi": pascal.DelphiLexer,
37+
"applescript": scripting.AppleScriptLexer,
38+
"java": jvm.JavaLexer,
39+
"perl": perl.PerlLexer,
40+
"swift": objective.SwiftLexer,
41+
"react": jsx.JsxLexer,
42+
}

0 commit comments

Comments
 (0)