MCPcopy Create free account
hub / github.com/catboost/catboost / __init__

Method __init__

library/python/port_manager/__init__.py:36–44  ·  view source on GitHub ↗
(self, sync_dir=None)

Source from the content-addressed store, hash-verified

34 """
35
36 def __init__(self, sync_dir=None):
37 self._sync_dir = sync_dir or os.environ.get('PORT_SYNC_PATH')
38 if self._sync_dir:
39 _makedirs(self._sync_dir)
40
41 self._valid_range = get_valid_port_range()
42 self._valid_port_count = self._count_valid_ports()
43 self._filelocks = {}
44 self._lock = threading.Lock()
45
46 def __enter__(self):
47 return self

Callers

nothing calls this directly

Calls 5

_count_valid_portsMethod · 0.95
_makedirsFunction · 0.85
get_valid_port_rangeFunction · 0.85
getMethod · 0.45
LockMethod · 0.45

Tested by

no test coverage detected