mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-15 21:14:35 +02:00
DRYer
This commit is contained in:
@@ -176,10 +176,10 @@ class CurrentlyParsing:
|
||||
|
||||
|
||||
currently_parsing = CurrentlyParsing()
|
||||
|
||||
OSNames = Literal['macos', 'bsd', 'linux', 'unknown']
|
||||
|
||||
@run_once
|
||||
def os_name() -> Literal['macos', 'bsd', 'linux', 'unknown']:
|
||||
def os_name() -> OSNames:
|
||||
if is_macos:
|
||||
return 'macos'
|
||||
if 'bsd' in _plat:
|
||||
|
||||
Reference in New Issue
Block a user