Skip to content

Commit

Permalink
Initial work.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachaa-Thanasius committed Sep 17, 2024
1 parent 7caefbb commit aeeef4f
Show file tree
Hide file tree
Showing 8 changed files with 503 additions and 454 deletions.
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ classifiers = [
dynamic = ["version"]

[tool.hatch.version]
path = "src/defer_imports/_core.py"
path = "src/defer_imports/_compiletime.py"

[project.optional-dependencies]
benchmark = ["slothy"]
Expand Down Expand Up @@ -81,8 +81,8 @@ defer_imports = ["src"]
plugins = ["covdefaults"]
source = ["defer_imports", "tests"]
omit = [
"src/defer_imports/_typing.py", # Has a module-level __getattr__ that isn't invoked at runtime.
"src/defer_imports/console.py", # Has a REPL that is manually tested currently.
"src/defer_imports/_typing.py", # Has a module-level __getattr__ that isn't invoked at runtime.
"src/defer_imports/console.py", # Has a REPL that is manually tested currently.
]

[tool.coverage.report]
Expand Down Expand Up @@ -178,12 +178,13 @@ keep-runtime-typing = true
"F403",
"F405",
]
"src/defer_imports/_core.py" = [
"src/defer_imports/_runtime.py" = [
"A002", # Allow some shadowing of builtins by parameter names.
]
"src/defer_imports/_typing.py" = [
"src/defer_imports/_typing.py*" = [
"F822", # __all__ has names that are only provided by module-level __getattr__.
"PLW0603", # "global" is used to update variables at global scope.
"ERA001", # Annoying false positive on comments.
]

# ---- Test code
Expand Down
5 changes: 3 additions & 2 deletions src/defer_imports/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
manager.
"""

from ._core import __version__, install_import_hook, until_use
from ._comptime import ImportHookContext, __version__, install_import_hook
from ._runtime import DeferredContext, until_use


__all__ = ("__version__", "install_import_hook", "until_use")
__all__ = ("__version__", "install_import_hook", "ImportHookContext", "until_use", "DeferredContext")
Loading

0 comments on commit aeeef4f

Please sign in to comment.