Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install
run: uv sync --no-default-groups --group nox --group lint --locked
- name: Lint
run: uv run --frozen nox -s lint
run: uv run --no-sync nox -s lint

tests:
name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
Expand All @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.13"]
python-version: ["3.10", "3.14"]
runs-on: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand All @@ -55,7 +55,7 @@ jobs:

- name: Test package
run: |
uv run --frozen nox -s test -- --cov --cov-report=xml --cov-report=term --durations=20
uv run --no-sync nox -s test -- --cov --cov-report=xml --cov-report=term --durations=20

- name: Upload coverage report
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9
3.10
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
"Typing :: Typed",
Expand All @@ -27,7 +27,7 @@ dynamic = ["version"]
license.file = "LICENSE"
name = "optional_dependencies"
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"

[project.urls]
"Bug Tracker" = "https://github.com/GalacticDynamics/optional_dependencies/issues"
Expand Down Expand Up @@ -100,7 +100,7 @@ skip = ["uv.lock"]
'^conftest\.py$', # nox test configuration
]
files = ["src"]
python_version = "3.9"
python_version = "3.10"
strict = true
warn_unreachable = true
warn_unused_configs = true
Expand All @@ -113,7 +113,7 @@ skip = ["uv.lock"]

[tool.ruff]
src = ["src"]
target-version = "py39"
target-version = "py310"

[tool.ruff.lint]
extend-select = ["ALL"]
Expand Down Expand Up @@ -151,6 +151,6 @@ skip = ["uv.lock"]
"missing-module-docstring",
"wrong-import-position",
]
py-version = "3.9"
py-version = "3.10"
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
13 changes: 6 additions & 7 deletions src/optional_dependencies/_core.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
"""Optional dependencies."""

from __future__ import annotations

__all__: list[str] = []

import operator
from collections.abc import Callable
from dataclasses import dataclass
from enum import Enum
from types import MethodType
from typing import Callable, Literal, cast
from typing import Literal, cast

from packaging.utils import canonicalize_name
from packaging.version import Version
Expand All @@ -25,9 +24,9 @@ class Comparator:

def __get__(
self,
instance: OptionalDependencyEnum | None,
owner: type[OptionalDependencyEnum] | None,
) -> Comparator | MethodType:
instance: "OptionalDependencyEnum | None",
owner: "type[OptionalDependencyEnum] | None",
) -> "Comparator | MethodType":
"""Get the descriptor.

Parameters
Expand All @@ -49,7 +48,7 @@ def __get__(
# Bind the descriptor to the instance
return MethodType(self.__call__, instance)

def __call__(self, enum: OptionalDependencyEnum, other: object) -> bool:
def __call__(self, enum: "OptionalDependencyEnum", other: object) -> bool:
"""Compare two versions.

Returns
Expand Down
2 changes: 0 additions & 2 deletions src/optional_dependencies/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Optional dependencies."""

from __future__ import annotations

__all__ = [
"InstalledState",
"NOT_INSTALLED",
Expand Down
Loading