Skip to content

Commit

Permalink
Fix version handling (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Jul 30, 2023
1 parent c91836b commit 27c896b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.11"]
python-version: ["3.8", "3.12"]
include:
- os: windows-latest
python-version: "3.9"
- os: ubuntu-latest
python-version: "pypy-3.8"
- os: ubuntu-latest
python-version: "3.12.0-beta.1"
python-version: "3.11"
- os: macos-latest
python-version: "3.10"
steps:
Expand Down
8 changes: 2 additions & 6 deletions nbformat/_version.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
"""The version information for nbformat."""
# Use "hatchling version xx.yy.zz" to handle version changes
import re
from importlib.metadata import version

try:
from importlib.metadata import version
except ImportError:
from importlib_metadata import version # type:ignore

__version__ = version("nbformat")
__version__ = version("nbformat") or "0.0.0"

# matches tbump regex in pyproject.toml
_version_regex = re.compile(
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
]
requires-python = ">=3.8"
dependencies = [
Expand Down Expand Up @@ -151,11 +152,11 @@ ignore_missing_imports = true
[tool.black]
line-length = 100
skip-string-normalization = true
target-version = ["py37"]
target-version = ["py38"]
extend-exclude = "^/tests.*ipynb$"

[tool.ruff]
target-version = "py37"
target-version = "py38"
line-length = 100
select = [
"A", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "ISC", "N",
Expand Down

0 comments on commit 27c896b

Please sign in to comment.