ruff: enable W, COM, EXE rules
This commit is contained in:
parent
ac08af7aab
commit
c5df3ce128
9 changed files with 19 additions and 14 deletions
|
@ -1,4 +1,3 @@
|
|||
#!/usr/bin/python3
|
||||
"""
|
||||
[[https://bluemaestro.com/products/product-details/bluetooth-environmental-monitor-and-logger][Bluemaestro]] temperature/humidity/pressure monitor
|
||||
"""
|
||||
|
|
|
@ -136,7 +136,7 @@ def canonical_name(repo: Path) -> str:
|
|||
# else:
|
||||
# rname = r.name
|
||||
# if 'backups/github' in repo:
|
||||
# pass # TODO
|
||||
# pass # TODO
|
||||
|
||||
|
||||
def _fd_path() -> str:
|
||||
|
|
|
@ -242,7 +242,7 @@ def test_pure() -> None:
|
|||
src = Path(__file__).read_text()
|
||||
# 'import my' is allowed, but
|
||||
# dont allow anything other HPI modules
|
||||
assert re.findall('import ' + r'my\.\S+', src, re.M) == []
|
||||
assert re.findall('import ' + r'my\.\S+', src, re.MULTILINE) == []
|
||||
assert 'from ' + 'my' not in src
|
||||
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ def _process_db_threads_db2(db: sqlite3.Connection) -> Iterator[Res[Entity]]:
|
|||
|
||||
for r in db.execute(
|
||||
'''
|
||||
SELECT *, json_extract(sender, "$.user_key") AS user_key FROM messages
|
||||
SELECT *, json_extract(sender, "$.user_key") AS user_key FROM messages
|
||||
WHERE msg_type NOT IN (
|
||||
-1, /* these don't have any data at all, likely immediately deleted or something? */
|
||||
2 /* these are 'left group' system messages, also a bit annoying since they might reference nonexistent users */
|
||||
|
|
|
@ -239,7 +239,7 @@ def plot_one(sleep: SleepEntry, fig, axes, xlims=None, *, showtext=True):
|
|||
# axes.title.set_size(10)
|
||||
|
||||
if showtext:
|
||||
axes.text(xlims[1] - timedelta(hours=1.5), 20, str(sleep),)
|
||||
axes.text(xlims[1] - timedelta(hours=1.5), 20, str(sleep))
|
||||
# plt.text(sleep.asleep(), 0, hhmm(sleep.asleep()))
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#!/usr/bin/env python3
|
||||
import csv
|
||||
from datetime import datetime
|
||||
from typing import Iterator, List, NamedTuple
|
||||
|
|
|
@ -58,7 +58,7 @@ class MyTodo:
|
|||
def get_status(self) -> str:
|
||||
if 'STATUS' not in self.todo:
|
||||
return None # type: ignore
|
||||
# TODO 'COMPLETED'?
|
||||
# TODO 'COMPLETED'?
|
||||
return str(self.todo['STATUS'])
|
||||
|
||||
# TODO tz?
|
||||
|
|
|
@ -18,7 +18,7 @@ from my.config import telegram as user_config
|
|||
class config(user_config.telegram_backup):
|
||||
# path to the export database.sqlite
|
||||
export_path: PathIsh
|
||||
|
||||
|
||||
|
||||
@dataclass
|
||||
class Chat:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue