refactor!: use SQLite and SQLAlchemy for database backend (#332)

* use sqlite + sqlalchemy as a database backend

* change entries getter

* page filterstate.page_size persistent

* add test for entry.id filter

* fix closing library

* fix tag search, adding field

* add field position

* add fields reordering

* use folder

* take field position into consideration

* fix adding tag

* fix test

* try to catch the correct exception, moron

* dont expunge subtags

* DRY models

* rename LibraryField, add is_default property

* remove field.position unique constraint
This commit is contained in:
yed
2024-09-09 12:06:01 +07:00
committed by GitHub
parent 67f7e4dcf9
commit e5e7b8afc6
85 changed files with 4803 additions and 6752 deletions

View File

@@ -1,9 +1,33 @@
[tool.ruff]
exclude = ["main_window.py", "home_ui.py", "resources.py", "resources_rc.py"]
[tool.ruff.lint]
select = ["E", "F", "UP", "B", 'SIM']
ignore = ["E402", "E501", "F541"]
[tool.mypy]
strict_optional = false
disable_error_code = ["union-attr", "annotation-unchecked", "import-untyped"]
disable_error_code = ["func-returns-value", "import-untyped"]
explicit_package_bases = true
warn_unused_ignores = true
exclude = ['tests']
check_untyped_defs = true
[[tool.mypy.overrides]]
module = "tests.*"
ignore_errors = true
[[tool.mypy.overrides]]
module = "src.qt.main_window"
ignore_errors = true
[[tool.mypy.overrides]]
module = "src.qt.ui.home_ui"
ignore_errors = true
[[tool.mypy.overrides]]
module = "src.core.ts_core"
ignore_errors = true
[tool.pytest.ini_options]
#addopts = "-m 'not qt'"
qt_api = "pyside6"