Skip to content

Commit

Permalink
Swap out ruamel.yaml with pyyaml
Browse files Browse the repository at this point in the history
mypy was unhappy with the import
  • Loading branch information
RealOrangeOne committed Dec 19, 2020
1 parent a71b765 commit 52444d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions code_submitter/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from typing import cast, Dict, List, Tuple, Optional, Sequence
from typing_extensions import TypedDict

import yaml
import httpx
from ruamel.yaml import YAML
from starlette.requests import HTTPConnection
from starlette.responses import Response
from starlette.applications import Starlette
Expand Down Expand Up @@ -223,7 +223,7 @@ def __init__(
path: str,
) -> None:
with open(path) as f:
self.credentials = cast(Dict[str, str], YAML(typ="safe").load(f))
self.credentials = cast(Dict[str, str], yaml.safe_load(f))

def get_scopes(self, username: str) -> List[str]:
scopes = ['authenticated']
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ databases[sqlite]
sqlalchemy
alembic
httpx
ruamel.yaml
pyyaml
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ markupsafe==1.1.1 # via jinja2, mako
python-dateutil==2.8.1 # via alembic
python-editor==1.0.4 # via alembic
python-multipart==0.0.5 # via -r requirements.in
pyyaml==5.3.1 # via -r requirements.in
rfc3986==1.4.0 # via httpx
ruamel.yaml.clib==0.2.2 # via ruamel.yaml
ruamel.yaml==0.16.12 # via -r requirements.in
six==1.15.0 # via python-dateutil, python-multipart
sniffio==1.1.0 # via httpcore, httpx
sqlalchemy==1.3.18 # via -r requirements.in, alembic, databases
Expand Down

0 comments on commit 52444d8

Please sign in to comment.