Skip to content

Commit 2c593bf

Browse files
committed
add comments
1 parent e6d0dc2 commit 2c593bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gitingest/filesystem_schema.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from gitingest.utils.notebook_utils import process_notebook
1212
from gitingest.utils.textfile_checker_utils import is_textfile
1313

14-
SEPARATOR = "=" * 48
14+
SEPARATOR = "=" * 48 # Tiktoken, the tokenizer openai uses, counts 2 tokens if we have more than 48
1515

1616

1717
class FileSystemNodeType(Enum):
@@ -69,6 +69,7 @@ def sort_children(self) -> None:
6969
raise ValueError("Cannot sort children of a non-directory node")
7070

7171
def _sort_key(child: FileSystemNode) -> tuple[int, str]:
72+
# returns the priority order for the sort function, 0 is first
7273
# Groups: 0=README, 1=regular file, 2=hidden file, 3=regular dir, 4=hidden dir
7374
name = child.name.lower()
7475
if child.type == FileSystemNodeType.FILE:

0 commit comments

Comments
 (0)