amidaware / tacticalrmm

A remote monitoring & management tool, built with Django, Vue and Go.
https://docs.tacticalrmm.com
Other
3.25k stars 447 forks source link

[BUG] Code Editor Flags Multi-line f-string as Incorrect #1929

Open P6g9YHK6 opened 3 months ago

P6g9YHK6 commented 3 months ago

Server Info (please complete the following information):

Installation Method:

Describe the bug My code editor flags the multi-line f-string format as incorrect, even though the code executes as expected and produces the correct output. This issue may be related to the editor's syntax checking or linting configuration.

To Reproduce Steps to reproduce the behavior:

  1. Open the code file in the editor.
  2. Paste the provided code snippet.
  3. Observe the syntax highlighting or error messages from the code editor.

Expected behavior The code editor should recognize the multi-line f-string as a valid syntax and not flag it as incorrect.

Multi-line f-strings are a valid feature in Python 3.6 and later, and should be supported by the editor.

Screenshots image

Additional context

print(f"""
Backup Status Report:
  - VM or Computer: '{tmpName}'
  - Latest Restore Point Date/Time: '{latest_restore_point}'
  - Number of Restore Points Available: {len(restorePoints)}
  - Total Size of Restore Points: {totalRestorePointSize}

The latest restore point date/time indicates when the most recent backup was made.
""")
P6g9YHK6 commented 1 month ago

adding this here

object Zone "'+$parent+'" {
  endpoints = ['

foreach ($sat in $satellites) {
    $icinga2config += '"'+$sat+'",'
}

$icinga2config +=']
}

image