omdev 0.0.0.dev393__py3-none-any.whl → 0.0.0.dev395__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,7 @@ import datetime
2
2
 
3
3
  from omlish import __about__ as about
4
4
  from omlish import cached
5
+ from omlish import check
5
6
  from omlish import dataclasses as dc
6
7
 
7
8
  from ...git.revisions import get_git_revision
@@ -13,11 +14,11 @@ from .specs import Spec
13
14
 
14
15
 
15
16
  @cached.function
16
- def _lib_revision() -> str | None:
17
+ def _lib_revision() -> str:
17
18
  if (rev := about.__revision__) is not None:
18
19
  return rev # type: ignore
19
20
 
20
- return get_git_revision()
21
+ return check.not_none(get_git_revision())
21
22
 
22
23
 
23
24
  ##
omdev/cli/main.py CHANGED
@@ -13,7 +13,7 @@ import typing as ta
13
13
 
14
14
  from omlish import check
15
15
  from omlish.lite.cached import cached_nullary
16
- from omlish.manifests.load import ManifestLoader
16
+ from omlish.manifests.globals import MANIFEST_LOADER
17
17
 
18
18
  from .types import CliCmd
19
19
  from .types import CliFunc
@@ -183,7 +183,10 @@ def _build_arg_parser() -> argparse.ArgumentParser:
183
183
 
184
184
 
185
185
  def _build_cmd_set(args: ta.Any) -> CliCmdSet:
186
- ldr = ManifestLoader.from_entry_point(globals())
186
+ ldr = MANIFEST_LOADER.from_entry_point(
187
+ globals(),
188
+ cls_instantiator=MANIFEST_LOADER.instantiate_cls,
189
+ )
187
190
 
188
191
  #
189
192
 
omdev/imgur.py CHANGED
@@ -97,7 +97,7 @@ def upload_image(
97
97
 
98
98
  resp = hu.request(
99
99
  url,
100
- headers={
100
+ headers={ # type: ignore[arg-type]
101
101
  hu.consts.HEADER_AUTH: hu.consts.format_bearer_auth_header(Secret.of(auth_key).reveal()),
102
102
  hu.consts.HEADER_CONTENT_TYPE: me.content_type().decode(),
103
103
  },
omdev/intellij/ides.py CHANGED
@@ -78,7 +78,7 @@ def infer_directory_ide(cwd: str | None) -> Ide | None:
78
78
  ##
79
79
 
80
80
 
81
- def get_ide_version(ide: Ide) -> str:
81
+ def get_ide_version(ide: Ide) -> str | None:
82
82
  if ide is Ide.PYCHARM:
83
83
  return get_pycharm_version()
84
84
  else: