Skip to content

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Dec 8, 2025

Like python/peps#3567 and python/devguide#1237, re: python/docs-community#22.

This will allow us to add borders on the left side of code examples to flag if they're "good", "bad", or somewhere in between.

For example:

Do this:

.. code-block::
   :class: good

   a = 1

Don't do this:

.. code-block::
   :class: bad

    a =

Take care doing this:

.. code-block::
   :class: maybe

    a = 2

Gives:

image image

And this will be useful for the upcoming free-threaded guidance coming to the docs.

cc @lysnikolaou


📚 Documentation preview 📚: https://python-docs-theme-previews--285.org.readthedocs.build/

Copy link
Member

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@lysnikolaou lysnikolaou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @hugovk!

@hugovk hugovk merged commit bf2c2d7 into python:main Dec 10, 2025
15 checks passed
@hugovk hugovk deleted the green-red branch December 10, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants