mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
bpo-30166: Import command-line parsing modules only when needed. (#1293)
This commit is contained in:
parent
1c4670ea0c
commit
7e4db2f253
7 changed files with 20 additions and 12 deletions
|
|
@ -48,7 +48,7 @@ Sample use, programmatically
|
|||
r.write_results(show_missing=True, coverdir="/tmp")
|
||||
"""
|
||||
__all__ = ['Trace', 'CoverageResults']
|
||||
import argparse
|
||||
|
||||
import linecache
|
||||
import os
|
||||
import re
|
||||
|
|
@ -609,6 +609,7 @@ class Trace:
|
|||
callers=self._callers)
|
||||
|
||||
def main():
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--version', action='version', version='trace 2.0')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue