Dima Gerasimov
d244c7cc4e
ruff: enable and fix C4 ruleset
2024-08-28 04:06:32 +01:00
Dima Gerasimov
7bfce72b7c
core: cleanup/sort imports according to ruff check --select I
2024-08-16 11:38:13 +01:00
Dima Gerasimov
7f8a502310
core.common: move assert_subpackage to my.core.internal
2024-08-16 10:22:29 +01:00
Dima Gerasimov
a7439c7846
general: move assert_never to my.core.compat as it's in stdlib from 3.11
...
rely on typing-extensions for fallback
introducing typing-extensions dependency without fallback, should be ok since it's in the top 10 of popular packages
2024-08-16 10:22:29 +01:00
Dima Gerasimov
fe88380499
general: switch to using native 3.8 versions for cached_property/Literal/Protocol instead of compat
2023-05-16 01:18:30 +01:00
Dima Gerasimov
c34656e8fb
general: update mypy config, seems that logs of type: ignore aren't necessary anymore
2023-05-16 01:18:30 +01:00
Kian-Meng Ang
d2ef23fcb4
docs: fix typos
...
found via `codespell -L copie,datas,pres,fo,tooks,noo,ue,ket,frop`
2023-03-27 03:02:35 +01:00
Dima Gerasimov
6493859ba5
my.telegram: initial module from telegram_backup
2023-02-19 01:20:38 +00:00
Dima Gerasimov
5c82d0faa9
switch from using dataset to raw sqlite3 module
...
dataset is kinda unmaintaned and currently broken due to sqlalchemy 2.0 changes
resolves https://github.com/karlicoss/HPI/issues/264
2023-02-07 01:57:00 +00:00
Dima Gerasimov
bf3dd6e931
core/sqlite: experiment at typing SELECT query (to some extent)
...
ideally would be cool to use TypedDict here somehow, but perhaps it'd only be possible after variadic generics https://peps.python.org/pep-0646
2022-06-03 23:49:27 +01:00
Dima Gerasimov
64a4782f0e
core/ci: fix windows-specific issues
...
- use portable separators
- paths should be prepended with r' (so backwards slash isn't treated as escaping)
- sqlite connections should be closed (otherwise windows fails to remove the underlying db file)
- workaround for emojis via PYTHONUTF8=1 test for now
- make ZipPath portable
- properly use tox python environment everywhere
this was causing issues on Windows
e.g.
WARNING: test command found but not installed in testenv
cmd: C:\hostedtoolcache\windows\Python\3.9.12\x64\python3.EXE
2022-05-03 10:16:01 +01:00
Dima Gerasimov
b94120deaf
core/sqlite: add compat version for backup() for python3.6
2021-04-05 08:37:07 +01:00
Dima Gerasimov
f09ca17560
core/sqlite: move tests to separate module, pickling during Pool.submit can't handle importing :(
2021-04-05 08:37:07 +01:00
Dima Gerasimov
e99e8725b1
core/sqlite: add a helper to do an im-memory snapshot of db including WAL
...
+ add a bunch of tests for different WAL behaviours
2021-04-05 08:37:07 +01:00
Dima Gerasimov
f2a339f755
core/sqlite: extract immutable connection helper
...
use in bluemaestro/zotero modules
2021-04-05 08:37:07 +01:00