Skip to content
Snippets Groups Projects
Verified Commit 522ec28e authored by Daniel Hornung's avatar Daniel Hornung
Browse files

STY: Some more small linter and style fixes.

parent fef11372
No related branches found
No related tags found
2 merge requests!128MNT: Added a warning when column metadata is not configured, and a better...,!126Fix pylint errors
Pipeline #59738 passed
...@@ -27,7 +27,7 @@ from copy import deepcopy ...@@ -27,7 +27,7 @@ from copy import deepcopy
# actually # actually
# [deprecated](https://docs.python.org/3/library/typing.html#typing.List), so # [deprecated](https://docs.python.org/3/library/typing.html#typing.List), so
# remove this, when we drop support for old Python versions. # remove this, when we drop support for old Python versions.
from typing import List from typing import List, Optional
import linkahead as db import linkahead as db
import linkahead.common.models as models import linkahead.common.models as models
...@@ -267,7 +267,8 @@ class DataModel(dict): ...@@ -267,7 +267,8 @@ class DataModel(dict):
return list(all_ents.values()) return list(all_ents.values())
def get_deep(self, name: str, visited_props: dict = None, visited_parents: set = None): def get_deep(self, name: str, visited_props: Optional[dict] = None,
visited_parents: Optional[set] = None):
"""Attempt to resolve references for the given ``name``. """Attempt to resolve references for the given ``name``.
The returned entity has all the properties it inherits from its ancestry and all properties The returned entity has all the properties it inherits from its ancestry and all properties
......
This diff is collapsed.
...@@ -357,8 +357,8 @@ def test_name_property(): ...@@ -357,8 +357,8 @@ def test_name_property():
broken = parse_model_from_json_schema(os.path.join( broken = parse_model_from_json_schema(os.path.join(
FILEPATH, "datamodel_name_wrong_type.schema.json")) FILEPATH, "datamodel_name_wrong_type.schema.json"))
assert str(err.value).startswith( assert str(err.value).startswith(
"The 'name' property must be string-typed, otherwise it cannot be identified with LinkAhead's " "The 'name' property must be string-typed, otherwise it cannot be identified with "
"name property.") "LinkAhead's name property.")
def test_no_toplevel_entity(): def test_no_toplevel_entity():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment