docs: recommending raw strings to get rid of syntax warnings#3022
docs: recommending raw strings to get rid of syntax warnings#3022johanneskoester merged 3 commits intomainfrom
Conversation
WalkthroughThis change enhances the Snakemake documentation by clarifying the use of raw strings in regular expressions for file patterns. It specifically introduces the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Files selected for processing (1)
- docs/snakefiles/rules.rst (1 hunks)
Additional comments not posted (1)
docs/snakefiles/rules.rst (1)
108-109: Good practice: Use raw strings for regex patterns.The recommendation to use raw strings for regular expressions is a good practice in Python. It helps prevent syntax issues related to backslashes in regex patterns. This change improves the clarity and correctness of the documentation.
Also applies to: 113-113
Co-authored-by: Johannes Köster <johannes.koester@tu-dortmund.de>
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Files selected for processing (1)
- docs/snakefiles/rules.rst (1 hunks)
Additional comments not posted (2)
docs/snakefiles/rules.rst (2)
109-109: Good recommendation to use raw strings.Using the
rprefix for raw strings is a best practice in Python to avoid escaping backslashes in regular expressions. This change improves clarity and prevents potential syntax warnings.
113-113: Correct use of raw string in example.The addition of the
rprefix to the string in the output pattern example is appropriate and helps avoid issues with backslashes in regex.
|
🤖 I have created a release *beep* *boop* --- ## [8.18.2](v8.18.1...v8.18.2) (2024-08-21) ### Documentation * recommending raw strings to get rid of syntax warnings ([#3022](#3022)) ([877b3a3](877b3a3)) * tutorial polishing ([16b1657](16b1657)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>



The PR updates docs/snakefiles/rules.rst - I recommend using raw strings for regexes in wildcards.
The PR only affects two lines in the documentation. No further tests are needed.
Summary by CodeRabbit
rprefix in regular expressions for output patterns, enhancing user understanding and best practices.