Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMichell committed Aug 8, 2024
1 parent 1acae3a commit ffc01d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions mdio/dataset_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,8 @@ TEST(Dataset, commitSlicedMetadata) {
TEST(Dataset, openNonExistent) {
auto json_vars = GetToyExample();

auto datasetRes = mdio::Dataset::from_json(json_vars, "zarrs/DNE",
mdio::constants::kOpen);
auto datasetRes =
mdio::Dataset::from_json(json_vars, "zarrs/DNE", mdio::constants::kOpen);
ASSERT_FALSE(datasetRes.status().ok())
<< "Opened a non-existent dataset without error!";
}
Expand All @@ -548,8 +548,9 @@ TEST(Dataset, kCreateOverExisting) {

datasetRes = mdio::Dataset::from_json(json_vars, "zarrs/acceptance",
mdio::constants::kCreate);
ASSERT_FALSE(datasetRes.status().ok()) << "Created a dataset over an existing "
"one without error!";
ASSERT_FALSE(datasetRes.status().ok())
<< "Created a dataset over an existing "
"one without error!";
}

} // namespace
3 changes: 2 additions & 1 deletion mdio/dataset_validator.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ bool contains(const std::unordered_set<std::string>& set,
* InvalidArgumentError if validation fails for any reason
*/
absl::Status validate_schema(nlohmann::json& spec /*NOLINT*/) {
nlohmann::json targetSchema = nlohmann::json::parse(kDatasetSchema, nullptr, false);
nlohmann::json targetSchema =
nlohmann::json::parse(kDatasetSchema, nullptr, false);
if (targetSchema.is_discarded()) {
return absl::NotFoundError("Failed to load schema");
}
Expand Down
3 changes: 2 additions & 1 deletion mdio/variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ Future<Variable<T, R, M>> OpenVariable(const nlohmann::json& json_store,
// go read the attributes return json ...
auto parse = [](const tensorstore::kvstore::ReadResult& kvs_read,
const ::nlohmann::json& spec) {
auto attributes = nlohmann::json::parse(std::string(kvs_read.value), nullptr, false);
auto attributes =
nlohmann::json::parse(std::string(kvs_read.value), nullptr, false);
return attributes;
};

Expand Down

0 comments on commit ffc01d4

Please sign in to comment.