Skip to content

Commit

Permalink
need newer black for 3.9 and reformat a couple of files
Browse files Browse the repository at this point in the history
  • Loading branch information
matjam committed Jan 12, 2024
1 parent ea94df8 commit cb9fb5f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
test_requires = ["pytest", "pytest-cov", "pytest-mock"]
dev_requires = test_requires + [
"autopep8>=1.4.4",
'black>=18.0.b0,<19;python_version>="3.6"',
"black>=23.12.1",
"flake8",
"ipython",
"isort>=4.3.21",
Expand Down
3 changes: 1 addition & 2 deletions src/savage/api/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,7 @@ def _get_latest_time_slice(table, session, conds, include_deleted, limit, offset


def _get_limit_and_offset(page, page_size):
"""Returns a 0-indexed offset and limit based on page and page_size for a MySQL query.
"""
"""Returns a 0-indexed offset and limit based on page and page_size for a MySQL query."""
if page < 1:
raise ValueError("page must be >= 1")
limit = page_size
Expand Down
6 changes: 2 additions & 4 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,7 @@ def test_get_products_after_version(session, user_table, get_api_test_setup):


def test_fields_query(session, user_table, get_api_test_setup):
"""Test specifying fields and make sure dedup happens correctly.
"""
"""Test specifying fields and make sure dedup happens correctly."""
p1_history, p2_history, p3_history = get_api_test_setup
conds = [{"product_id": 10}]

Expand Down Expand Up @@ -329,8 +328,7 @@ def test_fields_query(session, user_table, get_api_test_setup):


def test_failure_conditions(session, user_table, get_api_test_setup):
"""Pass invalid conds arguments and ensure the query fails.
"""
"""Pass invalid conds arguments and ensure the query fails."""
conds = [{"product_id": 10, "foo": 15}]
with pytest.raises(ValueError):
get(user_table, session, t1=datetime.utcfromtimestamp(31), conds=conds)
Expand Down

0 comments on commit cb9fb5f

Please sign in to comment.