Hi guys, can you please fix this very minor issue ...
# contribute
i
Hi guys, can you please fix this very minor issue (this is a warning raised by pytest):
Copy code
hamilton\function_modifiers\macros.py:1522: SyntaxWarning: invalid escape sequence '\*'
What needs to be done is add a
r
to the beginning of the docstring (i.e.
"""
->
r"""
) and change
\*\*
on the aforementioned line to
**
.
πŸ‘€ 1
e
Happy to fix shortly β€” if it’s a blocker I can also approve a PR and release a patch version sooner!
i
Nah, not a blocker (unless someone fails their test suite on warnings). I should mention that this was observed in a project that imports hamilton, not in hamilton itself (although the warning should appear there too)
πŸ‘ 1
e
Yep will fix!
gratitude thank you 1
FYI @Jernj Frank has offered to fix this πŸ™Œ
j
Huh, interesting, that warning doesn't show up when I run pytest.. I ran
Copy code
pytest tests/function_modifiers/test_macros.py
where the
mutate
tests are located. Also, the suggested fix errors out with
Copy code
hamilton/hamilton/function_modifiers/macros.py:docstring of hamilton.function_modifiers.macros.mutate.__init__:8:Inline strong start-string without end-string.
Sphinx exited with exit code: 2
which I think comes form an
rst
compilation issue. Putting ``**kwargs`` seems to fix the issue and I think it might not raise a pytest error.
Let me know if it still raises pytest issues @Iliya R 🫑
πŸ‘€ 1
βœ… 1