Skip to content

Commit

Permalink
perf: make silverback --help faster (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Nov 4, 2024
1 parent a871b62 commit 83663af
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 69 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[flake8]
max-line-length = 100
ignore = E704,W503,PYD002
exclude =
venv*
.eggs
Expand Down
24 changes: 21 additions & 3 deletions silverback/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
from .exceptions import CircuitBreaker, SilverbackException
from .main import SilverbackBot
from .state import StateSnapshot
def __getattr__(name: str):
if name == "CircuitBreaker":
from .exceptions import CircuitBreaker

return CircuitBreaker

elif name == "SilverbackException":
from .exceptions import SilverbackException

return SilverbackException

elif name == "SilverbackBot":
from .main import SilverbackBot

return SilverbackBot

elif name == "StateSnapshot":
from .state import StateSnapshot

return StateSnapshot


__all__ = [
"StateSnapshot",
Expand Down
Loading

0 comments on commit 83663af

Please sign in to comment.