instruction
stringclasses
100 values
code
stringlengths
78
193k
response
stringlengths
259
170k
file
stringlengths
59
203
Create Google-style docstrings for my code
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Dict, Union, Iterable, Optional from typing_extensions import Literal, Required, TypeAlias, TypedDict from ..._types import SequenceNotStr from .local_environment_param import L...
--- +++ @@ -56,6 +56,11 @@ class Message(TypedDict, total=False): + """ + A message input to the model with a role indicating instruction following + hierarchy. Instructions given with the `developer` or `system` role take + precedence over instructions given with the `user` role. + """ conten...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_input_item_param.py
Create docstrings for all classes and functions
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Union, Optional from typing_extensions import Literal, Annotated, TypeAlias from ..._utils import PropertyInfo from ..._models import BaseModel from .response_output_message import ResponseOutputMessag...
--- +++ @@ -36,6 +36,7 @@ class ImageGenerationCall(BaseModel): + """An image generation request made by the model.""" id: str """The unique ID of the image generation call.""" @@ -51,6 +52,7 @@ class LocalShellCallAction(BaseModel): + """Execute a shell command on the server.""" comman...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_item.py
Add structured docstrings to improve clarity
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional from typing_extensions import Literal from ..._models import BaseModel __all__ = ["RealtimeResponseStatus", "Error"] class Error(BaseModel): code: Optional[str] = None """Error code, if any.""...
--- +++ @@ -9,6 +9,10 @@ class Error(BaseModel): + """ + A description of the error that caused the response to fail, + populated when the `status` is `failed`. + """ code: Optional[str] = None """Error code, if any.""" @@ -18,6 +22,7 @@ class RealtimeResponseStatus(BaseModel): + """A...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_response_status.py
Can you add docstrings to this Python file?
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Union, Optional from typing_extensions import Literal, Annotated, TypeAlias from ..._utils import PropertyInfo from ..._models import BaseModel from .response_output_message import ResponseOutputMessag...
--- +++ @@ -34,6 +34,7 @@ class ImageGenerationCall(BaseModel): + """An image generation request made by the model.""" id: str """The unique ID of the image generation call.""" @@ -49,6 +50,7 @@ class LocalShellCallAction(BaseModel): + """Execute a shell command on the server.""" comman...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_output_item.py
Write docstrings for this repository
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing_extensions import Literal from ..._models import BaseModel __all__ = ["ResponseReasoningSummaryPartAddedEvent", "Part"] class Part(BaseModel): text: str """The text of the summary part.""" type: Literal[...
--- +++ @@ -8,6 +8,7 @@ class Part(BaseModel): + """The summary part that was added.""" text: str """The text of the summary part.""" @@ -17,6 +18,7 @@ class ResponseReasoningSummaryPartAddedEvent(BaseModel): + """Emitted when a new reasoning summary part is added.""" item_id: str ...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_reasoning_summary_part_added_event.py
Add docstrings that explain purpose and usage
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Dict, Union, Optional from typing_extensions import Literal, Required, TypeAlias, TypedDict from ..._types import SequenceNotStr from .realtime_function_tool_param import Realti...
--- +++ @@ -21,6 +21,7 @@ class McpAllowedToolsMcpToolFilter(TypedDict, total=False): + """A filter object to specify which tools are allowed.""" read_only: bool """Indicates whether or not a tool modifies data or is read-only. @@ -38,6 +39,7 @@ class McpRequireApprovalMcpToolApprovalFilterAlways...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_tools_config_union_param.py
Add docstrings following best practices
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Union, Optional from typing_extensions import Literal, Annotated, TypeAlias from ..._utils import PropertyInfo from ..._models import BaseModel __all__ = [ "ResponseOutputText", "Annotation", "A...
--- +++ @@ -19,6 +19,7 @@ class AnnotationFileCitation(BaseModel): + """A citation to a file.""" file_id: str """The ID of the file.""" @@ -34,6 +35,7 @@ class AnnotationURLCitation(BaseModel): + """A citation for a web resource used to generate a model response.""" end_index: int ...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_output_text.py
Add docstrings for production code
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Union, Iterable from typing_extensions import Literal, Required, TypeAlias, TypedDict __all__ = [ "ResponseOutputTextParam", "Annotation", "AnnotationFileCitation", ...
--- +++ @@ -18,6 +18,7 @@ class AnnotationFileCitation(TypedDict, total=False): + """A citation to a file.""" file_id: Required[str] """The ID of the file.""" @@ -33,6 +34,7 @@ class AnnotationURLCitation(TypedDict, total=False): + """A citation for a web resource used to generate a model resp...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_output_text_param.py
Provide clean and structured docstrings
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional from typing_extensions import Literal from ..._models import BaseModel __all__ = ["ResponseTextDoneEvent", "Logprob", "LogprobTopLogprob"] class LogprobTopLogprob(BaseModel): token: Optional[...
--- +++ @@ -17,6 +17,11 @@ class Logprob(BaseModel): + """ + A logprob is the logarithmic probability that the model assigns to producing + a particular token at a given position in the sequence. Less-negative (higher) + logprob values indicate greater model confidence in that token choice. + """ ...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_text_done_event.py
Write docstrings for data processing functions
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from ..._models import BaseModel __all__ = ["ResponseUsage", "InputTokensDetails", "OutputTokensDetails"] class InputTokensDetails(BaseModel): cached_tokens: int """The number of tokens that were retrieved from the cache....
--- +++ @@ -6,6 +6,7 @@ class InputTokensDetails(BaseModel): + """A detailed breakdown of the input tokens.""" cached_tokens: int """The number of tokens that were retrieved from the cache. @@ -15,12 +16,17 @@ class OutputTokensDetails(BaseModel): + """A detailed breakdown of the output tokens...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_usage.py
Add docstrings following best practices
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, List, Union, Optional from typing_extensions import Literal, Annotated, TypeAlias from . import web_search_tool from ..._utils import PropertyInfo from ..._models import BaseModel from .custom_tool import Cu...
--- +++ @@ -44,6 +44,7 @@ class McpAllowedToolsMcpToolFilter(BaseModel): + """A filter object to specify which tools are allowed.""" read_only: Optional[bool] = None """Indicates whether or not a tool modifies data or is read-only. @@ -61,6 +62,7 @@ class McpRequireApprovalMcpToolApprovalFilterAl...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/tool.py
Document this code for team use
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional from typing_extensions import Literal from ..._models import BaseModel __all__ = ["ResponseTextDeltaEvent", "Logprob", "LogprobTopLogprob"] class LogprobTopLogprob(BaseModel): token: Optional...
--- +++ @@ -17,6 +17,11 @@ class Logprob(BaseModel): + """ + A logprob is the logarithmic probability that the model assigns to producing + a particular token at a given position in the sequence. Less-negative (higher) + logprob values indicate greater model confidence in that token choice. + """ ...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/response_text_delta_event.py
Add docstrings including usage examples
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Dict, Union, Optional from typing_extensions import Literal, Required, TypeAlias, TypedDict from . import web_search_tool_param from ..chat import ChatCompletionFunctionToolPara...
--- +++ @@ -46,6 +46,7 @@ class McpAllowedToolsMcpToolFilter(TypedDict, total=False): + """A filter object to specify which tools are allowed.""" read_only: bool """Indicates whether or not a tool modifies data or is read-only. @@ -63,6 +64,7 @@ class McpRequireApprovalMcpToolApprovalFilterAlways...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/tool_param.py
Add standardized docstrings across the file
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Optional from typing_extensions import Literal, Required, TypedDict from ..._types import SequenceNotStr __all__ = ["WebSearchToolParam", "Filters", "UserLocation"] class Fil...
--- +++ @@ -11,6 +11,7 @@ class Filters(TypedDict, total=False): + """Filters for the search.""" allowed_domains: Optional[SequenceNotStr[str]] """Allowed domains for the search. @@ -23,6 +24,7 @@ class UserLocation(TypedDict, total=False): + """The approximate location of the user.""" ...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/web_search_tool_param.py
Help me comply with documentation standards
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional from typing_extensions import Literal from ..._models import BaseModel __all__ = ["WebSearchTool", "Filters", "UserLocation"] class Filters(BaseModel): allowed_domains: Optional[List[str]] =...
--- +++ @@ -9,6 +9,7 @@ class Filters(BaseModel): + """Filters for the search.""" allowed_domains: Optional[List[str]] = None """Allowed domains for the search. @@ -21,6 +22,7 @@ class UserLocation(BaseModel): + """The approximate location of the user.""" city: Optional[str] = None ...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/responses/web_search_tool.py
Add docstrings that explain logic
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Union, Optional from typing_extensions import Literal, Required, TypeAlias, TypedDict __all__ = ["RealtimeTranscriptionSessionAudioInputTurnDetectionParam", "ServerVad", "Semant...
--- +++ @@ -9,6 +9,9 @@ class ServerVad(TypedDict, total=False): + """ + Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence. + """ type: Required[Literal["server_vad"]] """Type of turn detection, `server_vad` to turn on simpl...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_transcription_session_audio_input_turn_detection_param.py
Add docstrings for production code
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing import Dict, Optional from typing_extensions import Literal, Required, TypedDict __all__ = ["ResponseFormatJSONSchema", "JSONSchema"] class JSONSchema(TypedDict, total=False): n...
--- +++ @@ -9,6 +9,7 @@ class JSONSchema(TypedDict, total=False): + """Structured Outputs configuration options, including a JSON Schema.""" name: Required[str] """The name of the response format. @@ -40,9 +41,14 @@ class ResponseFormatJSONSchema(TypedDict, total=False): + """JSON Schema respo...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/shared_params/response_format_json_schema.py
Write docstrings for utility functions
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations from typing_extensions import Literal, Required, TypedDict __all__ = ["RealtimeTruncationRetentionRatioParam", "TokenLimits"] class TokenLimits(TypedDict, total=False): post_instructions: i...
--- +++ @@ -8,6 +8,10 @@ class TokenLimits(TypedDict, total=False): + """Optional custom token limits for this truncation strategy. + + If not provided, the model's default token limits will be used. + """ post_instructions: int """ @@ -20,6 +24,9 @@ class RealtimeTruncationRetentionRatioPa...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/realtime/realtime_truncation_retention_ratio_param.py
Generate descriptive docstrings automatically
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional from typing_extensions import Literal from .._models import BaseModel from .shared.metadata import Metadata __all__ = ["VectorStore", "FileCounts", "ExpiresAfter"] class FileCounts(BaseModel): canc...
--- +++ @@ -27,6 +27,7 @@ class ExpiresAfter(BaseModel): + """The expiration policy for a vector store.""" anchor: Literal["last_active_at"] """Anchor timestamp after which the expiration policy applies. @@ -39,6 +40,9 @@ class VectorStore(BaseModel): + """ + A vector store is a collection ...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/vector_store.py
Write docstrings for utility functions
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, Union, Optional from typing_extensions import Literal from ..._models import BaseModel from ..file_chunking_strategy import FileChunkingStrategy __all__ = ["VectorStoreFile", "LastError"] class LastError(...
--- +++ @@ -10,6 +10,10 @@ class LastError(BaseModel): + """The last error associated with this vector store file. + + Will be `null` if there are no errors. + """ code: Literal["server_error", "unsupported_file", "invalid_file"] """One of `server_error`, `unsupported_file`, or `invalid_file`."...
https://raw.githubusercontent.com/openai/openai-python/HEAD/src/openai/types/vector_stores/vector_store_file.py
Add docstrings with type hints explained
# Copyright 2023 Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LIC...
--- +++ @@ -67,6 +67,10 @@ tokenizer: transformers.PreTrainedTokenizer, model: transformers.PreTrainedModel, ): + """Resize tokenizer and embedding. + + Note: This is the unoptimized version that may make your embedding size not be divisible by 64. + """ num_new_tokens = tokenizer.add_special_to...
https://raw.githubusercontent.com/tatsu-lab/stanford_alpaca/HEAD/train.py
Add docstrings that explain purpose and usage
# Copyright 2023 Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LIC...
--- +++ @@ -25,6 +25,13 @@ def make_diff( path_raw: str, path_tuned: str, path_diff: str, device="cpu", # "cuda" or "cpu" ): + """Make the weight diff. + + This function is given to present full transparency of how the weight diff was created. + + Run: + python weight_diff.py make_diff --path_raw...
https://raw.githubusercontent.com/tatsu-lab/stanford_alpaca/HEAD/weight_diff.py
Generate docstrings for this script
import dataclasses import logging import math import os import io import sys import time import json from typing import Optional, Sequence, Union import openai import tqdm from openai import openai_object import copy StrOrOpenAIObject = Union[str, openai_object.OpenAIObject] openai_org = os.getenv("OPENAI_ORG") if o...
--- +++ @@ -47,6 +47,29 @@ return_text=False, **decoding_kwargs, ) -> Union[Union[StrOrOpenAIObject], Sequence[StrOrOpenAIObject], Sequence[Sequence[StrOrOpenAIObject]],]: + """Decode with OpenAI API. + + Args: + prompts: A string or a list of strings to complete. If it is a chat model the string...
https://raw.githubusercontent.com/tatsu-lab/stanford_alpaca/HEAD/utils.py
Add docstrings to improve code quality
import base64 import sys from pathlib import Path import traceback from typing import List, Optional, Tuple, Dict import click import inquirer import yaml from selenium import webdriver from selenium.common.exceptions import WebDriverException from selenium.webdriver.chrome.service import Service as ChromeService from...
--- +++ @@ -28,10 +28,12 @@ class ConfigError(Exception): + """Custom exception for configuration-related errors.""" pass class ConfigValidator: + """Validates configuration and secrets YAML files.""" EMAIL_REGEX = re.compile(r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$") REQUIRED_...
https://raw.githubusercontent.com/feder-cr/Jobs_Applier_AI_Agent_AIHawk/HEAD/main.py
Write docstrings for backend logic
# app/libs/resume_and_cover_builder/gpt_resume.py import os import textwrap from src.libs.resume_and_cover_builder.utils import LoggerChatModel from langchain_core.output_parsers import StrOutputParser from langchain_core.prompts import ChatPromptTemplate from langchain_openai import ChatOpenAI from dotenv import load_...
--- +++ @@ -1,3 +1,6 @@+""" +Create a class that generates a resume based on a resume and a resume template. +""" # app/libs/resume_and_cover_builder/gpt_resume.py import os import textwrap @@ -31,12 +34,31 @@ @staticmethod def _preprocess_template_string(template: str) -> str: + """ + Prepr...
https://raw.githubusercontent.com/feder-cr/Jobs_Applier_AI_Agent_AIHawk/HEAD/src/libs/resume_and_cover_builder/llm/llm_generate_resume.py
Generate documentation strings for clarity
# app/libs/resume_and_cover_builder/llm_generate_cover_letter_from_job.py import os import textwrap from ..utils import LoggerChatModel from langchain_core.output_parsers import StrOutputParser from langchain_core.prompts import ChatPromptTemplate from langchain_openai import ChatOpenAI, OpenAIEmbeddings from pathlib i...
--- +++ @@ -1,3 +1,6 @@+""" +This creates the cover letter (in html, utils will then convert in PDF) matching with job description and plain-text resume +""" # app/libs/resume_and_cover_builder/llm_generate_cover_letter_from_job.py import os import textwrap @@ -29,12 +32,29 @@ @staticmethod def _preproces...
https://raw.githubusercontent.com/feder-cr/Jobs_Applier_AI_Agent_AIHawk/HEAD/src/libs/resume_and_cover_builder/llm/llm_generate_cover_letter_from_job.py
Create structured documentation for my script
import os import tempfile import textwrap import time import re # For email validation from src.libs.resume_and_cover_builder.utils import LoggerChatModel from langchain_core.output_parsers import StrOutputParser from langchain_core.prompts import ChatPromptTemplate, PromptTemplate from langchain_openai import ChatOpe...
--- +++ @@ -44,9 +44,21 @@ @staticmethod def _preprocess_template_string(template: str) -> str: + """ + Preprocess the template string by removing leading whitespaces and indentation. + Args: + template (str): The template string to preprocess. + Returns: + s...
https://raw.githubusercontent.com/feder-cr/Jobs_Applier_AI_Agent_AIHawk/HEAD/src/libs/resume_and_cover_builder/llm/llm_job_parser.py
Write docstrings describing functionality
# app/libs/resume_and_cover_builder/llm_generate_resume_from_job.py import os from src.libs.resume_and_cover_builder.llm.llm_generate_resume import LLMResumer from src.libs.resume_and_cover_builder.utils import LoggerChatModel from langchain_core.output_parsers import StrOutputParser from langchain_core.prompts import ...
--- +++ @@ -1,3 +1,6 @@+""" +Create a class that generates a job description based on a resume and a job description template. +""" # app/libs/resume_and_cover_builder/llm_generate_resume_from_job.py import os from src.libs.resume_and_cover_builder.llm.llm_generate_resume import LLMResumer @@ -23,36 +26,66 @@ ...
https://raw.githubusercontent.com/feder-cr/Jobs_Applier_AI_Agent_AIHawk/HEAD/src/libs/resume_and_cover_builder/llm/llm_generate_resume_from_job.py
Add docstrings to my Python code
# app/libs/resume_and_cover_builder/manager_facade.py import hashlib import inquirer from pathlib import Path from loguru import logger from src.libs.resume_and_cover_builder.llm.llm_job_parser import LLMParser from src.job import Job from src.utils.chrome_utils import HTML_to_PDF from .config import global_config c...
--- +++ @@ -1,3 +1,6 @@+""" +This module contains the FacadeManager class, which is responsible for managing the interaction between the user and other components of the application. +""" # app/libs/resume_and_cover_builder/manager_facade.py import hashlib import inquirer @@ -12,6 +15,15 @@ class ResumeFacade: ...
https://raw.githubusercontent.com/feder-cr/Jobs_Applier_AI_Agent_AIHawk/HEAD/src/libs/resume_and_cover_builder/resume_facade.py
Write docstrings for backend logic
# Copyright (c) Meta Platforms, Inc. and affiliates. # This software may be used and distributed in accordance with the terms of the Llama 3 Community License Agreement. import json import os import sys import time from pathlib import Path from typing import List, Optional, Tuple, TypedDict import torch import torch....
--- +++ @@ -42,6 +42,28 @@ model_parallel_size: Optional[int] = None, seed: int = 1, ) -> "Llama": + """ + Build a Llama instance by initializing and loading a model checkpoint. + + Args: + ckpt_dir (str): Path to the directory containing checkpoint files. + ...
https://raw.githubusercontent.com/meta-llama/llama3/HEAD/llama/generation.py
Add well-formatted docstrings
import datetime import re import time import os import hashlib import random import pytz import pylru from globals import LRU_CACHE CACHE_SIZE = 10000 CACHE = pylru.lrucache(CACHE_SIZE) # strings longer than this are stored not in ram # but in the file cache MIN_SIZE_FOR_FILECACHE = 80 def _update_answer(answer)...
--- +++ @@ -1,3 +1,6 @@+""" +LRU-Cache implementation for formatted (`format=`) answers +""" import datetime import re @@ -32,6 +35,11 @@ def get_signature(user_agent, query_string, client_ip_address, lang): + """ + Get cache signature based on `user_agent`, `url_string`, + `lang`, and `client_ip_addre...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/lib/cache.py
Create structured documentation for my script
#!/usr/bin/env python # vim: set encoding=utf-8 from gevent.pywsgi import WSGIServer from gevent.monkey import patch_all patch_all() # pylint: disable=wrong-import-position,wrong-import-order import sys import os import jinja2 from flask import Flask, request, send_from_directory, send_file APP = Flask(__name__) ...
--- +++ @@ -45,26 +45,30 @@ @APP.route("/files/<path:path>") def send_static(path): + "Send any static file located in /files/" return send_from_directory(STATIC, path) @APP.route("/favicon.ico") def send_favicon(): + "Send static file favicon.ico" return send_from_directory(STATIC, "favicon.ic...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/bin/srv.py
Add missing documentation to my Python functions
import os def remove_colon_and_strip_from_str(line): return line.replace(":", "").strip() def print_result_for_file(file_path, file_name, duplicate_entries): print("-" * 50) print(f"Processing file: {file_name} \n") # keep entries with more than one occurence if len(duplicate_entries) > 0: ...
--- +++ @@ -2,10 +2,16 @@ def remove_colon_and_strip_from_str(line): + """ + Removes the colon from the line and strips the line. + """ return line.replace(":", "").strip() def print_result_for_file(file_path, file_name, duplicate_entries): + """ + Prints the result for a given file. + "...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/lib/duplicate_translations.py
Generate consistent documentation across files
import os from pathlib import Path from typing import Dict, List, Tuple, Optional import logging # Configure logging logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(levelname)s - %(message)s") class StyleManager: def __init__(self): self.selected_style: Optional[str] = None curre...
--- +++ @@ -18,6 +18,11 @@ logging.debug(f"Styles directory set to: {self.styles_directory}") def get_styles(self) -> Dict[str, Tuple[str, str]]: + """ + Retrieve the available styles from the styles directory. + Returns: + Dict[str, Tuple[str, str]]: A dictionary mapping ...
https://raw.githubusercontent.com/feder-cr/Jobs_Applier_AI_Agent_AIHawk/HEAD/src/libs/resume_and_cover_builder/style_manager.py
Generate docstrings for this script
import time from globals import log def _time_caps(minutes, hours, days): return { "min": minutes, "hour": hours, "day": days, } class Limits(object): def __init__(self, whitelist=None, limits=None): self.intervals = ["min", "hour", "day"] self.divisor = _time_...
--- +++ @@ -1,3 +1,22 @@+""" +Connection limitation. + +Number of connections from one IP is limited. +We have nothing against scripting and automated queries. +Even the opposite, we encourage them. But there are some +connection limits that even we can't handle. +Currently the limits are quite restrictive, but they wi...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/lib/limits.py
Help me document legacy Python code
#!/usr/bin/env python # vim: fileencoding=utf-8 import subprocess EMOJIS = [ "✨", "☁️", "🌫", "🌧", "🌧", "❄️", "❄️", "🌦", "🌦", "🌧", "🌧", "🌨", "🌨", "⛅️", "☀️", "🌩", "⛈", "⛈", "☁️", "🌑", "🌒", "🌓", "🌔", "🌕", ...
--- +++ @@ -1,6 +1,19 @@ #!/usr/bin/env python # vim: fileencoding=utf-8 +""" + +At the moment, Pillow library does not support colorful emojis, +that is why emojis must be extracted to external files first, +and then they must be handled as usual graphical objects +and not as text. + +The files are extracted using ...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/lib/extract_emoji.py
Add structured docstrings to improve clarity
# vim: fileencoding=utf-8 from __future__ import print_function from gevent.pywsgi import WSGIServer from gevent.monkey import patch_all patch_all() # pylint: disable=wrong-import-position,wrong-import-order import sys import os import time import json import hashlib import re import logging import requests impor...
--- +++ @@ -1,5 +1,17 @@ # vim: fileencoding=utf-8 +""" + +The proxy server acts as a backend for the wttr.in service. + +It caches the answers and handles various data sources transforming their +answers into format supported by the wttr.in service. + +If WTTRIN_TEST is specified, it works in a special test mode: +i...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/bin/proxy.py
Please document this code using docstrings
# vim: fileencoding=utf-8 # vim: foldmethod=marker foldenable: import sys import re import math import json import datetime import io import requests import diagram import pyjq import pytz import numpy as np from astral import LocationInfo from astral import moon, sun from scipy.interpolate import interp1d from bab...
--- +++ @@ -1,6 +1,24 @@ # vim: fileencoding=utf-8 # vim: foldmethod=marker foldenable: +""" +[X] emoji +[ ] wego icon +[ ] v2.wttr.in +[X] astronomical (sunset) +[X] time +[X] frames +[X] colorize rain data +[ ] date + locales +[X] wind color +[ ] highlight current date +[ ] bind to real site +[ ] max values: tempe...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/lib/view/v2.py
Write docstrings for data processing functions
#!/usr/bin/python # vim: encoding=utf-8 # pylint: disable=wrong-import-position,wrong-import-order,redefined-builtin from __future__ import print_function import sys import io import os import glob from PIL import Image, ImageFont, ImageDraw import pyte.screens import emoji import grapheme from . import unicodedat...
--- +++ @@ -2,6 +2,18 @@ # vim: encoding=utf-8 # pylint: disable=wrong-import-position,wrong-import-order,redefined-builtin +""" +This module is used to generate png-files for wttr.in queries. +The only exported function is: + +* render_ansi(png_file, text, options=None) + +`render_ansi` is the main function of the ...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/lib/fmt/png.py
Write docstrings for data processing functions
# vim: fileencoding=utf-8 import sys import re import datetime import json import requests from astral import LocationInfo from astral import moon from astral.sun import sun import pytz from constants import ( WWO_CODE, WEATHER_SYMBOL, WEATHER_SYMBOL_WI_NIGHT, WEATHER_SYMBOL_WI_DAY, WIND_DIRECT...
--- +++ @@ -1,5 +1,17 @@ # vim: fileencoding=utf-8 +""" +One-line output mode. + +Initial implementation of one-line output mode. + +[ ] forecast +[ ] spark +[ ] several locations +[ ] location handling +[ ] more preconfigured format lines +[ ] add information about this mode to /:help +""" import sys import re @...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/lib/view/line.py
Please document this code using docstrings
from __future__ import print_function import logging import os import re MYDIR = os.path.abspath(os.path.dirname(os.path.dirname("__file__"))) if "WTTR_GEOLITE" in os.environ: GEOLITE = os.environ["WTTR_GEOLITE"] else: GEOLITE = os.path.join(MYDIR, "data", "GeoLite2-City.mmdb") WEGO = os.environ.get("WTTR_W...
--- +++ @@ -1,3 +1,16 @@+""" +global configuration of the project + +External environment variables: + + WTTR_MYDIR + WTTR_GEOLITE + WTTR_WEGO + WTTR_LISTEN_HOST + WTTR_LISTEN_PORT + WTTR_USER_AGENT + +""" from __future__ import print_function import logging @@ -122,6 +135,7 @@ def error(text)...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/lib/globals.py
Add docstrings to clarify complex logic
#!/usr/bin/env python # vim: set encoding=utf-8 import logging import io import os import time from gevent.threadpool import ThreadPool from flask import render_template, send_file, make_response import fmt.png import parse_query from translations import ( get_message, FULL_TRANSLATION, PARTIAL_TRANSLAT...
--- +++ @@ -1,6 +1,9 @@ #!/usr/bin/env python # vim: set encoding=utf-8 +""" +Main wttr.in rendering function implementation +""" import logging import io @@ -53,6 +56,9 @@ def show_text_file(name, lang): + """ + show static file `name` for `lang` + """ text = "" if name == ":help": ...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/lib/wttr_srv.py
Add well-formatted docstrings
# vim: set encoding=utf-8 # pylint: disable=wrong-import-position import sys import re from gevent.subprocess import Popen, PIPE sys.path.insert(0, "..") from translations import get_message, SUPPORTED_LANGS from globals import ( WEGO, TRANSLATION_TABLE, NOT_FOUND_LOCATION, DEFAULT_LOCATION, ANS...
--- +++ @@ -1,6 +1,10 @@ # vim: set encoding=utf-8 # pylint: disable=wrong-import-position +""" +Main view (wttr.in) implementation. +The module is a wrapper for the modified Wego program. +""" import sys import re @@ -174,6 +178,9 @@ def _htmlize(ansi_output, title, parsed_query): + """Return HTML repres...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/lib/view/wttr.py
Add missing documentation to my Python functions
from __future__ import print_function import datetime import json import os import socket import sys import random import geoip2.database import pycountry import requests from globals import ( GEOLITE, GEOLOCATOR_SERVICE, IP2LCACHE, IP2LOCATION_KEY, NOT_FOUND_LOCATION, ALIASES, BLACKLIS...
--- +++ @@ -1,3 +1,36 @@+""" +All location related functions and converters. + +The main entry point is `location_processing` which gets `location` and +`source_ip_address` and basing on this information generates precise location +description. + + [query] --> [location] --> [(lat,long)] --> + ...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/lib/location.py
Document all public functions with docstrings
# Copyright (c) Meta Platforms, Inc. and affiliates. # This software may be used and distributed in accordance with the terms of the Llama 3 Community License Agreement. import os from logging import getLogger from pathlib import Path from typing import ( AbstractSet, cast, Collection, Dict, Iterat...
--- +++ @@ -36,6 +36,9 @@ class Tokenizer: + """ + Tokenizing and encoding/decoding text using the Tiktoken tokenizer. + """ special_tokens: Dict[str, int] @@ -44,6 +47,12 @@ pat_str = r"(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\r\n\p{L}\p{N}]?\p{L}+|\p{N}{1,3}| ?[^\s\p{L}\p{N}]+[\r\n]*|\s*[\r\n]+|\s+(?...
https://raw.githubusercontent.com/meta-llama/llama3/HEAD/llama/tokenizer.py
Document this module using docstrings
#!/usr/bin/env python3 import json import logging import re import time from datetime import datetime from pathlib import Path from github import Github from github.GithubException import ( BadCredentialsException, GithubException, RateLimitExceededException, UnknownObjectException, ) from scripts.ut...
--- +++ @@ -1,4 +1,9 @@ #!/usr/bin/env python3 +""" +Core module for badge notification system +Shared functionality for both automated and manual badge notifications +Includes security hardening, rate limiting, and error handling +""" import json import logging @@ -23,6 +28,7 @@ class RateLimiter: + """Hand...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/badges/badge_notification_core.py
Add docstrings to incomplete code
#!/usr/bin/env python3 import os import sys from pathlib import Path from scripts.utils.repo_root import find_repo_root # Try to load .env file if it exists try: from dotenv import load_dotenv # type: ignore[import] load_dotenv() except ImportError: pass REPO_ROOT = find_repo_root(Path(__file__)) sys...
--- +++ @@ -1,4 +1,11 @@ #!/usr/bin/env python3 +""" +Badge Issue Notification (GitHub Actions only). + +Creates a single notification issue in a specified GitHub repository +when a resource PR is merged. This script is designed for automated +use in GitHub Actions and is not intended for manual execution. +""" impo...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/badges/badge_notification.py
Please document this code using docstrings
#!/usr/bin/env python3 from __future__ import annotations from pathlib import Path from typing import Any, ClassVar import yaml from scripts.utils.repo_root import find_repo_root REPO_ROOT = find_repo_root(Path(__file__)) class CategoryManager: _instance: ClassVar[CategoryManager | None] = None _data: C...
--- +++ @@ -1,4 +1,17 @@ #!/usr/bin/env python3 +""" +Unified category utilities for awesome-claude-code. +Provides a single source of truth for all category-related operations. + +Usage: + from scripts.categories.category_utils import category_manager + + # Get all categories + categories = category_manager.g...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/categories/category_utils.py
Improve my code by adding docstrings
#!/usr/bin/env python3 from pathlib import Path from scripts.utils.repo_root import find_repo_root REPO_ROOT = find_repo_root(Path(__file__)) # ASCII art for the desktop version ASCII_ART = [ " █████┐ ██┐ ██┐███████┐███████┐ ██████┐ ███┐ ███┐███████┐", "██┌──██┐██│ ██│██┌────┘██┌────┘██┌───██┐████┐ ...
--- +++ @@ -1,4 +1,11 @@ #!/usr/bin/env python3 +""" +Generate responsive SVG logos for the Awesome Claude Code repository. + +This script creates: +- Light and dark theme versions of the ASCII art logo +- The same logo is used for all screen sizes (scales responsively) +""" from pathlib import Path @@ -27,6 +34,7...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/graphics/generate_logo_svgs.py
Add docstrings to existing functions
#!/usr/bin/env python3 import argparse import subprocess import sys from pathlib import Path import yaml from scripts.utils.repo_root import find_repo_root # Add repo root to path for imports REPO_ROOT = find_repo_root(Path(__file__)) sys.path.insert(0, str(REPO_ROOT)) from scripts.categories.category_utils impor...
--- +++ @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +""" +Script to automate adding a new category to awesome-claude-code. +This handles all the necessary file updates and regenerates the README. +""" import argparse import subprocess @@ -18,13 +22,16 @@ class CategoryAdder: + """Handles the process of adding a n...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/categories/add_category.py
Add docstrings that explain purpose and usage
#!/usr/bin/env python3 import hashlib import sys from pathlib import Path from scripts.utils.repo_root import find_repo_root REPO_ROOT = find_repo_root(Path(__file__)) sys.path.insert(0, str(REPO_ROOT)) from scripts.categories.category_utils import category_manager # noqa: E402 def generate_resource_id(display_n...
--- +++ @@ -1,4 +1,7 @@ #!/usr/bin/env python3 +""" +Shared resource ID generation functionality. +""" import hashlib import sys @@ -13,6 +16,17 @@ def generate_resource_id(display_name: str, primary_link: str, category: str) -> str: + """ + Generate a stable resource ID from display name, link, and categ...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/ids/resource_id.py
Generate consistent docstrings
#!/usr/bin/env python3 import argparse import csv import logging import os import sys from datetime import UTC, datetime, timedelta from pathlib import Path import requests from dotenv import load_dotenv from scripts.utils.github_utils import parse_github_url from scripts.utils.repo_root import find_repo_root logge...
--- +++ @@ -1,4 +1,17 @@ #!/usr/bin/env python3 +""" +Repository health check script for the Awesome Claude Code repository. + +This script checks active GitHub repositories listed in THE_RESOURCES_TABLE.csv for: +- Number of open issues +- Date of last push or PR merge (last updated) + +Exits with error if any reposit...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/maintenance/check_repo_health.py
Create docstrings for all classes and functions
#!/usr/bin/env python3 import sys from pathlib import Path from scripts.readme.generators.awesome import AwesomeReadmeGenerator from scripts.readme.generators.base import ReadmeGenerator from scripts.readme.generators.flat import ( FLAT_CATEGORIES, FLAT_SORT_TYPES, ParameterizedFlatListGenerator, ) from s...
--- +++ @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +""" +Template-based README generator for the Awesome Claude Code repository. +Reads resource metadata from CSV and generates README using templates. +""" import sys from pathlib import Path @@ -39,6 +43,7 @@ assets_dir: str, repo_root: str, ) -> ReadmeGenera...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/generate_readme.py
Create docstrings for each class method
from scripts.readme.generators.base import ReadmeGenerator from scripts.readme.markup.visual import ( format_resource_entry as format_visual_resource_entry, ) from scripts.readme.markup.visual import ( generate_repo_ticker as generate_visual_repo_ticker, ) from scripts.readme.markup.visual import ( generat...
--- +++ @@ -1,3 +1,4 @@+"""Visual README generator implementation.""" from scripts.readme.generators.base import ReadmeGenerator from scripts.readme.markup.visual import ( @@ -18,6 +19,7 @@ class VisualReadmeGenerator(ReadmeGenerator): + """Generator for visual/themed README variant with SVG assets.""" ...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/generators/visual.py
Auto-generate documentation strings for this file
from scripts.readme.generators.base import ReadmeGenerator from scripts.readme.markup.minimal import ( format_resource_entry as format_minimal_resource_entry, ) from scripts.readme.markup.minimal import ( generate_section_content as generate_minimal_section_content, ) from scripts.readme.markup.minimal import ...
--- +++ @@ -1,3 +1,4 @@+"""Minimal README generator implementation.""" from scripts.readme.generators.base import ReadmeGenerator from scripts.readme.markup.minimal import ( @@ -15,6 +16,7 @@ class MinimalReadmeGenerator(ReadmeGenerator): + """Generator for plain markdown README classic variant.""" @p...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/generators/minimal.py
Write proper docstrings for these functions
import os from pathlib import Path from scripts.readme.generators.base import ReadmeGenerator from scripts.readme.markup.awesome import ( format_resource_entry as format_awesome_resource_entry, ) from scripts.readme.markup.awesome import ( generate_repo_ticker as generate_awesome_repo_ticker, ) from scripts.r...
--- +++ @@ -1,3 +1,4 @@+"""Awesome README generator implementation.""" import os from pathlib import Path @@ -22,6 +23,7 @@ class AwesomeReadmeGenerator(ReadmeGenerator): + """Generator for awesome-list-style README variant with clean markdown formatting.""" @property def template_filename(self) ...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/generators/awesome.py
Please document this code using docstrings
from __future__ import annotations import contextlib import csv import os import shutil from abc import ABC, abstractmethod from datetime import datetime from pathlib import Path import yaml # type: ignore[import-untyped] from scripts.readme.helpers.readme_config import get_root_style from scripts.readme.helpers.r...
--- +++ @@ -1,3 +1,4 @@+"""Shared base class and helpers for README generators.""" from __future__ import annotations @@ -24,11 +25,13 @@ def load_template(template_path: str) -> str: + """Load a template file.""" with open(template_path, encoding="utf-8") as f: return f.read() def load_o...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/generators/base.py
Add docstrings following best practices
from __future__ import annotations import re from datetime import datetime def extract_github_owner_repo(url: str) -> tuple[str, str] | None: patterns = [ r"github\.com/([^/]+)/([^/]+?)(?:\.git)?/?$", # repo root r"github\.com/([^/]+)/([^/]+)/(?:blob|tree|issues|pull|releases)", # with path ...
--- +++ @@ -1,3 +1,4 @@+"""Shared utility helpers for README generation.""" from __future__ import annotations @@ -6,6 +7,7 @@ def extract_github_owner_repo(url: str) -> tuple[str, str] | None: + """Extract owner and repo from any GitHub URL.""" patterns = [ r"github\.com/([^/]+)/([^/]+?)(?:\....
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/helpers/readme_utils.py
Add standardized docstrings across the file
from __future__ import annotations import glob import os import re from scripts.readme.helpers.readme_utils import format_category_dir_name from scripts.readme.svg_templates.badges import ( generate_resource_badge_svg, render_flat_category_badge_svg, render_flat_sort_badge_svg, ) from scripts.readme.svg_...
--- +++ @@ -1,3 +1,4 @@+"""SVG asset generation and file helpers for README generation.""" from __future__ import annotations @@ -34,6 +35,7 @@ def create_h2_svg_file(text: str, filename: str, assets_dir: str, icon: str = "") -> str: + """Create an animated hero-centered H2 header SVG file.""" svg_cont...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/helpers/readme_assets.py
Add docstrings that explain inputs and outputs
from __future__ import annotations from datetime import datetime, timedelta from scripts.readme.helpers.readme_paths import asset_path_token from scripts.readme.helpers.readme_utils import ( generate_subcategory_anchor, generate_toc_anchor, parse_resource_date, ) def format_resource_entry(row: dict, in...
--- +++ @@ -1,3 +1,4 @@+"""Awesome-list README markdown rendering helpers.""" from __future__ import annotations @@ -12,6 +13,7 @@ def format_resource_entry(row: dict, include_separator: bool = True) -> str: + """Format resource in awesome list style.""" _ = include_separator display_name = row["D...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/markup/awesome.py
Expand my code with proper documentation strings
import os from pathlib import Path import yaml # type: ignore[import-untyped] from scripts.utils.repo_root import find_repo_root REPO_ROOT = find_repo_root(Path(__file__)) def load_config() -> dict: config_path = REPO_ROOT / "acc-config.yaml" try: with open(config_path, encoding="utf-8") as f: ...
--- +++ @@ -1,3 +1,4 @@+"""Configuration loader for README generation.""" import os from pathlib import Path @@ -10,6 +11,7 @@ def load_config() -> dict: + """Load configuration from acc-config.yaml.""" config_path = REPO_ROOT / "acc-config.yaml" try: with open(config_path, encoding="utf-8...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/helpers/readme_config.py
Fill in missing docstrings in my code
from __future__ import annotations from datetime import datetime, timedelta from pathlib import Path from scripts.readme.helpers.readme_assets import ( create_h3_svg_file, ensure_category_header_exists, ensure_separator_svg_exists, get_category_svg_filename, get_section_divider_svg, get_subca...
--- +++ @@ -1,3 +1,4 @@+"""Visual README markup rendering helpers.""" from __future__ import annotations @@ -30,6 +31,7 @@ assets_dir: str | None = None, include_separator: bool = True, ) -> str: + """Format a single resource entry with vintage manual styling for light mode.""" display_name = row...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/markup/visual.py
Auto-generate documentation strings for this file
from __future__ import annotations from datetime import datetime, timedelta from scripts.readme.helpers.readme_utils import ( generate_subcategory_anchor, generate_toc_anchor, parse_resource_date, ) from scripts.utils.github_utils import parse_github_url def format_resource_entry(row: dict, include_sep...
--- +++ @@ -1,3 +1,4 @@+"""Minimal README markdown rendering helpers.""" from __future__ import annotations @@ -12,6 +13,7 @@ def format_resource_entry(row: dict, include_separator: bool = True) -> str: + """Format resource as plain markdown with collapsible GitHub stats.""" _ = include_separator ...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/markup/minimal.py
Add docstrings to meet PEP guidelines
from __future__ import annotations import os from pathlib import Path import yaml # type: ignore[import-untyped] from scripts.readme.helpers.readme_config import CONFIG, get_style_selector_target from scripts.readme.helpers.readme_paths import asset_path_token, resolve_relative_link def generate_style_selector( ...
--- +++ @@ -1,3 +1,4 @@+"""Markdown/HTML rendering helpers shared across README styles.""" from __future__ import annotations @@ -13,6 +14,7 @@ def generate_style_selector( current_style: str, output_path: Path, repo_root: Path | None = None ) -> str: + """Generate the style selector HTML for a README."""...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/markup/shared.py
Generate docstrings for exported functions
import argparse import csv import os import random import re import time from datetime import datetime from pathlib import Path from typing import Any import requests import yaml # type: ignore[import-untyped] from dotenv import load_dotenv from scripts.utils.github_utils import parse_github_resource_url from scrip...
--- +++ @@ -1,3 +1,29 @@+""" +Download resources from the Awesome Claude Code repository CSV file. + +This script downloads all active resources (or filtered subset) from GitHub +repositories listed in the resource-metadata.csv file. It respects rate +limiting and organizes downloads by category. + +Resources are saved...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/resources/download_resources.py
Write documentation strings for class attributes
def generate_resource_badge_svg(display_name, author_name=""): # Get first two letters/initials for the box words = display_name.split() if len(words) >= 2: initials = words[0][0].upper() + words[1][0].upper() else: initials = display_name[:2].upper() # Escape XML special characte...
--- +++ @@ -1,6 +1,13 @@+"""SVG renderers for badges.""" def generate_resource_badge_svg(display_name, author_name=""): + """Generate SVG content for a resource name badge with theme-adaptive colors. + + Uses CSS media queries to switch between light and dark color schemes. + - Light: dark text on transpa...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/svg_templates/badges.py
Create documentation for each function signature
from __future__ import annotations import os import re from pathlib import Path from scripts.utils.repo_root import find_repo_root GENERATED_HEADER = "<!-- GENERATED FILE: do not edit directly -->" ASSET_PATH_PATTERN = re.compile( r"\{\{ASSET_PATH\(\s*(?P<quote>['\"])(?P<path>[^'\"]+)(?P=quote)\s*\)\}\}" ) ASS...
--- +++ @@ -1,3 +1,4 @@+"""Path resolution helpers for README generation.""" from __future__ import annotations @@ -16,17 +17,20 @@ def asset_path_token(filename: str) -> str: + """Return a tokenized asset reference for templates/markup.""" filename = filename.lstrip("/") return f"{{{{ASSET_PATH('...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/helpers/readme_paths.py
Add return value explanations in docstrings
from __future__ import annotations from scripts.readme.helpers.readme_paths import asset_path_token from scripts.readme.helpers.readme_utils import extract_github_owner_repo def generate_shields_badges(owner: str, repo: str) -> str: badge_types = [ ("stars", f"https://img.shields.io/github/stars/{owner}...
--- +++ @@ -1,3 +1,4 @@+"""Flat list README markup rendering helpers.""" from __future__ import annotations @@ -6,6 +7,7 @@ def generate_shields_badges(owner: str, repo: str) -> str: + """Generate shields.io badge HTML for a GitHub repository.""" badge_types = [ ("stars", f"https://img.shields...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/markup/flat.py
Add docstrings with type hints explained
#!/usr/bin/env python3 import json import os import re import sys from pathlib import Path from scripts.utils.repo_root import find_repo_root REPO_ROOT = find_repo_root(Path(__file__)) sys.path.insert(0, str(REPO_ROOT)) from scripts.categories.category_utils import category_manager from scripts.validation.validate_...
--- +++ @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +""" +Parse GitHub Issue form data from resource submissions. +Validates the data and returns structured JSON. +""" import json import os @@ -16,6 +20,14 @@ def parse_issue_body(issue_body: str) -> dict[str, str]: + """ + Parse GitHub issue form body into str...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/resources/parse_issue_form.py
Document helper functions with docstrings
#!/usr/bin/env python3 from __future__ import annotations import csv import os from datetime import datetime from pathlib import Path from scripts.utils.repo_root import find_repo_root REPO_ROOT = find_repo_root(Path(__file__)) __all__ = ["append_to_csv", "generate_pr_content"] def append_to_csv(data: dict[str, ...
--- +++ @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +"""Helpers for resource CSV updates and PR content generation.""" from __future__ import annotations @@ -15,6 +16,7 @@ def append_to_csv(data: dict[str, str]) -> bool: + """Append the new resource to THE_RESOURCES_TABLE.csv using header order.""" csv_path...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/resources/resource_utils.py
Help me write clear docstrings
#!/usr/bin/env python3 import argparse import contextlib import glob import json import os import re import subprocess import sys from datetime import datetime from pathlib import Path from scripts.utils.repo_root import find_repo_root REPO_ROOT = find_repo_root(Path(__file__)) sys.path.insert(0, str(REPO_ROOT)) fr...
--- +++ @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +""" +Create a pull request with a new resource addition. +This script is called by the GitHub Action after approval. +""" import argparse import contextlib @@ -26,21 +30,28 @@ def run_command(cmd: list[str], check: bool = True) -> subprocess.CompletedProcess: + ...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/resources/create_resource_pr.py
Add docstrings to improve code quality
#!/usr/bin/env python3 import sys from datetime import datetime from pathlib import Path from typing import Any from scripts.utils.repo_root import find_repo_root REPO_ROOT = find_repo_root(Path(__file__)) sys.path.insert(0, str(REPO_ROOT)) from scripts.validation.validate_links import validate_url def validate_s...
--- +++ @@ -1,4 +1,11 @@ #!/usr/bin/env python3 +""" +Single resource validation script for the Awesome Claude Code repository. +Validates a single resource before adding it to the CSV. + +This script is used by the issue submission validator and manual validation +workflows to validate resources before they are commit...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/validation/validate_single_resource.py
Add docstrings to my Python code
import logging.handlers import os import sys import logging from loguru import logger from selenium.webdriver.remote.remote_connection import LOGGER as selenium_logger from config import LOG_LEVEL, LOG_SELENIUM_LEVEL, LOG_TO_CONSOLE, LOG_TO_FILE def remove_default_loggers(): root_logger = logging.getLogger() ...
--- +++ @@ -9,6 +9,7 @@ def remove_default_loggers(): + """Remove default loggers from root logger.""" root_logger = logging.getLogger() if root_logger.hasHandlers(): root_logger.handlers.clear() @@ -16,6 +17,7 @@ os.remove("log/app.log") def init_loguru_logger(): + """Initialize...
https://raw.githubusercontent.com/feder-cr/Jobs_Applier_AI_Agent_AIHawk/HEAD/src/logging.py
Fill in missing docstrings in my code
#!/usr/bin/env python3 import argparse import csv import json import logging import os import random import re import sys import time from collections.abc import Mapping from datetime import UTC, datetime, timedelta from pathlib import Path from typing import Any import requests import yaml # type: ignore[import-unt...
--- +++ @@ -1,4 +1,19 @@ #!/usr/bin/env python3 +""" +Link validation script with override support for the Awesome Claude Code repository. +Validates resource URLs and updates CSV with current status, respecting manual overrides. + +Features: +- Validates Primary/Secondary Link URLs using HTTP requests +- Uses PyGithub...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/validation/validate_links.py
Generate docstrings for script automation
import re def generate_toc_row_svg(directory_name, description): # Escape XML entities desc_escaped = description.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;") dir_escaped = directory_name.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;") return f"""<svg width="400" h...
--- +++ @@ -1,8 +1,15 @@+"""SVG renderers for table-of-contents elements.""" import re def generate_toc_row_svg(directory_name, description): + """Generate a dark-mode TOC row SVG in CRT terminal style. + + Args: + directory_name: The directory name (e.g., "agent-skills/") + description: Sho...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/svg_templates/toc.py
Expand my code with proper documentation strings
from datetime import datetime from fields import DESCRIPTION def _render_current(data, for_day="current", already_seen=[]): output = [] for field_name, val in DESCRIPTION.items(): help, name = val try: value = data[field_name] if field_name == "weatherDesc": ...
--- +++ @@ -1,3 +1,7 @@+""" +Rendering weather data in the Prometheus format. + +""" from datetime import datetime @@ -5,6 +9,7 @@ def _render_current(data, for_day="current", already_seen=[]): + "Converts data into prometheus style format" output = [] @@ -47,6 +52,7 @@ def _convert_time_to_min...
https://raw.githubusercontent.com/chubin/wttr.in/HEAD/lib/view/prometheus.py
Turn comments into proper docstrings
from __future__ import annotations import os from datetime import datetime, timedelta from pathlib import Path from scripts.readme.generators.base import ReadmeGenerator, load_template from scripts.readme.helpers.readme_paths import ( ensure_generated_header, resolve_asset_tokens, ) from scripts.readme.helpe...
--- +++ @@ -1,3 +1,4 @@+"""Flat list README generator implementation.""" from __future__ import annotations @@ -52,6 +53,7 @@ class ParameterizedFlatListGenerator(ReadmeGenerator): + """Unified generator for flat list READMEs with category filtering and sort options.""" DAYS_THRESHOLD = 30 # For rel...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/generators/flat.py
Write proper docstrings for these functions
#!/usr/bin/env python3 import logging import subprocess from pathlib import Path class GitUtils: def __init__(self, logger: logging.Logger | None = None): self.logger = logger or logging.getLogger(__name__) def check_command_exists(self, command: str) -> bool: try: result = subp...
--- +++ @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +"""Git and GitHub utility functions for command-line operations.""" import logging import subprocess @@ -6,11 +7,28 @@ class GitUtils: + """Handle git and GitHub operations.""" def __init__(self, logger: logging.Logger | None = None): + """ + ...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/utils/git_utils.py
Create docstrings for API functions
from __future__ import annotations import os import re from dataclasses import dataclass from enum import Enum class Action(Enum): NONE = "none" WARN = "warn" # Medium confidence: warn but don't close CLOSE = "close" # High confidence: warn and close @dataclass class DetectionResult: confidence:...
--- +++ @@ -1,3 +1,20 @@+""" +Detect informal resource submissions that didn't use the issue template. + +Returns a confidence score and recommended action: +- score >= 0.6: High confidence - auto-close with firm warning +- 0.4 <= score < 0.6: Medium confidence - gentle warning, leave open +- score < 0.4: Low confidenc...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/resources/detect_informal_submission.py
Turn comments into proper docstrings
#!/usr/bin/env python3 import csv import os import sys from pathlib import Path from typing import Any import requests from scripts.utils.repo_root import find_repo_root REPO_ROOT = find_repo_root(Path(__file__)) def load_previous_data(csv_path: Path) -> dict[str, dict[str, int]]: if not csv_path.exists(): ...
--- +++ @@ -1,4 +1,11 @@ #!/usr/bin/env python3 +""" +Fetch GitHub repository data for the stock ticker banner. + +This script queries the GitHub Search API for repositories matching +"claude code" or "claude-code" in their name, readme, or description, +calculates deltas compared to previous data, and saves the result...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/ticker/fetch_repo_ticker_data.py
Add return value explanations in docstrings
import time import json import os import random import re import string from functools import partial from multiprocessing import Pool import numpy as np import tqdm from rouge_score import rouge_scorer import utils import fire def encode_prompt(prompt_instructions): prompt = open("./prompt.txt").read() + "\n" ...
--- +++ @@ -1,3 +1,12 @@+""" +batch_selfinstruct_generate.py + +run: +python -m generate_instruction generate_instruction_following_data \ + --output_dir ./ \ + --num_instructions_to_generate 10 \ + --model_name="text-davinci-003" \ +""" import time import json import os @@ -16,6 +25,7 @@ def encode_prompt(pr...
https://raw.githubusercontent.com/tatsu-lab/stanford_alpaca/HEAD/generate_instruction.py
Document helper functions with docstrings
#!/usr/bin/env python3 import csv import sys from pathlib import Path from scripts.utils.repo_root import find_repo_root REPO_ROOT = find_repo_root(Path(__file__)) sys.path.insert(0, str(REPO_ROOT)) def sort_resources(csv_path: Path) -> None: # Load category order from category_utils from scripts.categorie...
--- +++ @@ -1,4 +1,10 @@ #!/usr/bin/env python3 +""" +Sort THE_RESOURCES_TABLE.csv by category, sub-category, and display name. + +This utility ensures resources are properly ordered for consistent presentation +in the generated README and other outputs. +""" import csv import sys @@ -11,6 +17,8 @@ def sort_res...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/resources/sort_resources.py
Generate docstrings for each module
def render_h2_svg(text: str, icon: str = "") -> str: # Build display text with optional icon display_text = f"{text} {icon}" if icon else text # Escape XML special characters text_escaped = display_text.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;") # Calculate viewBox bounds ba...
--- +++ @@ -1,6 +1,13 @@+"""SVG renderers for section headers.""" def render_h2_svg(text: str, icon: str = "") -> str: + """Create an animated hero-centered H2 header SVG string. + + Args: + text: The header text (e.g., "Agent Skills") + icon: Optional icon to append (e.g., an emoji) + """ ...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/svg_templates/headers.py
Write Python docstrings for this snippet
def generate_section_divider_light_svg(variant=1): if variant == 1: # Diagram/schematic style with nodes return """<svg width="900" height="40" xmlns="http://www.w3.org/2000/svg"> <!-- Vintage Technical Manual Style - Diagram Variant (BOLD) --> <!-- Ghost line for layered effect --> <line x...
--- +++ @@ -1,6 +1,12 @@+"""SVG renderers for section dividers and boxes.""" def generate_section_divider_light_svg(variant=1): + """Generate a light-mode section divider SVG. + + Args: + variant: 1, 2, or 3 for different styles + """ if variant == 1: # Diagram/schematic style with no...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/readme/svg_templates/dividers.py
Document classes and their methods
from __future__ import annotations import json import os import re from urllib.parse import quote from github import Auth, Github _DEFAULT_SECONDS_BETWEEN_REQUESTS = 0.5 _DEFAULT_GITHUB_USER_AGENT = "awesome-claude-code bot" _GITHUB_CLIENTS: dict[tuple[str | None, str | None, float], Github] = {} def _normalize_r...
--- +++ @@ -1,3 +1,4 @@+"""GitHub-related utilities shared across scripts.""" from __future__ import annotations @@ -24,6 +25,7 @@ user_agent: str = _DEFAULT_GITHUB_USER_AGENT, seconds_between_requests: float = _DEFAULT_SECONDS_BETWEEN_REQUESTS, ) -> Github: + """Return a cached PyGithub client with o...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/scripts/utils/github_utils.py
Add docstrings to improve collaboration
#!/usr/bin/env python3 from __future__ import annotations import argparse import difflib import fnmatch import os import platform import subprocess import sys from dataclasses import dataclass, field from pathlib import Path import yaml @dataclass class Node: name: str is_dir: bool children: dict[str,...
--- +++ @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +"""Update the README generation tree block from a YAML spec.""" from __future__ import annotations @@ -17,6 +18,7 @@ @dataclass class Node: + """Tree node representing a file or directory.""" name: str is_dir: bool @@ -25,6 +27,7 @@ @dataclass(fro...
https://raw.githubusercontent.com/hesreallyhim/awesome-claude-code/HEAD/tools/readme_tree/update_readme_tree.py
Document this code for team use
# # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by # the Free Softwa...
--- +++ @@ -85,6 +85,7 @@ def find_insert_pos_for_kwargs(lines: list[str]) -> int: + """Finds the correct position to insert the keyword arguments and returns the index.""" for idx, value in reversed(list(enumerate(lines))): # reversed since :returns: is at the end if value.startswith("Returns"): ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/docs/auxil/kwargs_insertion.py
Help me comply with documentation standards
# noqa: INP001 # pylint: disable=import-error import re from collections.abc import Collection from pathlib import Path from chango import Version from chango.concrete import DirectoryChanGo, DirectoryVersionScanner, HeaderVersionHistory from chango.concrete.sections import GitHubSectionChangeNote, Section, SectionVe...
--- +++ @@ -1,5 +1,6 @@ # noqa: INP001 # pylint: disable=import-error +"""Configuration for the chango changelog tool""" import re from collections.abc import Collection @@ -28,6 +29,7 @@ ] ) ): + """Custom change note type for PTB. Mainly overrides get_sections to map labels to sections""" ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/changes/config.py
Document my Python code with docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,12 +16,27 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains two objects that represent a Telegram bots (short) description.""" from telegram._telegramobject import TelegramObject f...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_botdescription.py
Write beginner-friendly docstrings
# !/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by ...
--- +++ @@ -36,6 +36,7 @@ def print_ver_info() -> None: + """Prints version information for python-telegram-bot, the Bot API and Python.""" git_revision = _git_revision() print(f"python-telegram-bot {telegram_ver}" + (f" ({git_revision})" if git_revision else "")) print(f"Bot API {BOT_API_VERSION}...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/__main__.py
Generate docstrings for exported functions
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,12 +16,33 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram Contact.""" from telegram._telegramobject import TelegramObject from telegram._util...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_files/contact.py
Add docstrings for production code
#!/usr/bin/env python # pylint: disable=redefined-builtin # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Les...
--- +++ @@ -17,6 +17,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram Chat.""" import datetime as dtm from collections.abc import Sequence @@ -82,6 +83,10 ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_chat.py
Create documentation strings for testing functions
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represent a Telegram bots name.""" from typing import Final @@ -25,6 +26,20 @@ class BotName(TelegramO...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_botname.py
Generate documentation strings for clarity
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains objects related to chat backgrounds.""" from collections.abc import Sequence from typing import TYPE_CHECKING, Final @@ -3...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_chatbackground.py
Provide docstrings following PEP 257
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram Bot Command.""" from typing import Final @@ -25,6 +26,29 @@ class BotCommand(Tel...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_botcommand.py
Include argument descriptions in docstrings
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -17,6 +17,7 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. # pylint: disable=redefined-builtin +"""This module contains an object that represents a Telegram CallbackQuery""" from collections.abc import Sequenc...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_callbackquery.py
Create docstrings for API functions
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -16,6 +16,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains an object that represents a Telegram Birthday.""" import datetime as dtm @@ -24,6 +25,25 @@ class Birthdate(TelegramO...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_birthdate.py
Add docstrings to incomplete code
#!/usr/bin/env python # pylint: disable=redefined-builtin # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Les...
--- +++ @@ -17,6 +17,7 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/] +"""This module contains the Telegram Business related classes.""" import datetime as dtm from collections.abc import Sequence @@ -45,6 +46,76 @@ ...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_business.py
Create structured documentation for my script
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
--- +++ @@ -17,6 +17,7 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. # pylint: disable=redefined-builtin +"""This module contains objects representing Telegram bot command scopes.""" from typing import TYPE_CHECKING, Fi...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/src/telegram/_botcommandscope.py
Add detailed documentation for each class
# # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2026 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by # the Free Softwa...
--- +++ @@ -15,6 +15,10 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""Functionality in this file is used for getting the [source] links on the classes, methods etc +to link to the correct files & lines on github. C...
https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/HEAD/docs/auxil/link_code.py