Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Warning from C generator #11

Open
BrianSipos opened this issue Sep 11, 2024 · 1 comment
Open

Warning from C generator #11

BrianSipos opened this issue Sep 11, 2024 · 1 comment

Comments

@BrianSipos
Copy link
Collaborator

A warning is issued when the C generator is run, including by unit tests:

src/camp/generators/lib/campch_roundtrip.py:167
  /home/runner/work/anms-camp/anms-camp/src/camp/generators/lib/campch_roundtrip.py:167: DeprecationWarning: invalid escape sequence '\*'
    marker = '\* \\' + marker
@BrianSipos BrianSipos self-assigned this Sep 11, 2024
@BrianSipos
Copy link
Collaborator Author

This can be fixed by a patch

--- a/src/camp/generators/lib/campch_roundtrip.py
+++ b/src/camp/generators/lib/campch_roundtrip.py
@@ -165,7 +165,7 @@ class C_Scraper(Scraper):
        def _get_custom_body_re_markers(self):
                indicator, marker = self._get_custom_body_pieces()
                
-               marker = '\* \\' + marker
+               marker = '\\* \\' + marker
                function_string_matcher = '(.+)'
        
                return indicator, marker.format('START', function_string_matcher), marker.format('STOP', function_string_matcher)

@BrianSipos BrianSipos removed their assignment Oct 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant