8000 Remove main() from cli.py · realpython/rptree@697e3d8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 697e3d8

Browse files
committed
Remove main() from cli.py
1 parent 693616c commit 697e3d8

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

rptree/cli.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
11
"""This module provides the RP Tree CLI."""
22

33
import argparse
4-
import pathlib
54
import sys
65

76
from . import __version__
8-
from .rptree import DirectoryTree
9-
10-
11-
def main():
12-
args = parse_cmd_line_arguments()
13-
root_dir = pathlib.Path(args.root_dir)
14-
if not root_dir.is_dir():
15-
print("The specified root directory doesn't exist")
16-
sys.exit()
17-
tree = DirectoryTree(
18-
root_dir, dir_only=args.dir_only, output_file=args.output_file
19-
)
20-
tree.generate()
217

228

239
def parse_cmd_line_arguments():

0 commit comments

Comments
 (0)
0