linkml / linkml-runtime

Runtime support for linkml generated models
https://linkml.io/linkml/
Creative Commons Zero v1.0 Universal
24 stars 23 forks source link

Fix warning in regex #289

Closed cthoyt closed 9 months ago

cthoyt commented 10 months ago

I get warnings like the following because there's an unescaped slash. It either needs to be \\. or make the string a raw string, which is preferred for regex legibility.

.venv/lib/python3.10/site-packages/linkml_runtime/utils/pattern.py:34
  /home/runner/work/go-fastapi/go-fastapi/.venv/lib/python3.10/site-packages/linkml_runtime/utils/pattern.py:34: DeprecationWarning: invalid escape sequence '\.'
    var_name = re.compile("{([a-z0-9_-]+([\.-_ ][a-z0-9]+)*)}", re.IGNORECASE)
codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (d45970a) 62.09% compared to head (b6faaa9) 62.09%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #289 +/- ## ======================================= Coverage 62.09% 62.09% ======================================= Files 63 63 Lines 8461 8461 Branches 2170 2170 ======================================= Hits 5254 5254 Misses 2599 2599 Partials 608 608 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.