This pull request focuses on improving the documentation and readability of the Webex meme bot application by adding docstrings and minor formatting adjustments. Here's a breakdown of the changes: * **Docstrings:** * Added module-level docstrings to `app/close.py`, `app/img.py`, and `app/main.py` providing a high-level overview of the purpose of each module. * Added docstrings to classes (`ExitCommand`, `MakeMemeCommand`, `MakeMemeCallback`) describing their role. * Added docstrings to methods within those classes (`__init__`, `pre_execute`, `execute`, `post_execute`) explaining their functionality, arguments, and return values where applicable. The `get_templates` and `format_meme_string` functions in `app/img.py` have been documented as well. * **Formatting:** * Added a line break before the return type annotation in function definitions (e.g., `def execute(...) -> Response:`). * Added the disable comment `# pylint: disable=line-too-long` to a line in `app/meme.py` to disable pylint for that line. * Added the disable comment `# pylint: disable=unused-argument` to the `pre_execute`, `execute`, and `post_execute` methods to disable pylint checks about unused arguments. This is because these methods are part of an interface and must have the same signature even if some arguments are unused. * **Variable Naming:** * Renamed the `vars` dictionary to `env_vars` in `tests/test_config.py` for better clarity. * **Test Update:** * Added a docstring to the `test_config` function in `tests/test_config.py` to explain its functionality. * **Imports Update:** * Updated imports in `tests/test_config.py` to disable pylint for wrong-import-position errors using `# pylint: disable=wrong-import-position`. In essence, these changes enhance the maintainability and understandability of the codebase through comprehensive documentation and minor code style improvements. Reviewed-on: #487
38 lines
733 B
TOML
38 lines
733 B
TOML
[project]
|
|
name = "webexmemebot"
|
|
version = "0.0.0"
|
|
description = "Webex-based meme generation bot using memegen.link."
|
|
readme = "README.md"
|
|
authors = [
|
|
{name = "luketainton"},
|
|
]
|
|
requires-python = ">=3.11.2"
|
|
dependencies = [
|
|
"webex-bot<1.0.0,>=0.5.2",
|
|
"pillow<12.0.0,>=11.0.0",
|
|
"astroid<=3.3.10",
|
|
]
|
|
|
|
[tool.uv]
|
|
dev-dependencies = [
|
|
"black<25.2.0,>=25.1.0",
|
|
"coverage<8.0.0,>=7.6.10",
|
|
"isort<6.1.0,>=6.0.0",
|
|
"pylint<4.0.0,>=3.3.2",
|
|
"pylint-exit<2.0.0,>=1.2.0",
|
|
"pytest<9.0.0,>=8.3.4",
|
|
"pre-commit<5.0.0,>=4.0.1",
|
|
]
|
|
|
|
[project.scripts]
|
|
meme = "app.main:main"
|
|
|
|
[tool.pdm.build]
|
|
includes = []
|
|
[build-system]
|
|
requires = ["pdm-backend"]
|
|
build-backend = "pdm.backend"
|
|
|
|
[tool.black]
|
|
line-length = 120
|