Skip to content

Commit

Permalink
Fix export of package version (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Dec 31, 2023
1 parent 42ceac8 commit f81186b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions jupyter_core/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from __future__ import annotations

from .version import __version__, version_info # noqa: F401
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
5 changes: 5 additions & 0 deletions tests/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)

0 comments on commit f81186b

Please sign in to comment.