Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed May 22, 2023
1 parent 18be68b commit ccab728
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion menuinst/platforms/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(
name: str,
prefix: str = DEFAULT_PREFIX,
base_prefix: str = DEFAULT_BASE_PREFIX,
mode: _UserOrSystem= "user",
mode: _UserOrSystem = "user",
):
assert mode in ("user", "system"), f"mode={mode} must be `user` or `system`"
self.mode = mode
Expand Down
10 changes: 7 additions & 3 deletions menuinst/platforms/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,11 @@ def _xml_path_for_mime_type(self, mime_type: str) -> Tuple[Path, bool]:
return self.menu.data_directory / "mime" / "packages" / f"{basename}.xml", False

def _glob_pattern_for_mime_type(
self, mime_type: str, glob_pattern: str, install: bool = True,
) -> Path:
self,
mime_type: str,
glob_pattern: str,
install: bool = True,
) -> Path:
"""
See https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html
for more information on the default locations.
Expand Down Expand Up @@ -314,7 +317,8 @@ def _glob_pattern_for_mime_type(
except CalledProcessError:
log.debug(
"Could not un/register MIME type %s with xdg-mime. Writing to '%s' as a fallback.",
mime_type, xml_path
mime_type,
xml_path,
)
tree.write(xml_path, encoding="UTF-8", xml_declaration=True)
finally:
Expand Down
2 changes: 1 addition & 1 deletion menuinst/platforms/osx.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def _paths(self) -> Tuple:


class MacOSMenuItem(MenuItem):

@property
def location(self) -> Path:
"Path to the .app directory defining the menu item"
Expand Down Expand Up @@ -325,6 +324,7 @@ def _needs_appkit_launcher(self) -> bool:
return True
return False


def _lsregister(*args):
exe = (
"/System/Library/Frameworks/CoreServices.framework"
Expand Down

0 comments on commit ccab728

Please sign in to comment.