kopia lustrzana https://github.com/Langenfeld/py-gitea
chore: switch to immutabledict
rodzic
689b3bc7af
commit
0ecb1ea2b9
|
@ -2,7 +2,7 @@ import logging
|
||||||
import json
|
import json
|
||||||
from typing import List, Dict, Union
|
from typing import List, Dict, Union
|
||||||
|
|
||||||
from frozendict import frozendict
|
from immutabledict import immutabledict
|
||||||
import requests
|
import requests
|
||||||
import urllib3
|
import urllib3
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ class Gitea:
|
||||||
return json.loads(result.text)
|
return json.loads(result.text)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
def requests_get(self, endpoint: str, params=frozendict(), sudo=None):
|
def requests_get(self, endpoint: str, params=immutabledict(), sudo=None):
|
||||||
combined_params = {}
|
combined_params = {}
|
||||||
combined_params.update(params)
|
combined_params.update(params)
|
||||||
if sudo:
|
if sudo:
|
||||||
|
@ -92,7 +92,7 @@ class Gitea:
|
||||||
def requests_get_paginated(
|
def requests_get_paginated(
|
||||||
self,
|
self,
|
||||||
endpoint: str,
|
endpoint: str,
|
||||||
params=frozendict(),
|
params=immutabledict(),
|
||||||
sudo=None,
|
sudo=None,
|
||||||
page_key: str = "page",
|
page_key: str = "page",
|
||||||
page_limit: int = 0,
|
page_limit: int = 0,
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
requests
|
requests
|
||||||
pytest
|
pytest
|
||||||
frozendict
|
immutabledict
|
Ładowanie…
Reference in New Issue