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

Prefix strings with r to avoid DeprecationWarning and W1401 #264

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

tomaarsen
Copy link
Contributor

I noticed some warnings in the CI runs for #263:

=============================== warnings summary ===============================
kglab/query/sparql.py:195
  /opt/kglab/kglab/query/sparql.py:195: DeprecationWarning: invalid escape sequence \?
    pattern = re.compile("(\?" + var + ")(\W)")  # pylint: disable=W1401

kglab/query/sparql.py:195
  /opt/kglab/kglab/query/sparql.py:195: DeprecationWarning: invalid escape sequence \W
    pattern = re.compile("(\?" + var + ")(\W)")  # pylint: disable=W1401

So I've updated this line to use the r string prefix instead.

  • Tom Aarsen

@Mec-iS
Copy link
Contributor

Mec-iS commented Sep 1, 2022

cool, we need to wait for #263 to be merged first, as the querying module has been moved to query.mixin

@Mec-iS Mec-iS self-requested a review September 1, 2022 11:48
@tomaarsen
Copy link
Contributor Author

I'm unsure why the merging is still blocked... Odd

@Mec-iS
Copy link
Contributor

Mec-iS commented Sep 1, 2022

yea same.

@ceteri
Copy link
Collaborator

ceteri commented Sep 1, 2022

GH has been prompting to update repos to "protect" their main branches, and I've mirrored the pytextrank settings here on kglab

It will require a review before merging a PR now, although I'm baffled by some of the warnings that I'm seeing.

I have a hunch that GH hasn't ironed out all the bugs quite yet for their new "protect" features.

@ceteri
Copy link
Collaborator

ceteri commented Sep 1, 2022

Also, @tomaarsen many thanks!

@ceteri ceteri merged commit f3e3758 into DerwenAI:main Sep 1, 2022
@tomaarsen tomaarsen deleted the cleanup/escape_sequence_warning branch September 1, 2022 17:02
@tomaarsen
Copy link
Contributor Author

Gladly!

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

Successfully merging this pull request may close these issues.

3 participants