Skip to content

Commit

Permalink
Typos and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JWCook committed Aug 8, 2024
1 parent 6c8ff82 commit 98c33ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion naturtag/storage/app_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
@define(auto_attribs=False, slots=False)
class AppState:
"""Container for persistent application state info. This includes values that don't need to be
human-readable/editable; so, they and are persisted in SQLite instead of `settings.yml`.
human-readable/editable, so they are persisted in SQLite instead of ``settings.yml``.
"""

db_path: Path = None # type: ignore
Expand Down
10 changes: 5 additions & 5 deletions naturtag/storage/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ def get_user_observations(
limit: int = DEFAULT_PAGE_SIZE,
page: int = 1,
) -> list[Observation]:
"""Fetch any new observations from the API since last search, save them to the db, and then
return up to `limit` most recent observations from the db
"""Fetch any new user observations from the API since last search, save them to the db,
and then return up to ``limit`` most recent observations from the db
"""
# TODO: Initial load should be done in a separate thread
logger.debug(f'Fetching new user observations since {updated_since}')
Expand All @@ -143,9 +143,9 @@ def get_user_observations(
)
return new_observations[:limit]

# Otherwise get up to `limit` most recent saved observations from the db. This includes ones
# we just fetched and saved; otherwise we can't accurately sort a mix of API results and db
# results by created date in a single query.
# Otherwise get up to `limit` most recent saved observations from the db.
# This includes obs we just fetched and saved; a minor inefficiency, but we can't accurately
# sort a mix of API results and db results by created date within a single query.
obs = get_db_observations(
self.client.db_path,
username=username,
Expand Down

0 comments on commit 98c33ff

Please sign in to comment.