18 Commits

Author SHA1 Message Date
Martin Kletzander
f149b74332 Fix repeated version notifications
Without this fix the file with the list of notifications looks like this:
```
0.19.0,1601899026.4373078,<built-in method count of Notification object at 0x7f8c582193b0>
```
which ends up notifying about a new version all the time.
2020-10-05 14:27:47 +02:00
Kovid Goyal
db64aef666
Prevent an infinite recursion if a watcher causes a resize in the on_resize handler 2020-08-23 08:38:25 +05:30
Kovid Goyal
a348f64833
more typing work 2020-03-13 21:41:07 +05:30
Kovid Goyal
9f2fb76309
more typing work 2020-03-12 15:09:21 +05:30
Kovid Goyal
ac2c21e046
more typing work 2020-03-09 16:13:00 +05:30
Kovid Goyal
0f4e7921ee
Create an auto-generated stub file for the kitty Options object 2020-03-04 19:14:50 +05:30
Kovid Goyal
f0b29e15c3
The utils and constants modules are now fully typechecked 2020-03-04 10:26:41 +05:30
Luflosi
527ff0238a
Replace all instances of EnvironmentError with OSError
According to the text just above https://docs.python.org/3/library/exceptions.html#EnvironmentError, `EnvironmentError` has been an alias of `OSError` since Python 3.3. Replacing it makes the code more consistent since `OSError` is used in other places in the code too.
2020-01-11 16:47:36 +01:00
Luflosi
1389c36657
Use the update CHECK_INTERVAL constant 2019-09-25 02:46:19 +02:00
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
Luflosi
a792c94ccf
Use python3 shebang for all python scripts
Fixes #1624.
Use python3 shebang for all python scripts as python still defaults to python2 on many systems.
2019-05-20 14:44:24 +02:00
Kovid Goyal
f10c65f1bf
Use the new glfw timers to get rid of the kitty specific timers 2019-03-04 19:52:45 +05:30
Kovid Goyal
8778cf63c4
Correct fix for ignoring BrokenPipeError 2019-02-02 15:47:13 +05:30
Kovid Goyal
8e6780e761
... 2019-02-02 15:37:48 +05:30
Kovid Goyal
ddb961f9af
Dont fail to run if the update check fails 2019-02-02 15:36:32 +05:30
Kovid Goyal
4c49573465
Randomize the sleep before version fetch 2019-02-01 23:33:41 +05:30
Kovid Goyal
13d478ffca
Use kitty_exe() for the update_check worker 2019-02-01 23:25:19 +05:30
Kovid Goyal
d3ad15dc51
Automatically check for new releases and notify when an update is available, via the system notification facilities. Can be controlled by :opt:update_check_interval
Fixes #1342
2019-02-01 12:08:35 +05:30