mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
fix: Make description field optional in ad_defaults
The description field in the main configuration (ad_defaults) is now optional. Previously, the bot would fail if no description or affixes were provided in the main configuration. This change addresses issue #435. Changes: - Add fallback to empty string ("") when all description prefix/suffix sources are None in __get_description_with_affixes method - Add comprehensive test suite for description handling in test_init.py - Fix coverage path in pyproject.toml from 'kleinanzeigen_bot' to 'src/kleinanzeigen_bot' New tests cover: - Description handling without main config description - New format affixes in configuration - Mixed old/new format affixes - Ad-level affix precedence - None value handling in affixes - Email address @ symbol replacement This change maintains backward compatibility while making the description field optional in the main configuration, improving flexibility for users.
This commit is contained in:
committed by
Sebastian Thomschke
parent
a8f6817c5c
commit
c7f7b832b2
@@ -253,9 +253,9 @@ addopts = """
|
||||
--ignore=data
|
||||
--ignore=dist
|
||||
--ignore=src/kleinanzeigen_bot/__main__.py
|
||||
--cov=kleinanzeigen_bot
|
||||
--cov=src/kleinanzeigen_bot
|
||||
--cov-report=term-missing
|
||||
"""
|
||||
"""
|
||||
markers = [
|
||||
"itest: marks a test as an integration test (i.e. a test with external dependencies)",
|
||||
"asyncio: mark test as async"
|
||||
|
||||
Reference in New Issue
Block a user