We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ExampleApp Syntax Highlighter broken in PyQt5
### Short description
Since merge of #1302, the syntax highlighter in the ExampleApp is broken  (CC @j9ac9k ).

### Code to reproduce
```bash
cd pyqtgraph\examples
python3 .
```

### Expected behavior
Syntax highlighter should work

### Real behavior
Following error:

```
Traceback (most recent call last):
  File "/home/b2/Documents/synced/pyqtgraph/examples/ExampleApp.py", line 298, in highlightBlock
    format = self.styles[format]
AttributeError: 'PythonHighlighter' object has no attribute 'styles'
```

### Tested environment(s)

 * PyQtGraph version: 7e57e07068fc8a62e9ae3b68e5556b11b6ef1841 and newer
 * Qt Python binding: yQt5 5.15.1 Qt 5.15.1
 * Python version: Python 3.8.5
 * NumPy version: 1.19.2
 * Operating system: Linux 5.8.16-2-MANJARO
 * Installation method: Run in folder (see above)

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `examples/__main__.py`
Content:
```
1 import sys, os
2 import pyqtgraph as pg
3 from pyqtgraph.Qt import QtCore, QtGui
4 
5 
6 
7 if __name__ == '__main__':
8     if __package__ is None or __package__ == "":
9         parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
10         sys.path.insert(0, parent_dir)
11         import examples
12         __package__ = "examples"
13 
14     from .ExampleApp import main as run
15     run()
16
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/examples/__main__.py b/examples/__main__.py
--- a/examples/__main__.py
+++ b/examples/__main__.py
@@ -1,15 +1,16 @@
 import sys, os
+
+# Set up path to contain pyqtgraph module when run without installation
+if __name__ == "__main__" and (__package__ is None or __package__==''):
+    parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+    sys.path.insert(0, parent_dir)
+    import examples
+    __package__ = "examples"
+
 import pyqtgraph as pg
 from pyqtgraph.Qt import QtCore, QtGui
 
 
-
 if __name__ == '__main__':
-    if __package__ is None or __package__ == "":
-        parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-        sys.path.insert(0, parent_dir)
-        import examples
-        __package__ = "examples"
-
     from .ExampleApp import main as run
     run()

{"golden_diff": "diff --git a/examples/__main__.py b/examples/__main__.py\n--- a/examples/__main__.py\n+++ b/examples/__main__.py\n@@ -1,15 +1,16 @@\n import sys, os\n+\n+# Set up path to contain pyqtgraph module when run without installation\n+if __name__ == \"__main__\" and (__package__ is None or __package__==''):\n+    parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n+    sys.path.insert(0, parent_dir)\n+    import examples\n+    __package__ = \"examples\"\n+\n import pyqtgraph as pg\n from pyqtgraph.Qt import QtCore, QtGui\n \n \n-\n if __name__ == '__main__':\n-    if __package__ is None or __package__ == \"\":\n-        parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n-        sys.path.insert(0, parent_dir)\n-        import examples\n-        __package__ = \"examples\"\n-\n     from .ExampleApp import main as run\n     run()\n", "issue": "ExampleApp Syntax Highlighter broken in PyQt5\n### Short description\r\nSince merge of #1302, the syntax highlighter in the ExampleApp is broken  (CC @j9ac9k ).\r\n\r\n### Code to reproduce\r\n```bash\r\ncd pyqtgraph\\examples\r\npython3 .\r\n```\r\n\r\n### Expected behavior\r\nSyntax highlighter should work\r\n\r\n### Real behavior\r\nFollowing error:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/b2/Documents/synced/pyqtgraph/examples/ExampleApp.py\", line 298, in highlightBlock\r\n    format = self.styles[format]\r\nAttributeError: 'PythonHighlighter' object has no attribute 'styles'\r\n```\r\n\r\n### Tested environment(s)\r\n\r\n * PyQtGraph version: 7e57e07068fc8a62e9ae3b68e5556b11b6ef1841 and newer\r\n * Qt Python binding: yQt5 5.15.1 Qt 5.15.1\r\n * Python version: Python 3.8.5\r\n * NumPy version: 1.19.2\r\n * Operating system: Linux 5.8.16-2-MANJARO\r\n * Installation method: Run in folder (see above)\n", "before_files": [{"content": "import sys, os\nimport pyqtgraph as pg\nfrom pyqtgraph.Qt import QtCore, QtGui\n\n\n\nif __name__ == '__main__':\n    if __package__ is None or __package__ == \"\":\n        parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n        sys.path.insert(0, parent_dir)\n        import examples\n        __package__ = \"examples\"\n\n    from .ExampleApp import main as run\n    run()\n", "path": "examples/__main__.py"}], "after_files": [{"content": "import sys, os\n\n# Set up path to contain pyqtgraph module when run without installation\nif __name__ == \"__main__\" and (__package__ is None or __package__==''):\n    parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n    sys.path.insert(0, parent_dir)\n    import examples\n    __package__ = \"examples\"\n\nimport pyqtgraph as pg\nfrom pyqtgraph.Qt import QtCore, QtGui\n\n\nif __name__ == '__main__':\n    from .ExampleApp import main as run\n    run()\n", "path": "examples/__main__.py"}]}