##// END OF EJS Templates
PR: Unassigned allowed commands (#14564)...
PR: Unassigned allowed commands (#14564) From git git: > Modify binding mechanism to allow binding to one of a set of whitelisted commands, Add five such commands ("beginning_of_buffer", "end_of_buffer", "end_of_line", "forward_word", "unix_line_discard"). Currently, only commands which are assigned by default are allowed to be reassigned: ```python known_commands = { create_identifier(binding.command): binding.command for binding in KEY_BINDINGS } ... if command_id not in known_commands: ... raise ValueError( f"{command_id} is not a known shortcut command." f" Allowed commands are: \n - {allowed_commands}" ) ``` This PR adds a List UNASSIGNED_ALLOWED_COMMANDS and updates `known_commands` (now renamed to be more clear as `allowed_commands`): ```python allowed_commands.update({ create_identifier(command): command for command in UNASSIGNED_ALLOWED_COMMANDS }) ``` The five unassigned allowed commands are: ```python UNASSIGNED_ALLOWED_COMMANDS = [ nc.beginning_of_buffer, nc.end_of_buffer, nc.end_of_line, nc.forward_word, nc.unix_line_discard, ] ``` Motivation tldr: Until now, it is not possible to bind eg the common keybindng `ctrl+e` to prompt_toolkit's `end_of_line` (because it is not bound by default). Full motivation: https://github.com/ipython/ipython/issues/14369

File last commit:

r28856:18934670
r28945:08be4c99 merge
Show More
docs.yml
39 lines | 1.0 KiB | text/x-yaml | YamlLexer
Thomas Kluyver
Fix name of workflow
r26433 name: Build docs
Thomas Kluyver
Add docs workflow on Github
r26432
on: [push, pull_request]
Matthias Bussonnier
SEC: force workflows to be read-only....
r27782 permissions:
contents: read
Thomas Kluyver
Add docs workflow on Github
r26432 jobs:
Thomas Kluyver
Names again
r26435 build:
Thomas Kluyver
Add docs workflow on Github
r26432 runs-on: ubuntu-latest
steps:
Brigitta Sipőcz
CI: update actions version
r28856 - uses: actions/checkout@v4
Christian Clauss
Upgrade GitHub Actions
r27723 - name: Set up Python
Brigitta Sipőcz
CI: update actions version
r28856 uses: actions/setup-python@v5
Thomas Kluyver
Add docs workflow on Github
r26432 with:
Christian Clauss
Upgrade GitHub Actions
r27723 python-version: 3.x
Thomas Kluyver
Add docs workflow on Github
r26432 - name: Install Graphviz
run: |
sudo apt-get update
sudo apt-get install graphviz
- name: Install Python dependencies
run: |
Matthias Bussonnier
3rd attempt at 8.0.0a1
r27329 python -m pip install --upgrade pip setuptools coverage rstvalidator
Thomas Kluyver
Add docs workflow on Github
r26432 pip install -r docs/requirements.txt
- name: Build docs
run: |
Matthias Bussonnier
3rd attempt at 8.0.0a1
r27329 python -m rstvalidator long_description.rst
Thomas Kluyver
Add docs workflow on Github
r26432 python tools/fixup_whats_new_pr.py
Nikita Kniazev
CI: Collect coverage from docs build
r27101 make -C docs/ html SPHINXOPTS="-W" \
PYTHON="coverage run -a" \
SPHINXBUILD="coverage run -a -m sphinx.cmd.build"
- name: Generate coverage xml
run: |
coverage combine `find . -name .coverage\*` && coverage xml
- name: Upload coverage to Codecov
Brigitta Sipőcz
CI: update actions version
r28856 uses: codecov/codecov-action@v4
Nikita Kniazev
CI: Collect coverage from docs build
r27101 with:
name: Docs