Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax warnings because of escape characters in the docstrings #536

Open
jihaekor opened this issue Aug 14, 2024 · 0 comments
Open

Syntax warnings because of escape characters in the docstrings #536

jihaekor opened this issue Aug 14, 2024 · 0 comments

Comments

@jihaekor
Copy link

Hello Team,

I am running into some syntax warnings (I guess these are DeprecationWarnings in the earlier Python versions, based on what I am reading) when attempting to run on Python 3.12 because of invalid escape characters in the docstrings. I know that 3.12 isn't officially supported, but I thought that I would bring this up as this will likely come up in the future anyways, and because it only involves the docstrings and not the actual code.

An example is this line:
https://github.com/Trusted-AI/AIF360/blob/main/aif360/sklearn/inprocessing/infairness.py#L265

with the below message:

invalid escape sequence '\e'

Related Stack Overflow topic:
https://stackoverflow.com/questions/77531208/python3-12-syntaxwarning-on-triplequoted-string-d-must-be-d

From the above, it looks like either the docstring should be a literal string (r""" ...), or be replaced with double slashes rather than a single.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant