Skip to content

Conversation

@google-labs-jules
Copy link

Here are the recommended changes in diff format:

diff --git a/gapic/ads-templates/docs/conf.py.j2 b/gapic/ads-templates/docs/conf.py.j2
index dcce591c..a2e28915 100644
--- a/gapic/ads-templates/docs/conf.py.j2
+++ b/gapic/ads-templates/docs/conf.py.j2
@@ -1,6 +1,7 @@
 {% extends '_base.py.j2' %}
 
 {% block content %}
+{% from "docs/common_setup.py.j2" import sphinx_setup %}
 
 #
 # {{ api.naming.warehouse_package_name }} documentation build configuration file
@@ -361,4 +362,6 @@ napoleon_use_admonition_for_references = False
 napoleon_use_ivar = False
 napoleon_use_param = True
 napoleon_use_rtype = True
+
+{{ sphinx_setup() }}
 {% endblock %}
diff --git a/gapic/templates/docs/common_setup.py.j2 b/gapic/templates/docs/common_setup.py.j2
new file mode 100644
index 00000000..0af8ebe7
--- /dev/null
+++ b/gapic/templates/docs/common_setup.py.j2
@@ -0,0 +1,33 @@
+{% macro sphinx_setup() -%}
+import logging
+from typing import Any
+
+class UnexpectedUnindentFilter(logging.Filter):
+    """Filter out warnings about unexpected unindentation following bullet lists."""
+
+    def filter(self, record: logging.LogRecord) -> bool:
+        """Filter the log record.
+
+        Args:
+            record (logging.LogRecord): The log record.
+
+        Returns:
+            bool: False to suppress the warning, True to allow it.
+        """
+        msg = record.getMessage()
+        if "Bullet list ends without a blank line" in msg:
+            return False
+        return True
+
+
+def setup(app: Any) -> None:
+    """Setup the Sphinx application.
+
+    Args:
+        app (Any): The Sphinx application.
+    """
+    # Sphinx's logger is hierarchical. Adding a filter to the
+    # root 'sphinx' logger will catch warnings from all sub-loggers.
+    logger = logging.getLogger('sphinx')
+    logger.addFilter(UnexpectedUnindentFilter())
+{%- endmacro %}
diff --git a/gapic/templates/docs/conf.py.j2 b/gapic/templates/docs/conf.py.j2
index b509706a..7615ca09 100644
--- a/gapic/templates/docs/conf.py.j2
+++ b/gapic/templates/docs/conf.py.j2
@@ -1,6 +1,7 @@
 {% extends '_base.py.j2' %}
 
 {% block content %}
+{% from "docs/common_setup.py.j2" import sphinx_setup %}
 
 #
 # {{ api.naming.warehouse_package_name }} documentation build configuration file
@@ -372,4 +373,6 @@ napoleon_use_admonition_for_references = False
 napoleon_use_ivar = False
 napoleon_use_param = True
 napoleon_use_rtype = True
+
+{{ sphinx_setup() }}
 {% endblock %}

Notes:

  • Type hints and Google-style docstrings were added to the UnexpectedUnindentFilter class and setup function.
  • The ads-templates update assumes that gapic/templates/docs/common_setup.py.j2 is accessible in the Jinja2 loader search path. If ads-templates are generated in an isolated environment where gapic/templates is not present, you may need to copy common_setup.py.j2 to gapic/ads-templates/docs/ or adjust the generator configuration to include the common templates path.

PR created automatically by Jules for task 16614492846158068595 started by @chalmerlowe

- Created gapic/templates/docs/common_setup.py.j2
- Updated gapic/templates/docs/conf.py.j2
- Updated gapic/ads-templates/docs/conf.py.j2
@google-labs-jules
Copy link
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Jan 26, 2026
- Created gapic/templates/docs/common_setup.py.j2 with sphinx_imports and sphinx_setup macros
- Updated gapic/templates/docs/conf.py.j2 to call imports at top and setup at bottom
- Updated gapic/ads-templates/docs/conf.py.j2 similarly
chalmerlowe and others added 2 commits January 26, 2026 15:32
- Updated gapic/ads-templates/docs/conf.py.j2 to use full path for common_setup import based on PR feedback.

Co-authored-by: chalmerlowe <7291104+chalmerlowe@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant