Skip to content

Commit a9dd94b

Browse files
committed
Merge pull request #3 from fguillot/ignore-private-methods
Do not expose private methods
2 parents 4785185 + 69511c2 commit a9dd94b

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

tests/test_router.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ def ab(self):
2626
def cd(self):
2727
pass
2828

29+
def _ef(self):
30+
pass
31+
32+
def __gh(self):
33+
pass
34+
2935

3036
class RouterTest(unittest.TestCase):
3137
def setUp(self):

ubersmith_remote_module_server/router.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ def invoke_method(self, module_name, method, params=None, env=None, callback=Non
3333

3434
def list_implemented_methods(self, module_name):
3535
module = self.modules[module_name]
36-
return [method for method in dir(module) if callable(getattr(module, method)) and not method.startswith('__')]
36+
return [method for method in dir(module) if callable(getattr(module, method)) and not method.startswith('_')]

0 commit comments

Comments
 (0)