diff options
| author | Lev Vereshchagin <mail@vrslev.com> | 2022-04-06 09:39:05 +0300 |
|---|---|---|
| committer | Lev Vereshchagin <mail@vrslev.com> | 2022-04-06 09:39:05 +0300 |
| commit | b7962d7c8be1a7d39280c84fc8d394571e698dd0 (patch) | |
| tree | 1dd2a205b23580147f527338743e787806336115 /examples | |
| parent | 8b10b8f6127e18efaa443ff79e90636ceef32750 (diff) | |
Run `pyupgrade` on codebase
https://github.com/asottile/pyupgrade
`pyupgrade --py37-plus`
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/plot_input.py | 2 | ||||
| -rwxr-xr-x | examples/spectrogram.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/plot_input.py b/examples/plot_input.py index cf325d6..5586038 100755 --- a/examples/plot_input.py +++ b/examples/plot_input.py @@ -100,7 +100,7 @@ try: fig, ax = plt.subplots() lines = ax.plot(plotdata) if len(args.channels) > 1: - ax.legend(['channel {}'.format(c) for c in args.channels], + ax.legend([f'channel {c}' for c in args.channels], loc='lower left', ncol=len(args.channels)) ax.axis((0, len(plotdata), -1, 1)) ax.set_yticks([0]) diff --git a/examples/spectrogram.py b/examples/spectrogram.py index c9ce94e..0ad6a34 100755 --- a/examples/spectrogram.py +++ b/examples/spectrogram.py @@ -66,7 +66,7 @@ for bg, fg in zip(colors, colors[1:]): if char == '\t': bg, fg = fg, bg else: - gradient.append('\x1b[{};{}m{}'.format(fg, bg + 10, char)) + gradient.append(f'\x1b[{fg};{bg + 10}m{char}') try: samplerate = sd.query_devices(args.device, 'input')['default_samplerate'] |
