Skip to content

Commit 40e4c1c

Browse files
committed
Fix formatting
1 parent 7d6f4e5 commit 40e4c1c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

bindings/python/bergamot.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
#include <iostream>
1414
#include <string>
15-
#include <vector>
1615
#include <unordered_map>
16+
#include <vector>
1717

1818
namespace py = pybind11;
1919

@@ -118,19 +118,19 @@ class ServicePyAdapter {
118118
return responses;
119119
}
120120

121-
void setTerminology(py::dict terminology, bool forceTerminology=false) {
121+
void setTerminology(py::dict terminology, bool forceTerminology = false) {
122122
// It seems copying is not too bad for performance. Also this should happen rarely and with small objects
123123
// https://github.com/pybind/pybind11/issues/3033
124124
std::unordered_map<std::string, std::string> cppTerminology;
125125
for (std::pair<py::handle, py::handle> item : terminology) {
126-
auto key = item.first.cast<std::string>();
127-
auto value = item.second.cast<std::string>();
128-
cppTerminology[key] = value;
126+
auto key = item.first.cast<std::string>();
127+
auto value = item.second.cast<std::string>();
128+
cppTerminology[key] = value;
129129
}
130130
service_.setTerminology(cppTerminology, forceTerminology);
131131
}
132132

133-
private /*functions*/:
133+
private /*functions*/:
134134
static Service make_service(const Service::Config &config) {
135135
py::scoped_ostream_redirect outstream(std::cout, // std::ostream&
136136
py::module_::import("sys").attr("stdout") // Python output
@@ -144,7 +144,7 @@ class ServicePyAdapter {
144144
return Service(config);
145145
}
146146

147-
private /*data*/:
147+
private /*data*/:
148148
Service service_;
149149
};
150150

@@ -213,8 +213,8 @@ PYBIND11_MODULE(_bergamot, m) {
213213
.def("setTerminology", &ServicePyAdapter::setTerminology);
214214

215215
py::class_<Service::Config>(m, "ServiceConfig")
216-
.def(py::init<>([](size_t numWorkers, size_t cacheSize, std::string logging,
217-
std::string pathToTerminologyFile, bool terminologyForce, std::string terminologyForm ) {
216+
.def(py::init<>([](size_t numWorkers, size_t cacheSize, std::string logging, std::string pathToTerminologyFile,
217+
bool terminologyForce, std::string terminologyForm) {
218218
Service::Config config;
219219
config.numWorkers = numWorkers;
220220
config.cacheSize = cacheSize;

0 commit comments

Comments
 (0)