Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def show_about(self):
"""Show About dialog."""
msg_box = QMessageBox(self)
text = (f"<img src="{image_path(">"
f"<p>MNELAB {__version__}</p>")
msg_box.setText(text)
mnelab_url = "github.com/cbrnr/mnelab"
mne_url = "github.com/mne-tools/mne-python"
pkgs = []
for key, value in have.items():
if value:
pkgs.append(f"{key} ({value})")
else:
pkgs.append(f"{key} (not installed)")
text = (f'<nobr><p>This program uses Python '
f'{".".join(str(k) for k in version_info[:3])} and the '
f'following packages:</p></nobr>'
f'<p>{", ".join(pkgs)}</p>'
f'<nobr><p>MNELAB repository: '
f'<a href="https://{mnelab_url}">{mnelab_url}</a></p></nobr>'
f'<nobr><p>MNE repository: '
f'<a href="https://{mne_url}">{mne_url}</a></p></nobr>'
f'<p>Licensed under the BSD 3-clause license.</p>'
f'<p>Copyright 2017-2020 by Clemens Brunner.</p>')
msg_box.setInformativeText(text)