Branch: refs/heads/master Author: Enrico Tröger enrico.troeger@uvena.de Committer: Enrico Tröger enrico.troeger@uvena.de Date: Sat, 10 Sep 2022 11:25:54 UTC Commit: f5f3b7a847e723e2826bf47f1f0290c9830e7e22 https://github.com/geany/geany/commit/f5f3b7a847e723e2826bf47f1f0290c9830e7e...
Log Message: ----------- Add soft keywords to Python keyword list and update to Python 3.10
Closes #3263.
Modified Paths: -------------- data/filedefs/filetypes.python.in scripts/update-python-identifiers.sh
Modified: data/filedefs/filetypes.python.in 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -26,10 +26,10 @@ ftripledouble=string_2 # all items must be in one line # both primary and identifiers are auto-generated by scripts/update-python-identifiers.sh # Python 3 keywords -primary=False None True __peg_parser__ and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield +primary=False None True _ and as assert async await break case class continue def del elif else except finally for from global if import in is lambda match nonlocal not or pass raise return try while with yield # additional keywords, will be highlighted with style "word2" # Python 3 builtins (minus ones in primary) -identifiers=ArithmeticError AssertionError AttributeError BaseException BlockingIOError BrokenPipeError BufferError BytesWarning ChildProcessError ConnectionAbortedError ConnectionError ConnectionRefusedError ConnectionResetError DeprecationWarning EOFError Ellipsis EnvironmentError Exception FileExistsError FileNotFoundError FloatingPointError FutureWarning GeneratorExit IOError ImportError ImportWarning IndentationError IndexError InterruptedError IsADirectoryError KeyError KeyboardInterrupt LookupError MemoryError ModuleNotFoundError NameError NotADirectoryError NotImplemented NotImplementedError OSError OverflowError PendingDeprecationWarning PermissionError ProcessLookupError RecursionError ReferenceError ResourceWarning RuntimeError RuntimeWarning StopAsyncIteration StopIteration SyntaxError SyntaxWarning SystemError SystemExit TabError TimeoutError TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError UnicodeWarning UserWarning ValueError Warning ZeroDivisionError __build_class__ __debug__ __doc__ __import__ __loader__ __name__ __package__ __spec__ abs all any ascii bin bool breakpoint bytearray bytes callable chr classmethod compile complex copyright credits delattr dict dir divmod enumerate eval exec exit filter float format frozenset getattr globals hasattr hash help hex id input int isinstance issubclass iter len license list locals map max memoryview min next object oct open ord pow print property quit range repr reversed round set setattr slice sorted staticmethod str sum super tuple type vars zip +identifiers=ArithmeticError AssertionError AttributeError BaseException BlockingIOError BrokenPipeError BufferError BytesWarning ChildProcessError ConnectionAbortedError ConnectionError ConnectionRefusedError ConnectionResetError DeprecationWarning EOFError Ellipsis EncodingWarning EnvironmentError Exception FileExistsError FileNotFoundError FloatingPointError FutureWarning GeneratorExit IOError ImportError ImportWarning IndentationError IndexError InterruptedError IsADirectoryError KeyError KeyboardInterrupt LookupError MemoryError ModuleNotFoundError NameError NotADirectoryError NotImplemented NotImplementedError OSError OverflowError PendingDeprecationWarning PermissionError ProcessLookupError RecursionError ReferenceError ResourceWarning RuntimeError RuntimeWarning StopAsyncIteration StopIteration SyntaxError SyntaxWarning SystemError SystemExit TabError TimeoutError TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError UnicodeWarning UserWarning ValueError Warning ZeroDivisionError __build_class__ __debug__ __doc__ __import__ __loader__ __name__ __package__ __spec__ abs aiter all anext any ascii bin bool breakpoint bytearray bytes callable chr classmethod compile complex copyright credits delattr dict dir divmod enumerate eval exec exit filter float format frozenset getattr globals hasattr hash help hex id input int isinstance issubclass iter len license list locals map max memoryview min next object oct open ord pow print property quit range repr reversed round set setattr slice sorted staticmethod str sum super tuple type vars zip
[lexer_properties] fold.quotes.python=1
Modified: scripts/update-python-identifiers.sh 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -4,7 +4,7 @@ # License: GPL v2 or later # # Updates the `identifiers` entry in data/filetypes.python.in. -# Requires Python 3. +# Requires Python 3.10+.
set -e
@@ -22,7 +22,7 @@ print(" ".join(sorted([i for i in items if i not in exclude]))) ' }
-keywords=$(python3 -c 'from keyword import kwlist; print("\n".join(kwlist))') +keywords=$(python3 -c 'from keyword import kwlist, softkwlist; print("\n".join(kwlist + softkwlist))') builtins=$(python3 -c 'print("\n".join(dir(__builtins__)))')
primary=$(echo "$keywords" | sort_filter)
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).