Skip to content

Commit 52444d8

Browse files
committed
Swap out ruamel.yaml with pyyaml
mypy was unhappy with the import
1 parent a71b765 commit 52444d8

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

code_submitter/auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from typing import cast, Dict, List, Tuple, Optional, Sequence
66
from typing_extensions import TypedDict
77

8+
import yaml
89
import httpx
9-
from ruamel.yaml import YAML
1010
from starlette.requests import HTTPConnection
1111
from starlette.responses import Response
1212
from starlette.applications import Starlette
@@ -223,7 +223,7 @@ def __init__(
223223
path: str,
224224
) -> None:
225225
with open(path) as f:
226-
self.credentials = cast(Dict[str, str], YAML(typ="safe").load(f))
226+
self.credentials = cast(Dict[str, str], yaml.safe_load(f))
227227

228228
def get_scopes(self, username: str) -> List[str]:
229229
scopes = ['authenticated']

requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ databases[sqlite]
55
sqlalchemy
66
alembic
77
httpx
8-
ruamel.yaml
8+
pyyaml

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ markupsafe==1.1.1 # via jinja2, mako
2626
python-dateutil==2.8.1 # via alembic
2727
python-editor==1.0.4 # via alembic
2828
python-multipart==0.0.5 # via -r requirements.in
29+
pyyaml==5.3.1 # via -r requirements.in
2930
rfc3986==1.4.0 # via httpx
30-
ruamel.yaml.clib==0.2.2 # via ruamel.yaml
31-
ruamel.yaml==0.16.12 # via -r requirements.in
3231
six==1.15.0 # via python-dateutil, python-multipart
3332
sniffio==1.1.0 # via httpcore, httpx
3433
sqlalchemy==1.3.18 # via -r requirements.in, alembic, databases

0 commit comments

Comments
 (0)