canonical / jhack

Chock-full of Juju hackery.
Apache License 2.0
51 stars 24 forks source link

Clean up syntax warnings #171

Open dimaqq opened 5 months ago

dimaqq commented 5 months ago

Tested with py3.13b2-nogil

> jhack replay install hexanator/0
/home/dima.linux/code/jhack/jhack/utils/integrate.py:351: SyntaxWarning: invalid escape sequence '\['
  print(f"{ep1} {sym}-\[{interface}]-{sym} {ep2}")
/home/dima.linux/code/jhack/jhack/utils/tail_charms.py:221: SyntaxWarning: invalid escape sequence '\S'
  "^(?P<pod_name>\S+): (?P<timestamp>\S+(\s*\S+)?) (?P<loglevel>\S+) "
/home/dima.linux/code/jhack/jhack/utils/tail_charms.py:222: SyntaxWarning: invalid escape sequence '\.'
  "unit\.(?P<unit>\S+)\.juju-log "
/home/dima.linux/code/jhack/jhack/utils/tail_charms.py:224: SyntaxWarning: invalid escape sequence '\S'
  base_relation_pattern = base_pattern + "(?P<endpoint>\S+):(?P<endpoint_id>\S+): "
/home/dima.linux/code/jhack/jhack/utils/tail_charms.py:226: SyntaxWarning: invalid escape sequence '\S'
  operator_event_suffix = "Charm called itself via hooks/(?P<event>\S+)\."
/home/dima.linux/code/jhack/jhack/utils/tail_charms.py:229: SyntaxWarning: invalid escape sequence '\S'
  event_suffix = "Emitting Juju event (?P<event>\S+)\."
/home/dima.linux/code/jhack/jhack/utils/tail_charms.py:234: SyntaxWarning: invalid escape sequence '\S'
  jhack_fire_evt_suffix = "The previous (?P<event>\S+) was fired by jhack\."
/home/dima.linux/code/jhack/jhack/utils/tail_charms.py:237: SyntaxWarning: invalid escape sequence '\S'
  "(?P<event>\S+) \((?P<jhack_replayed_evt_timestamp>\S+(\s*\S+)?)\)"
/home/dima.linux/code/jhack/jhack/utils/tail_charms.py:238: SyntaxWarning: invalid escape sequence '\.'
  " was replayed by jhack\."
/home/dima.linux/code/jhack/jhack/utils/tail_charms.py:272: SyntaxWarning: invalid escape sequence '\/'
  "(?:selective|full) lobotomy ACTIVE: event hooks\/(?P<event>\S+) ignored."
/home/dima.linux/code/jhack/jhack/utils/sync.py:121: SyntaxWarning: invalid escape sequence '\.'
  include_files: str = ".*\.py$",
/home/dima.linux/code/jhack/jhack/utils/nuke.py:33: SyntaxWarning: invalid escape sequence '\_'
  NUKE_ASCII_ART = """
PietroPasotti commented 5 months ago

mmm, need more r-strings :/