Skip to content

Commit

Permalink
fix: drop _compat pre-filled module
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Jul 20, 2023
1 parent 6a879ec commit deab08a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 46 deletions.
8 changes: 3 additions & 5 deletions {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ classifiers = [

[tool.poetry.dependencies]
python = ">=3.8"
typing_extensions = { version = ">=4.6", python = "<3.11" }

furo = { version = ">=22", optional = true }
myst_parser = { version = ">=0.13", optional = true }
Expand Down Expand Up @@ -162,9 +161,7 @@ classifiers = [
{%- if cookiecutter.backend in ["trampolim", "flit", "hatch"] %}
dynamic = ["version"]
{%- endif %}
dependencies = [
"typing_extensions >=4.6; python_version<'3.11'",
]
dependencies = []

[project.optional-dependencies]
test = [
Expand Down Expand Up @@ -287,7 +284,6 @@ extend-ignore = [
{%- if cookiecutter.backend in ["setuptools", "pybind11", "poetry"] %}
target-version = "py38"
{%- endif %}
typing-modules = ["{{ cookiecutter.__project_slug }}._compat.typing"]
src = ["src"]
unfixable = [
"T20", # Removes print statements
Expand All @@ -296,6 +292,8 @@ unfixable = [
exclude = []
flake8-unused-arguments.ignore-variadic-names = true
isort.required-imports = ["from __future__ import annotations"]
# Uncomment if using a _compat.typing backport
# typing-modules = ["{{ cookiecutter.__project_slug }}._compat.typing"]

[tool.ruff.per-file-ignores]
"tests/**" = ["T20"]
Expand Down

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions {{cookiecutter.project_name}}/tests/test_package.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
from __future__ import annotations

import {{ cookiecutter.__project_slug }} as m
import {{ cookiecutter.__project_slug }}._compat.typing as typing_backports


def test_version():
assert m.__version__


def test_has_typing():
assert hasattr(typing_backports, "TypeAlias")
assert hasattr(typing_backports, "Self")
assert hasattr(typing_backports, "assert_never")

0 comments on commit deab08a

Please sign in to comment.