Skip to content

Commit

Permalink
Remove unused typing
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-lebon committed Nov 10, 2024
1 parent 5d7d13a commit f0d7a8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ctfcli/core/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Mapping, Union, Optional, List, Any, Tuple
from typing import Mapping
from urllib.parse import urljoin

from requests import Session
Expand Down Expand Up @@ -53,7 +53,7 @@ def request(self, method, url, data=None, files=None, *args, **kwargs):
# For files, the structure can be List[Tuple[str, Tuple[str, str, Optional[str]]]]
# Example: [ ('file', ('doc.pdf', open('doc.pdf'), 'text/plain') ) ]

fields = list() # type: List[Tuple[str, Any]]
fields = list()
if isinstance(data, dict):
# int are not allowed as value in MultipartEncoder
fields = list(map(lambda v: (v[0], str(v[1]) if isinstance(v[1], int) else v[1]), data.items()))
Expand Down

0 comments on commit f0d7a8c

Please sign in to comment.