Modernize code to Python 3.6+ (#1158)

* Compact dict and set building
* Remove redundant parentheses
* Simplify chained conditions
* Change method name to lowercase
* Use triple double quotes for docstrings

Thanks, @eumiro!
This commit is contained in:
Miroslav Šedivý 2020-12-23 18:04:32 +01:00 committed by GitHub
commit a882d67962
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 76 additions and 82 deletions

View file

@ -789,7 +789,7 @@ def test_table_shape_object(app_client):
} == response.json
def test_table_shape_object_compound_primary_Key(app_client):
def test_table_shape_object_compound_primary_key(app_client):
response = app_client.get("/fixtures/compound_primary_key.json?_shape=object")
assert {"a,b": {"pk1": "a", "pk2": "b", "content": "c"}} == response.json
@ -871,7 +871,7 @@ def test_validate_page_size(app_client, path, expected_error):
def test_page_size_zero(app_client):
"For _size=0 we return the counts, empty rows and no continuation token"
"""For _size=0 we return the counts, empty rows and no continuation token"""
response = app_client.get("/fixtures/no_primary_key.json?_size=0")
assert 200 == response.status
assert [] == response.json["rows"]