kitty/kittens
Luflosi 2b095f720e
Use "with suppress()" to suppress python exceptions
Using
```Python
with suppress(OSError):
    os.remove('somefile.tmp')
```
instead of
```Python
try:
    os.remove('somefile.tmp')
except OSError:
    pass
```
makes the code more compact and more readable IMO.

This pattern was recommended by Raymond Hettinger, a Python Core
Developer in his talk "Transforming Code into Beautiful, Idiomatic Python" at https://www.youtube.com/watch?v=OSGv2VnC0go. The transcript is available at https://github.com/JeffPaine/beautiful_idiomatic_python
2019-06-03 12:27:43 +02:00
..
ask Use "with suppress()" to suppress python exceptions 2019-06-03 12:27:43 +02:00
choose Use python3 shebang for all python scripts 2019-05-20 14:44:24 +02:00
clipboard Use python3 shebang for all python scripts 2019-05-20 14:44:24 +02:00
diff Use "with suppress()" to suppress python exceptions 2019-06-03 12:27:43 +02:00
hints Allow controlling how multiple selections are handled in the hints kitten 2019-06-02 09:23:20 +05:30
icat icat kitten: Add a --silent flag to avoid printing anything to stdout 2019-02-27 09:02:15 +05:30
key_demo Use python3 shebang for all python scripts 2019-05-20 14:44:24 +02:00
panel Use python3 shebang for all python scripts 2019-05-20 14:44:24 +02:00
resize_window Use python3 shebang for all python scripts 2019-05-20 14:44:24 +02:00
show_error Use python3 shebang for all python scripts 2019-05-20 14:44:24 +02:00
ssh Use python3 shebang for all python scripts 2019-05-20 14:44:24 +02:00
tui Use "with suppress()" to suppress python exceptions 2019-06-03 12:27:43 +02:00
unicode_input Use "with suppress()" to suppress python exceptions 2019-06-03 12:27:43 +02:00
__init__.py
runner.py Use python3 shebang for all python scripts 2019-05-20 14:44:24 +02:00