Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Benyamin Ginzburg committed Aug 12, 2024
1 parent 4ef5998 commit 476038b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bus_bot/clients/bus_api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async def prepare_station_schedule(station_id: int, is_last_update: bool = False
formatted_lines = ['<code>No incoming routes found for the next 30 minutes...</code>']

response_lines.extend(formatted_lines)
status = '<i>\n\nInformation is updating...</i>' if not is_last_update else '<b>\n\nMessage not updating!</b>'
status = '<i>\n\nInformation is updating...</i>' if not is_last_update else '<b>\n\nMessage is not updating!</b>'
response_lines.append(status)

response = '\n'.join(response_lines)
Expand Down
11 changes: 9 additions & 2 deletions bus_bot/clients/bus_api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,18 @@ class IncomingRoutesResponse(BaseModel):
incoming_routes: List['IncomingRoute']


class Agency(BaseModel):
id: int
name: str
url: str
phone: str


class Stop(BaseModel):
id: int
code: int
name: str
city: str
city: str | None
street: Optional[str] = None
floor: Optional[str] = None
platform: Optional[str] = None
Expand All @@ -29,7 +36,7 @@ class Stop(BaseModel):

class Route(BaseModel):
id: str
agency_id: str
agency: Agency
short_name: str
from_stop_name: str
to_stop_name: str
Expand Down
2 changes: 1 addition & 1 deletion bus_bot/clients/map_generator/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


def _get_marker_color(stop: Stop) -> str:
if stop.floor == 'תחנת רכבת':
if stop.floor == 'תחנת רכבת' or stop.city is None:
color = '#066ed6'
else:
color = 'd60606'
Expand Down
2 changes: 1 addition & 1 deletion bus_bot/texts.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


# Keyboards
cancel_updating_button = '🛑 Cancel updating'
cancel_updating_button = '🛑 Stop updating'
add_to_saved_button = '🔖 Add to saved stops'
remove_from_saved_button = '❌ Remove'
done_button = 'Done'
Expand Down

0 comments on commit 476038b

Please sign in to comment.