diff --git a/jupyter_core/__init__.py b/jupyter_core/__init__.py index e69de29..5e86847 100644 --- a/jupyter_core/__init__.py +++ b/jupyter_core/__init__.py @@ -0,0 +1,3 @@ +from __future__ import annotations + +from .version import __version__, version_info # noqa: F401 diff --git a/pyproject.toml b/pyproject.toml index d7f6156..9a224e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -185,10 +185,9 @@ ignore = [ "RUF012" # Mutable class attributes should be annotated ] unfixable = [ - # Don't touch print statements - "T201", - # Don't touch noqa lines - "RUF100", + "T201", # Don't touch print statements + "RUF100", # Don't touch noqa lines + "F401" # Unused imports ] isort.required-imports = ["from __future__ import annotations"] diff --git a/tests/test_command.py b/tests/test_command.py index ff8731c..7a0b899 100644 --- a/tests/test_command.py +++ b/tests/test_command.py @@ -10,6 +10,7 @@ import pytest +from jupyter_core import __version__ from jupyter_core.command import list_subcommands from jupyter_core.paths import ( jupyter_config_dir, @@ -248,3 +249,7 @@ def test_argv0(tmpdir): # Make sure the first argv is the full path to the executing script assert f"{jupyter}-witness".encode() in out + + +def test_version(): + assert isinstance(__version__, str)