ruff lint fixes

This commit is contained in:
Tim Bendt
2025-05-08 12:03:38 -06:00
parent eba883a465
commit 9f4ec1b6c5
9 changed files with 6 additions and 24 deletions

View File

@@ -242,7 +242,7 @@ async def fetch_calendar_async(headers, progress, task_id):
# Get the next page URL from @odata.nextLink # Get the next page URL from @odata.nextLink
calendar_url = response_data.get('@odata.nextLink') calendar_url = response_data.get('@odata.nextLink')
output_file = f'output_ics/outlook_events_latest.ics' output_file = 'output_ics/outlook_events_latest.ics'
if not dry_run: if not dry_run:
os.makedirs(os.path.dirname(output_file), exist_ok=True) os.makedirs(os.path.dirname(output_file), exist_ok=True)
progress.console.print(f"Saving events to {output_file}...") progress.console.print(f"Saving events to {output_file}...")
@@ -300,7 +300,7 @@ async def save_mime_to_maildir_async(maildir_path, email_data, attachments_dir,
target_dir = 'cur' if email_data.get('isRead', False) else 'new' target_dir = 'cur' if email_data.get('isRead', False) else 'new'
id = email_data.get('id', '') id = email_data.get('id', '')
if not id: if not id:
progress.console.print(f"Message ID not found. Skipping save.") progress.console.print("Message ID not found. Skipping save.")
return return
email_filename = f"{id}.eml" email_filename = f"{id}.eml"
email_filepath = os.path.join(maildir_path, target_dir, email_filename) email_filepath = os.path.join(maildir_path, target_dir, email_filename)

View File

@@ -1,5 +1,4 @@
import asyncio
async def action_newest(app) -> None: async def action_newest(app) -> None:
"""Show the previous email message by finding the next lower ID from the list of envelope IDs.""" """Show the previous email message by finding the next lower ID from the list of envelope IDs."""

View File

@@ -1,15 +1,3 @@
import logging
from typing import Iterable
from textual import on
from textual.app import App, ComposeResult, SystemCommand
from textual.logging import TextualHandler
from textual.screen import Screen
from textual.widgets import Header, Footer, Static, Label, Input, Button
from textual.reactive import Reactive
from textual.binding import Binding
from textual.timer import Timer
from textual.containers import ScrollableContainer, Horizontal, Vertical, Grid
import asyncio
async def action_next(app) -> None: async def action_next(app) -> None:
"""Show the next email message by finding the next higher ID from the list of envelope IDs.""" """Show the next email message by finding the next higher ID from the list of envelope IDs."""

View File

@@ -1,5 +1,4 @@
import asyncio
def action_oldest(app) -> None: def action_oldest(app) -> None:
"""Show the previous email message by finding the next lower ID from the list of envelope IDs.""" """Show the previous email message by finding the next lower ID from the list of envelope IDs."""

View File

@@ -1,5 +1,4 @@
import subprocess
def action_previous(app) -> None: def action_previous(app) -> None:
"""Show the previous email message by finding the next lower ID from the list of envelope IDs.""" """Show the previous email message by finding the next lower ID from the list of envelope IDs."""

View File

@@ -1,5 +1,4 @@
import logging import logging
import subprocess
from textual.logging import TextualHandler from textual.logging import TextualHandler

View File

@@ -1,7 +1,5 @@
import asyncio import asyncio
import subprocess
from textual import work
from maildir_gtd.screens.CreateTask import CreateTaskScreen from maildir_gtd.screens.CreateTask import CreateTaskScreen

View File

@@ -21,7 +21,7 @@ from textual.widgets import Footer, Static, Label, Markdown, ListView, ListItem
from textual.reactive import reactive, Reactive from textual.reactive import reactive, Reactive
from textual.binding import Binding from textual.binding import Binding
from textual.timer import Timer from textual.timer import Timer
from textual.containers import ScrollableContainer, Grid, Vertical, Horizontal from textual.containers import ScrollableContainer, Vertical, Horizontal
from actions.archive import archive_current from actions.archive import archive_current
from actions.delete import delete_current from actions.delete import delete_current

View File

@@ -1,7 +1,7 @@
from textual.reactive import Reactive from textual.reactive import Reactive
from textual.app import RenderResult, ComposeResult from textual.app import ComposeResult
from textual.widgets import Static, Label from textual.widgets import Label
from textual.containers import Vertical, Horizontal, Container, ScrollableContainer from textual.containers import Horizontal, ScrollableContainer
class EnvelopeHeader(ScrollableContainer): class EnvelopeHeader(ScrollableContainer):