Skip to content

Commit f81186b

Browse files
authored
Fix export of package version (#386)
1 parent 42ceac8 commit f81186b

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

jupyter_core/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from __future__ import annotations
2+
3+
from .version import __version__, version_info # noqa: F401

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,9 @@ ignore = [
185185
"RUF012" # Mutable class attributes should be annotated
186186
]
187187
unfixable = [
188-
# Don't touch print statements
189-
"T201",
190-
# Don't touch noqa lines
191-
"RUF100",
188+
"T201", # Don't touch print statements
189+
"RUF100", # Don't touch noqa lines
190+
"F401" # Unused imports
192191
]
193192
isort.required-imports = ["from __future__ import annotations"]
194193

tests/test_command.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import pytest
1212

13+
from jupyter_core import __version__
1314
from jupyter_core.command import list_subcommands
1415
from jupyter_core.paths import (
1516
jupyter_config_dir,
@@ -248,3 +249,7 @@ def test_argv0(tmpdir):
248249

249250
# Make sure the first argv is the full path to the executing script
250251
assert f"{jupyter}-witness".encode() in out
252+
253+
254+
def test_version():
255+
assert isinstance(__version__, str)

0 commit comments

Comments
 (0)