StevenBlack / hosts

🔒 Consolidating and extending hosts files from several well-curated sources. Optionally pick extensions for porn, social media, and other categories.
MIT License
25.62k stars 2.14k forks source link

updateHostsFile.py: use a raw string for comment #2621

Closed XhmikosR closed 1 month ago

XhmikosR commented 1 month ago

This fixes a SyntaxWarning with Python 3.12:

 /home/runner/work/hosts/hosts/updateHostsFile.py:1386: SyntaxWarning: invalid escape sequence '\W'
  """
funilrys commented 1 month ago

I can't image this is the solution ... Why not just do escape the Windows path ? Anyone who look at the source code, will understand...

A RAW docstring might mislead developers with less experience ...

JustMy2Cents 😄

Stay safe and healthy!

XhmikosR commented 1 month ago

Because it's less changes 😊

StevenBlack commented 1 month ago

Thank you @XhmikosR and thank you Nissar @funilrys for the assist.