Skip to content

Commit

Permalink
🔵 remove print and unnecessary diff
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrecamilleri committed Sep 23, 2024
1 parent 6e177aa commit 3a77070
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion frictionless/resource/__spec__/test_datatype.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ def test_resource_from_descriptor_with_class_datatype():
)
def test_schema_resource_with_path_property(source):
schema = Schema(source)
print(source)
resource = Resource(schema.to_descriptor(), datatype="schema")
assert resource.type == "json"
assert resource.datatype == "schema"
Expand Down
6 changes: 3 additions & 3 deletions frictionless/resource/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ def __call__(
path = source
if isinstance(source, str):
path = helpers.join_basepath(source, basepath=basepath)

md_type = options.get("datatype")
if not md_type:
md_type = Detector.detect_metadata_type(
path, format=options.get("format")
)

if md_type != "resource":
options["path" if isinstance(source, str) else "data"] = source
resource = cls( # type: ignore
control=control, basepath=basepath, **options
)
resource = cls(control=control, basepath=basepath, **options) # type: ignore
return cast(T, resource)

# Descriptor
Expand Down

0 comments on commit 3a77070

Please sign in to comment.