Compare commits
No commits in common. "c9a6030591b3fa6eb0c22f8831c5e7f67e447ab4" and "f3cbe31990499d330df40844d9053a8c0d51ca4b" have entirely different histories.
c9a6030591
...
f3cbe31990
2 changed files with 6 additions and 9 deletions
|
@ -3,7 +3,6 @@ pipeline:
|
||||||
image: ghcr.io/withlogicco/poetry:1.5.1
|
image: ghcr.io/withlogicco/poetry:1.5.1
|
||||||
commands:
|
commands:
|
||||||
- pip install pyright
|
- pip install pyright
|
||||||
- poetry install
|
|
||||||
- python --version && poetry --version && pyright --version
|
- python --version && poetry --version && pyright --version
|
||||||
- echo "------------- running pyright typecheck -------------"
|
- echo "------------- running pyright typecheck -------------"
|
||||||
- poetry run pyright
|
- poetry run pyright
|
||||||
|
|
|
@ -82,7 +82,6 @@ def _retrieve_annotation_content(
|
||||||
# just a highlight without any text
|
# just a highlight without any text
|
||||||
return (None, None)
|
return (None, None)
|
||||||
|
|
||||||
|
|
||||||
# mimics the functions in papis.config.{getlist,getint,getfloat} etc.
|
# mimics the functions in papis.config.{getlist,getint,getfloat} etc.
|
||||||
def getdict(key: str, section: Optional[str] = None) -> dict[str, str]:
|
def getdict(key: str, section: Optional[str] = None) -> dict[str, str]:
|
||||||
"""Dict getter
|
"""Dict getter
|
||||||
|
@ -98,14 +97,13 @@ def getdict(key: str, section: Optional[str] = None) -> dict[str, str]:
|
||||||
rawvalue = eval(rawvalue)
|
rawvalue = eval(rawvalue)
|
||||||
except Exception:
|
except Exception:
|
||||||
raise SyntaxError(
|
raise SyntaxError(
|
||||||
"The key '{}' must be a valid Python object: {}".format(key, rawvalue)
|
"The key '{}' must be a valid Python object: {}"
|
||||||
)
|
.format(key, rawvalue))
|
||||||
else:
|
else:
|
||||||
if not isinstance(rawvalue, dict):
|
if not isinstance(rawvalue, dict):
|
||||||
raise SyntaxError(
|
raise SyntaxError(
|
||||||
"The key '{}' must be a valid Python dict. Got: {} (type {!r})".format(
|
"The key '{}' must be a valid Python dict. Got: {} (type {!r})"
|
||||||
key, rawvalue, type(rawvalue).__name__
|
.format(key, rawvalue, type(rawvalue).__name__))
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
return rawvalue
|
return rawvalue
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue