Skip to content

Commit c803923

Browse files
committed
Lint and format fixes
1 parent ab3b74b commit c803923

File tree

5 files changed

+47
-4
lines changed

5 files changed

+47
-4
lines changed

Makefile

+27-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ pip install --force-reinstall /tmp/liboxide-${VERSION}-py3-none-any.whl
1313
endef
1414
export SCRIPT
1515

16+
ifeq ($(VENV_BIN_ACTIVATE),)
17+
VENV_BIN_ACTIVATE := .venv/bin/activate
18+
endif
19+
1620
dist/liboxide-${VERSION}.tar.gz: $(shell find liboxide -type f)
1721
python -m build --sdist
1822

@@ -31,4 +35,26 @@ install: deploy
3135
test: install
3236
cat test.py | ssh [email protected] /opt/bin/python -u
3337

34-
.PHONY: clean install test deploy
38+
$(VENV_BIN_ACTIVATE):
39+
@echo "Setting up development virtual env in .venv"
40+
python -m venv .venv
41+
. $(VENV_BIN_ACTIVATE); \
42+
python -m pip install ruff
43+
44+
lint: $(VENV_BIN_ACTIVATE)
45+
. $(VENV_BIN_ACTIVATE); \
46+
python -m ruff check
47+
48+
lint-fix: $(VENV_BIN_ACTIVATE)
49+
. $(VENV_BIN_ACTIVATE); \
50+
python -m ruff check
51+
52+
format: $(VENV_BIN_ACTIVATE)
53+
. $(VENV_BIN_ACTIVATE); \
54+
python -m ruff format --diff
55+
56+
format-fix: $(VENV_BIN_ACTIVATE)
57+
. $(VENV_BIN_ACTIVATE); \
58+
python -m ruff format
59+
60+
.PHONY: clean install test deploy lint lint-fix format format-fix

liboxide/__init__.py

+19
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,22 @@
1414
from ._wifi import Network
1515
from ._wifi import WifiAPI as wifi
1616
from ._xdgsettings import Settings as settings
17+
18+
__all__ = [
19+
"Application",
20+
"apps",
21+
"TooFewArguments",
22+
"TooManyArguments",
23+
"ObjectNotFound",
24+
"RotException",
25+
"Notification",
26+
"notification",
27+
"power",
28+
"screen",
29+
"Screenshot",
30+
"system",
31+
"BSS",
32+
"Network",
33+
"wifi",
34+
"settings",
35+
]

liboxide/_notification.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from ._util import classproperty
44
from ._util import rot
55
from ._util import static_init
6-
from ._apps import AppsAPI
76

87

98
class Notification(APIObject):

liboxide/_util.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import subprocess
22
import json
3-
import sys
43

54
from ._errors import TooFewArguments
65
from ._errors import TooManyArguments

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "liboxide"
33
description = "Python wrapper around the oxide command line tools."
44
readme = "README.md"
5-
version = "0.1.1"
5+
version = "0.1.2"
66
requires-python = ">= 3.9"
77
authors = [
88
{name = "Nathaniel van Diepen", email = "[email protected]"},

0 commit comments

Comments
 (0)