Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply pre-commit #5717

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

apply pre-commit #5717

wants to merge 10 commits into from

Conversation

graingert
Copy link

@graingert graingert commented Apr 7, 2025

Please review the following checklist.

  • Docstrings on all new or modified functions / classes
  • Updated documentation
  • Updated CHANGELOG.md (where appropriate)

@graingert graingert marked this pull request as ready for review April 7, 2025 14:29
@willmcgugan
Copy link
Collaborator

Removing / adding lines in examples could break the line annotations in the docs. Can we avoid modifying SVGs entirely?

@graingert
Copy link
Author

Removing / adding lines in examples could break the line annotations in the docs. Can we avoid modifying SVGs entirely?

yep! I've excluded SVGs from end-of-file-fixer

@TomJGooding
Copy link
Contributor

TomJGooding commented Apr 7, 2025

Removing / adding lines in examples could break the line annotations in the docs.

I needed something to unwind so decided to work through these changes...

✅ No lines added/removed

  • docs/examples/app/event01.py
  • docs/examples/app/question01.py
  • docs/examples/app/question03.py
  • docs/examples/guide/actions/actions01.py
  • docs/examples/guide/dom2.py

❌ Single empty line removed

diff --git a/docs/guide/styles.md b/docs/guide/styles.md
index c251f9faf..abb8d81f9 100644
--- a/docs/guide/styles.md
+++ b/docs/guide/styles.md
@@ -128 +128 @@ Setting the width restricts the number of columns used by a widget, and setting
-```python title="dimensions01.py" hl_lines="21-22"
+```python title="dimensions01.py" hl_lines="20-21"
@@ -145 +145 @@ Let's set the height to auto and see what happens.
-```python title="dimensions02.py" hl_lines="22"
+```python title="dimensions02.py" hl_lines="21"
@@ -166 +166 @@ The following example demonstrates applying percentage units:
-```python title="dimensions03.py" hl_lines="21-22"
+```python title="dimensions03.py" hl_lines="20-21"
@@ -196 +196 @@ Let's look at an example. We will create two widgets, one with a height of `"2fr
-```python title="dimensions04.py" hl_lines="24-25"
+```python title="dimensions04.py" hl_lines="23-24"
@@ -222 +222 @@ Padding adds space around your content which can aid readability. Setting [paddi
-```python title="padding01.py" hl_lines="22"
+```python title="padding01.py" hl_lines="21"
@@ -233 +233 @@ You can also set padding to a tuple of *two* integers which will apply padding t
-```python title="padding02.py" hl_lines="22"
+```python title="padding02.py" hl_lines="21"
@@ -292 +292 @@ Note the addition of the titles and their alignments:
-```python title="outline01.py" hl_lines="22"
+```python title="outline01.py" hl_lines="21"
@@ -328 +328 @@ The second widget sets `box_sizing` to `"content-box"`.
-```python title="box_sizing01.py" hl_lines="32"
+```python title="box_sizing01.py" hl_lines="31"
@@ -343 +343 @@ The following example creates two widgets, each with a margin of 2.
-```python title="margin01.py" hl_lines="26-27"
+```python title="margin01.py" hl_lines="25-26"

❌ Multiple lines changed

These might need more care to ensure the correct lines are still highlighted.

  • docs/examples/guide/widgets/checker03.py
  • docs/examples/guide/widgets/checker04.py

EDIT: This just needs just a small change for the highlighted import:

diff --git a/docs/guide/widgets.md b/docs/guide/widgets.md
index 4c83316ff..4072fe4a4 100644
--- a/docs/guide/widgets.md
+++ b/docs/guide/widgets.md
@@ -514 +514 @@ Let's add scrolling to our checkerboard example. A standard 8 x 8 board isn't su
-    ```python title="checker03.py" hl_lines="4 26-30 35-36 52-53"
+    ```python title="checker03.py" hl_lines="6 26-30 35-36 52-53"

@graingert
Copy link
Author

@TomJGooding thanks for this, I tried to apply the patches directly but they failed - I applied them line by line manually instead - could you check if they are correct?

@TomJGooding
Copy link
Contributor

@graingert No problem - sorry you had to update this manually!

Looks good to me apart from missing the update for outline01.py on line 292.

@graingert
Copy link
Author

@graingert No problem - sorry you had to update this manually!

Looks good to me apart from missing the update for outline01.py on line 292.

Ok pushed a fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants