Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CTY-git committed Sep 23, 2024
1 parent f9ea63f commit 54c54c6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions code2prompt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Configuration(BaseModel):
suppress_comments: bool = Field(False, description="Strip comments from the code files.")
line_number: bool = Field(False, description="Add line numbers to source code blocks.")
no_codeblock: bool = Field(False, description="Disable wrapping code inside markdown code blocks.")
strip_body: bool = Field(False, description="Strip the body of the code files.")
template: Optional[Path] = Field(None, description="Path to a Jinja2 template file for custom prompt generation.")
tokens: bool = Field(False, description="Display the token count of the generated prompt.")
encoding: str = Field("cl100k_base", description="Specify the tokenizer encoding to use.")
Expand Down
1 change: 1 addition & 0 deletions code2prompt/contrib/body_stripper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

def strip_body_contents(code: str, language: str) -> str:
"""
WIP
Strip the contents of functions/methods/classes, leaving only definitions and returns.
:param code: The code string to strip function contents from.
Expand Down
2 changes: 2 additions & 0 deletions poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[virtualenvs]
in-project = true
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "code2prompt"
version = "0.9.0"
name = "patched-code2prompt"
version = "0.9.0.dev0"
description = "A tool to convert code snippets into AI prompts for documentation or explanation purposes."
authors = ["Raphael MANSUY <raphael.mansuy@gmail.com>"]
license = "MIT"
Expand Down

0 comments on commit 54c54c6

Please sign in to comment.