replbase 0.0.69__tar.gz → 0.0.70__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {replbase-0.0.69 → replbase-0.0.70}/PKG-INFO +1 -1
- {replbase-0.0.69 → replbase-0.0.70}/pyproject.toml +1 -1
- {replbase-0.0.69 → replbase-0.0.70}/replbase/repl_base.py +23 -0
- {replbase-0.0.69 → replbase-0.0.70}/LICENSE +0 -0
- {replbase-0.0.69 → replbase-0.0.70}/README.md +0 -0
- {replbase-0.0.69 → replbase-0.0.70}/replbase/__init__.py +0 -0
- {replbase-0.0.69 → replbase-0.0.70}/replbase/cmd_meta.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "replbase"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.70"
|
|
8
8
|
description = "\"Combination of other REPL tools into a reusable class that generates a REPL\""
|
|
9
9
|
authors = [ "Joseph Bochinski <stirgejr@gmail.com>",]
|
|
10
10
|
license = "MIT"
|
|
@@ -500,6 +500,29 @@ class ReplBase:
|
|
|
500
500
|
for name in cmd_names:
|
|
501
501
|
self.gen_command(name, hyphenate=hyphenate)
|
|
502
502
|
|
|
503
|
+
def get_local_funcs(self, tgt_cls: type = None) -> list[str]:
|
|
504
|
+
"""Retrieve a list of local functions for this class
|
|
505
|
+
|
|
506
|
+
Returns:
|
|
507
|
+
list[str]: List of function names
|
|
508
|
+
"""
|
|
509
|
+
|
|
510
|
+
base_funcs = [
|
|
511
|
+
name
|
|
512
|
+
for name in dir(ReplBase)
|
|
513
|
+
if callable(getattr(ReplBase, name)) and not name.startswith("_")
|
|
514
|
+
]
|
|
515
|
+
|
|
516
|
+
tgt_cls = tgt_cls or self.__class__
|
|
517
|
+
|
|
518
|
+
return [
|
|
519
|
+
name
|
|
520
|
+
for name in dir(tgt_cls)
|
|
521
|
+
if callable(getattr(tgt_cls, name))
|
|
522
|
+
and not name.startswith("_")
|
|
523
|
+
and name not in base_funcs
|
|
524
|
+
]
|
|
525
|
+
|
|
503
526
|
def warn(self, msg: str) -> None:
|
|
504
527
|
"""Print a message to the REPL preformatted as a warning"""
|
|
505
528
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|