@@ -131,7 +131,7 @@ def __repr__(self):
131
131
return self
132
132
133
133
134
- class ScriptTarget (str ):
134
+ class _ScriptTarget (str ):
135
135
def __new__ (cls , val ):
136
136
# Mutate self to be the "real path".
137
137
res = super ().__new__ (cls , os .path .realpath (val ))
@@ -167,7 +167,7 @@ def code(self):
167
167
return f"exec(compile({ fp .read ()!r} , { self !r} , 'exec'))"
168
168
169
169
170
- class ModuleTarget (str ):
170
+ class _ModuleTarget (str ):
171
171
def check (self ):
172
172
try :
173
173
self ._details
@@ -1625,7 +1625,7 @@ def lookupmodule(self, filename):
1625
1625
return fullname
1626
1626
return None
1627
1627
1628
- def _run (self , target : Union [ModuleTarget , ScriptTarget ]):
1628
+ def _run (self , target : Union [_ModuleTarget , _ScriptTarget ]):
1629
1629
# When bdb sets tracing, a number of call and line events happen
1630
1630
# BEFORE debugger even reaches user's code (and the exact sequence of
1631
1631
# events depends on python version). Take special measures to
@@ -1789,7 +1789,7 @@ def main():
1789
1789
commands = [optarg for opt , optarg in opts if opt in ['-c' , '--command' ]]
1790
1790
1791
1791
module_indicated = any (opt in ['-m' ] for opt , optarg in opts )
1792
- cls = ModuleTarget if module_indicated else ScriptTarget
1792
+ cls = _ModuleTarget if module_indicated else _ScriptTarget
1793
1793
target = cls (args [0 ])
1794
1794
1795
1795
target .check ()
0 commit comments