File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 22# coding:utf8
33
44import time
5- from code_counter .core .codecounter import CodeCounter
6- from code_counter .core .argspaser import CodeCounterArgsParser
5+ from code_counter .core .counter import CodeCounter
6+ from code_counter .core .args import CodeCounterArgs
77from code_counter .conf .config import Config
88
99
1010def main ():
11- parser = CodeCounterArgsParser ()
11+ args = CodeCounterArgs ()
1212
1313 config = Config ()
14- if parser .has_config_args ():
15- config .invoke (parser .config ())
14+ if args .has_config_args ():
15+ config .invoke (args .config ())
1616 return
1717
1818 code_counter = CodeCounter (config )
1919
20- search_args = parser .search ()
20+ search_args = args .search ()
2121 code_counter .setSearchArgs (search_args )
2222
2323 time_start = time .time ()
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ def split_args(args):
1010 return list (args .split (',' ))
1111
1212
13- class CodeCounterArgsParser :
13+ class CodeCounterArgs :
1414 __SEARCH__ = 'search'
1515 __CONFIG__ = 'config'
1616
@@ -32,7 +32,7 @@ def __init__(self):
3232 print ("Unrecognized command" )
3333 parser .print_help ()
3434 exit (1 )
35- self .__args = {args .command :argparse .Namespace ()}
35+ self .__args = {args .command : argparse .Namespace ()}
3636 getattr (self , args .command )()
3737
3838 def has_search_args (self ):
File renamed without changes.
You can’t perform that action at this time.
0 commit comments