Skip to content

Commit 1f5cfff

Browse files
committed
🎨 :rename: ♻️ rename the files under the core and modify the code related to these files
1 parent 6a54fa2 commit 1f5cfff

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

code_counter/__main__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
# coding:utf8
33

44
import 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
77
from code_counter.conf.config import Config
88

99

1010
def 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()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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):

0 commit comments

Comments
 (0)