Skip to content

Commit b6510bc

Browse files
support for latest Things database, cleanup
1 parent 8e039ea commit b6510bc

File tree

7 files changed

+14
-18
lines changed

7 files changed

+14
-18
lines changed

.coveragerc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
[report]
2+
23
exclude_lines =
34
if __name__ == .__main__.:
45
pragma: no cover
56

6-
[run]
7-
87
omit =
98
setup.py
109
*/__init__.py
1110
src/*_app.py
1211
tests/*
13-
*site-packages*
12+
*/site-packages/*

Makefile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ clean: ## Cleanup
5252

5353
auto-style: ## Style the code
5454
@echo "isort..."
55-
@if type isort >/dev/null 2>&1 ; then isort -rc . ; \
55+
@if type isort >/dev/null 2>&1 ; then isort . ; \
5656
else echo "SKIPPED. Run '$(PIP) install isort' first." >&2 ; fi
5757
@echo "autoflake..."
5858
@if type autoflake >/dev/null 2>&1 ; then autoflake -r --in-place --remove-unused-variables . ; \
@@ -78,20 +78,17 @@ code-lint: ## Lint the code
7878
@if type pylama >/dev/null 2>&1 ; then pylama $(SRC_CORE) ; \
7979
else echo "SKIPPED. Run '$(PIP) install pylama' first." >&2 ; fi
8080
@echo Pylint...
81-
@if type pylint >/dev/null 2>&1 ; then pylint $(SRC_CORE) ; \
81+
@if type pylint >/dev/null 2>&1 ; then pylint -sn $(SRC_CORE) ; \
8282
else echo "SKIPPED. Run '$(PIP) install pylint' first." >&2 ; fi
8383
@echo Flake...
8484
@if type flake8 >/dev/null 2>&1 ; then flake8 $(SRC_CORE) ; \
8585
else echo "SKIPPED. Run '$(PIP) install flake8' first." >&2 ; fi
8686
@echo Pyright...
87-
@if type pyright >/dev/null 2>&1 ; then pyright $(SRC_CORE) ; \
87+
@if type pyright >/dev/null 2>&1 ; then PYRIGHT_PYTHON_FORCE_VERSION=latest pyright $(SRC_CORE) ; \
8888
else echo "SKIPPED. Run 'npm install -f pyright' first." >&2 ; fi
8989
@echo MyPy...
9090
@if type mypy >/dev/null 2>&1 ; then mypy --ignore-missing-imports $(SRC_CORE) ; \
9191
else echo "SKIPPED. Run '$(PIP) install mypy' first." >&2 ; fi
92-
@echo Fixit...
93-
@if type fixit >/dev/null 2>&1 ; then cd $(SRC_CORE) ; fixit run_rules ; \
94-
else echo "SKIPPED. Run '$(PIP) install fixit' first." >&2 ; fi
9592

9693
lint: code-style code-lint ## Lint everything
9794

@@ -125,7 +122,7 @@ upload: build ## Upload the code
125122
@twine upload dist/$(APP)*
126123

127124
db-to-things:
128-
@cp tests/main.sqlite* ~/Library/Group\ Containers/JLMPQHK86H.com.culturedcode.ThingsMac/Things\ Database.thingsdatabase/
125+
@cp tests/main.sqlite* ~/Library/Group\ Containers/JLMPQHK86H.com.culturedcode.ThingsMac/ThingsData-*/Things\ Database.thingsdatabase/
129126

130127
db-from-things:
131-
@cp ~/Library/Group\ Containers/JLMPQHK86H.com.culturedcode.ThingsMac/Things\ Database.thingsdatabase/main.sqlite* tests/
128+
@cp ~/Library/Group\ Containers/JLMPQHK86H.com.culturedcode.ThingsMac/ThingsData-*/Things\ Database.thingsdatabase/main.sqlite* tests

tests/main.sqlite

4 KB
Binary file not shown.

tests/main.sqlite-shm

0 Bytes
Binary file not shown.

tests/main.sqlite-wal

16.3 KB
Binary file not shown.

tests/main.sqlite.temporary-shm

32 KB
Binary file not shown.

things_cli/cli.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -391,13 +391,13 @@ def get_parser(cls):
391391

392392
def defaults(self):
393393
"""Set default options for the new API."""
394-
return dict(
395-
project=self.filter_project,
396-
area=self.filter_area,
397-
tag=self.filter_tag,
398-
include_items=self.recursive,
399-
filepath=self.database,
400-
)
394+
return {
395+
"project": self.filter_project,
396+
"area": self.filter_area,
397+
"tag": self.filter_tag,
398+
"include_items": self.recursive,
399+
"filepath": self.database,
400+
}
401401

402402
def main(self, args=None):
403403
"""Start the main app."""

0 commit comments

Comments
 (0)