Skip to content

Commit

Permalink
ci: bump requests to 2.31.0 to fix compatibility issue (#17)
Browse files Browse the repository at this point in the history
* bump requests to 2.31.0 to fix compatibility issue

Signed-off-by: Rui Chen <[email protected]>

* bump ci to use py3.10

Signed-off-by: Rui Chen <[email protected]>

* run `black format`

Signed-off-by: Rui Chen <[email protected]>

---------

Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 authored Apr 22, 2024
1 parent 7900226 commit 37ef6b6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
python-version: "3.10"

- name: Run black
run: |
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
python-version: "3.10"

- name: Run mypy
run: |
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
python-version: "3.10"

- name: Run tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
python-version: "3.10"

- name: Deploy to PyPI
env:
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ incremental = true
namespace_packages = true
no_implicit_optional = true
pretty = true
python_version = 3.8
python_version = 3.10
show_column_numbers = true
show_error_codes = true
show_error_context = true
Expand Down
4 changes: 2 additions & 2 deletions mypy_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mypy==0.961
types-requests==2.28.0
types-requests==2.31.0
flask==2.1.2
fuzzywuzzy==0.18.0
python-Levenshtein==0.12.2
python-Levenshtein==0.12.2
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
requests~=2.26.0
requests~=2.31.0
8 changes: 5 additions & 3 deletions terra/api/api_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ def _parse_api_body(

return DataReturned(
user=Auser,
data=[MODEL_MAPPING[dtype]().from_dict(item) for item in body["data"]]
if body.get("data") or body.get("data") == []
else [],
data=(
[MODEL_MAPPING[dtype]().from_dict(item) for item in body["data"]]
if body.get("data") or body.get("data") == []
else []
),
type=dtype,
)
elif dtype in DTYPE_TO_RESPONSE.keys():
Expand Down

0 comments on commit 37ef6b6

Please sign in to comment.