Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $ pip install python-picnic-api2
Then create a new instance of `PicnicAPI` and login using your credentials:

```python
from python_picnic_api import PicnicAPI
from python_picnic_api2 import PicnicAPI

picnic = PicnicAPI(username='username', password='password', country_code="NL")
```
Expand Down Expand Up @@ -99,4 +99,4 @@ picnic.get_delivery_slots()

```python
{'delivery_slots': [{'slot_id': 'XXYYZZ', 'hub_id': 'YYY', 'fc_id': 'FCX', 'window_start': '2025-04-29T17:15:00.000+02:00', 'window_end': '2025-04-29T19:15:00.000+02:00'...
```
```
2 changes: 1 addition & 1 deletion src/python_picnic_api2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
return None

color_regex = re.compile(r"#\(#\d{6}\)")
producer = re.sub(color_regex, "", str(article_details[1]["markdown"]))
producer = re.sub(color_regex, "", str(article_details[1].get("markdown", "")))

Check warning on line 117 in src/python_picnic_api2/client.py

View check run for this annotation

Codecov / codecov/patch

src/python_picnic_api2/client.py#L117

Added line #L117 was not covered by tests
article_name = re.sub(color_regex, "", str(article_details[0]["markdown"]))

article = {"name": f"{producer} {article_name}", "id": article_id}
Expand Down