tests: Fix invalid escape warning in BGP-LS test - #21829
Merged
donaldsharp merged 1 commit intoMay 1, 2026
Merged
Conversation
Pytest reports a DeprecationWarning during collection of
tests/topotests/bgp_link_state/test_bgp_link_state.py due to an
invalid escape sequence in the module docstring.
```
test_bgp_link_state.py:6
/home/user/frr/tests/topotests/bgp_link_state/test_bgp_link_state.py:6: DeprecationWarning: invalid escape sequence '\ '
"""
```
Fix this by converting the module docstring to a raw string literal
(`r"""..."""`).
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Greptile SummaryConverts the module docstring in Confidence Score: 5/5This PR is safe to merge β it is a trivial one-character docstring fix with no behavioral impact. Single-line change converting a plain docstring to a raw string literal. No logic, no data, no control flow is affected. The fix correctly addresses the reported DeprecationWarning. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[pytest collects test_bgp_link_state.py] --> B{Docstring type?}
B -->|Before: plain docstring| C[Python parses escape sequences]
C --> D[DeprecationWarning: invalid escape backslash-space]
B -->|After: raw r-docstring| E[Backslashes treated as literals]
E --> F[Clean collection, no warnings]
Reviews (1): Last reviewed commit: "tests: Fix invalid escape warning in bgp..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pytest reports a DeprecationWarning during collection of tests/topotests/bgp_link_state/test_bgp_link_state.py due to an invalid escape sequence in the module docstring.
Fix this by converting the module docstring to a raw string literal (
r"""...""").