hiplot-mm 0.0.3rc0__py3-none-any.whl → 0.0.3rc1__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.
hiplot/__init__.py CHANGED
@@ -5,7 +5,7 @@
5
5
  from .experiment import (Experiment, ExperimentFetcherDoesntApply, ExperimentValidationError, ExperimentValidationCircularRef,
6
6
  ExperimentValidationMissingParent, Datapoint, ExperimentDisplayed, ValueDef, ValueType, Displays)
7
7
  from .server import run_server, run_server_main
8
- from .pkginfo import version as __version__, package_name
8
+ from .pkginfo import __version__, package_name
9
9
 
10
10
  from . import fetchers
11
11
 
hiplot/fetchers.py CHANGED
@@ -306,7 +306,7 @@ def get_fetcher(fetcher_spec: str) -> hip.ExperimentFetcher:
306
306
  if module is None:
307
307
  raise RuntimeError(f"Unable to create fetcher '{fetcher_spec}'")
308
308
 
309
- return getattr(module, parts[-1]) # type: ignore
309
+ return getattr(module, parts[-1])
310
310
 
311
311
 
312
312
  def get_fetchers(add_fetchers: tp.List[str]) -> tp.List[hip.ExperimentFetcher]:
hiplot/fetchers_demo.py CHANGED
@@ -50,8 +50,8 @@ def demo_line_xy() -> hip.Experiment:
50
50
  if i > 10:
51
51
  from_parent = random.choice(exp.datapoints[-10:])
52
52
  dp.from_uid = from_parent.uid # <-- Connect the parent to the child
53
- dp.values['loss'] += from_parent.values['loss'] # type: ignore
54
- dp.values['param'] *= from_parent.values['param'] # type: ignore
53
+ dp.values['loss'] += from_parent.values['loss']
54
+ dp.values['param'] *= from_parent.values['param']
55
55
  exp.datapoints.append(dp)
56
56
  # DEMO_LINE_XY_END
57
57
  return exp
hiplot/ipython.py CHANGED
@@ -111,7 +111,7 @@ class IPythonExperimentDisplayed(exp.ExperimentDisplayed):
111
111
  # msg is the comm_open message
112
112
 
113
113
  # Register handler for later messages
114
- @comm.on_msg # type: ignore
114
+ @comm.on_msg
115
115
  def _recv(msg: t.Dict[str, t.Any]) -> None:
116
116
  self._num_recv += 1
117
117
  msg_data = msg["content"]["data"]
@@ -145,7 +145,7 @@ class IPythonExperimentDisplayed(exp.ExperimentDisplayed):
145
145
  last_msg = self._last_data_per_type.get("brush_extents")
146
146
  if last_msg is None:
147
147
  raise self.no_data_received_error
148
- return last_msg # type: ignore
148
+ return last_msg
149
149
 
150
150
 
151
151
  def _should_embed_js_with_html() -> bool:
hiplot/pkginfo.py CHANGED
@@ -2,21 +2,14 @@
2
2
  # This source code is licensed under the MIT license found in the
3
3
  # LICENSE file in the root directory of this source tree.
4
4
 
5
+ from importlib.metadata import version, PackageNotFoundError
6
+
5
7
  package_name = "hiplot-mm"
6
8
 
7
9
  # Dynamic version from installed package metadata
8
10
  # This ensures __version__ matches pyproject.toml when installed via pip
9
11
  try:
10
- from importlib.metadata import version, PackageNotFoundError
11
- try:
12
- version = version(package_name)
13
- except PackageNotFoundError:
14
- # Package is not installed (e.g., running from source checkout)
15
- version = "0.0.0.dev0"
16
- except ImportError:
17
- # Python < 3.8 fallback
18
- try:
19
- import importlib_metadata
20
- version = importlib_metadata.version(package_name)
21
- except Exception:
22
- version = "0.0.0.dev0"
12
+ __version__ = version(package_name)
13
+ except PackageNotFoundError:
14
+ # Package is not installed (e.g., running from source checkout)
15
+ __version__ = "0.0.0.dev0"
hiplot/render.py CHANGED
@@ -36,7 +36,7 @@ def html_inlinize(html: str, replace_local: bool = True) -> str:
36
36
  static_root = str(Path(__file__).parent)
37
37
  soup = BeautifulSoup(html, "html.parser")
38
38
  for i in soup.find_all("link"):
39
- href = i["href"]
39
+ href = str(i["href"])
40
40
  if href.startswith("http") or href.startswith("//"):
41
41
  continue
42
42
  if not replace_local:
@@ -54,7 +54,7 @@ def html_inlinize(html: str, replace_local: bool = True) -> str:
54
54
  i["href"] = f"data:{SUFFIX_TO_TYPE[file.suffix]};base64,{base64.b64encode(file.open('rb').read()).decode('ascii')}"
55
55
  for i in soup.find_all("script"):
56
56
  try:
57
- src = i["src"]
57
+ src = str(i["src"])
58
58
  except KeyError:
59
59
  continue
60
60
  if src.startswith("http") or src.startswith("//"):
hiplot/server.py CHANGED
@@ -51,7 +51,7 @@ def run_server(fetchers: List[exp.ExperimentFetcher], host: str = '127.0.0.1', p
51
51
 
52
52
  def run_server_main() -> int:
53
53
  parser = argparse.ArgumentParser(prog="HiPlot", description="Start HiPlot webserver")
54
- parser.add_argument('--version', action='version', version=f'{pkginfo.package_name} {pkginfo.version}')
54
+ parser.add_argument('--version', action='version', version=f'{pkginfo.package_name} {pkginfo.__version__}')
55
55
  parser.add_argument("--host", type=str, default="127.0.0.1")
56
56
  parser.add_argument("--port", type=int, default=5005)
57
57
  parser.add_argument("--dev", action='store_true', help="Enable Flask Debug mode (watches for files modifications, etc..)")