Refactor code structure and enhance documentation in main modules

- Updated `pyproject.toml` to include configuration for `ruff` linting tool.
- Improved `download_build.py` by adding a docstring to the `dowload` function.
- Refactored `__main__.py` for clarity and consistency in path handling.
- Enhanced `extract.py` with detailed docstrings for error classes and functions.
This commit is contained in:
2025-05-03 18:13:58 +02:00
parent d6df9c76d0
commit 1749dbffc7
4 changed files with 47 additions and 18 deletions

View File

@@ -7,7 +7,11 @@ URL = "https://raw.githubusercontent.com/Discord-Datamining/Discord-Datamining/r
def dowload() -> str:
"""Download the latest discord build from the datamining repository.
Returns the content of the file as a string.
"""
print("Downloading the latest discord build")
response = requests.get(URL)
response = requests.get(URL, timeout=10)
response.raise_for_status()
return response.text