Skip to content

Commit

Permalink
fix mypy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
UncleGoogle committed May 4, 2022
1 parent bbeccb5 commit 4e7248a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/humbleapp/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
from humbleapp import *
3 changes: 2 additions & 1 deletion src/humbleapp/humbleapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class VaultGame:
def full_executable_path(self) -> t.Optional[pathlib.Path]:
if self.file_path and self.executable_path:
return pathlib.Path(self.file_path) / self.executable_path
return None


@dataclass
Expand Down Expand Up @@ -90,7 +91,7 @@ def has_changed(self) -> t.Optional[bool]:
try:
last_mtime = os.stat(self._path).st_mtime
except OSError:
self._prev_mtime = None
self._prev_mtime = 0.0
return None
changed = last_mtime != self._prev_mtime
self._prev_mtime = last_mtime
Expand Down
1 change: 0 additions & 1 deletion src/library.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from functools import reduce
from math import ceil
import time
import logging
import asyncio
from typing import Callable, Dict, List, Sequence, Set, Iterable, Any, Coroutine, NamedTuple, TypeVar, Generator
Expand Down
8 changes: 4 additions & 4 deletions src/local/humbleapp_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ def refresh_game_list(self) -> None:

def _parse_config(self) -> t.Optional[HumbleAppConfig]:
if self._config.has_changed():
return parse_humble_app_config(str(self.CONFIG_PATH))
return parse_humble_app_config(self.CONFIG_PATH)
return None

def get_local_size(self, game_id: str) -> t.Optional[int]:
game = self._games.get(game_id)
if game is None:
return None
if os.path.exists(game.file_path):
return game.file_size
else:
if game.file_path and not os.path.exists(game.file_path):
return 0
else:
return game.file_size

def is_installed(self) -> bool:
return self._client.is_installed()
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from sentry_sdk.integrations.logging import LoggingIntegration
from galaxy.api.plugin import Plugin, create_and_run_plugin
from galaxy.api.consts import Platform, OSCompatibility
from galaxy.api.types import Authentication, NextStep, LocalGame, GameLibrarySettings, Subscription, SubscriptionDiscovery, SubscriptionGame
from galaxy.api.types import Authentication, NextStep, LocalGame, GameLibrarySettings, Subscription, SubscriptionGame
from galaxy.api.errors import AuthenticationRequired, UnknownBackendResponse, UnknownError, BackendError

from consts import IS_WINDOWS, TROVE_SUBSCRIPTION_NAME
Expand Down

0 comments on commit 4e7248a

Please sign in to comment.