Skip to content

Commit

Permalink
chore: ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Oct 18, 2024
1 parent a564d34 commit 9a70853
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dooit/ui/api/api_components/formatters/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .._base import ApiComponent
from .model_formatters import TodoFormatter, WorkspaceFormatter

if TYPE_CHECKING: # pragma: no cover
if TYPE_CHECKING: # pragma: no cover
from dooit.ui.api.dooit_api import DooitAPI


Expand Down
1 change: 0 additions & 1 deletion dooit/ui/api/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def load_file(api: "PluginManager", path: Path) -> bool:


def load_dir(api: "PluginManager", path: Path) -> bool:

# allows users to import from the directory
sys.path.append(str(path.resolve()))

Expand Down
2 changes: 1 addition & 1 deletion dooit/ui/api/plug.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from dooit.ui.events.events import DooitEvent, Startup
from .loader import load_dir, load_file

if TYPE_CHECKING: # pragma: no cover
if TYPE_CHECKING: # pragma: no cover
from dooit.ui.api.dooit_api import DooitAPI


Expand Down
6 changes: 3 additions & 3 deletions dooit/ui/tui.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def get_mode(self) -> ModeType:
def current_theme(self) -> DooitThemeBase:
return self.api.css.theme

async def poll(self): # pragma: no cover
async def poll(self): # pragma: no cover
def refresh_all_trees():
trees = self.query(ModelTree)
for tree in trees:
Expand All @@ -93,9 +93,9 @@ def global_message(self, event: DooitEvent):
def change_status(self, event: ModeChanged):
self._mode = event.mode

async def action_open_url(self, url: str) -> None: # pragma: no cover
async def action_open_url(self, url: str) -> None: # pragma: no cover
webbrowser.open(url, new=2)


if __name__ == "__main__": # pragma: no cover
if __name__ == "__main__": # pragma: no cover
Dooit().run()
2 changes: 1 addition & 1 deletion dooit/ui/widgets/renderers/base_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, model: ModelType, tree: "ModelTree"):
self.tree = tree
self.post_init()

def post_init(self): # pragma: no cover
def post_init(self): # pragma: no cover
pass

def matches_filter(self, filter: str) -> bool:
Expand Down
2 changes: 2 additions & 0 deletions tests/test_core/test_css_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def test_css_manager():
manager.set_theme("test_theme")
assert manager.theme is TestTheme


# ----------------------------------------

RANDOM_CSS = """
Expand All @@ -36,6 +37,7 @@ def test_css_manager():
}
"""


def test_css_injections():
cache_path = Path(TemporaryDirectory().name)
manager = CssManager(cache_path=cache_path)
Expand Down

0 comments on commit 9a70853

Please sign in to comment.