Skip to content

Commit dfb738e

Browse files
Merge pull request #451 from divyanshugit/fix-clang-format
Fixed linting build failure
2 parents 9dbeef4 + 90b4407 commit dfb738e

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: |
4040
mypy src tests
4141
- name: Run clang-format style check for C/C++ programs.
42-
uses: jidicula/clang-format-action@v3.3.0
42+
uses: jidicula/clang-format-action@v4.11.0
4343
with:
4444
clang-format-version: "11"
4545
check-path: "/src/bindings/"

src/bindings/PyDP/mechanisms/mechanism.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class GaussianMechanismBinder {
117117
return downcast_unique_ptr<dp::GaussianMechanism, dp::NumericalMechanism>(
118118
builder.Build().value());
119119
};
120-
120+
121121
static std::unique_ptr<dp::GaussianMechanism> build_from_std(double std) {
122122
dp::GaussianMechanism::Builder builder;
123123
builder.SetStandardDeviation(std);
@@ -134,17 +134,19 @@ class GaussianMechanismBinder {
134134
return build(epsilon, delta, l2_sensitivity);
135135
}),
136136
py::arg("epsilon"), py::arg("delta"), py::arg("sensitivity") = 1.0)
137-
.def_static("create_from_standard_deviation", [](double std) {
138-
return build_from_std(std);
139-
},
140-
py::arg("std"),
137+
.def_static(
138+
"create_from_standard_deviation",
139+
[](double std) { return build_from_std(std); }, py::arg("std"),
141140
R"pbdoc(
142141
Creates Gaussian mechanism from the given standard deviation.
143142
)pbdoc")
144143
.def_property_readonly("delta", &dp::GaussianMechanism::GetDelta,
145144
"The 𝛿 of the Gaussian mechanism.")
146-
.def_property_readonly(
147-
"std", [](dp::GaussianMechanism& mechanism) { return mechanism.CalculateStddev(); },
145+
.def_property_readonly(
146+
"std",
147+
[](dp::GaussianMechanism& mechanism) {
148+
return mechanism.CalculateStddev();
149+
},
148150
R"pbdoc(
149151
The standard deviation of the Gaussian mechanism underlying
150152
distribution.

0 commit comments

Comments
 (0)