We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aeb0463 + a14c320 commit 558c18cCopy full SHA for 558c18c
count_sourcelines.py
@@ -1,6 +1,3 @@
1
-# prints recursive count of lines of python source code from current directory
2
-# includes an ignore_list. also prints total sloc
3
-
4
import os
5
6
cur_path = os.getcwd()
@@ -13,7 +10,6 @@
13
10
if py_file.endswith(".py") and py_file not in ignore_set:
14
11
total_path = os.path.join(py_dir, py_file)
15
12
try:
16
- # Open the file with UTF-8 encoding
17
with open(total_path, encoding="utf-8") as file:
18
loc_list.append(
19
(len(file.read().splitlines()), total_path.split(cur_path)[1])
0 commit comments