Skip to content

Commit

Permalink
clang tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
InvincibleRMC committed Dec 19, 2024
1 parent f205bb4 commit a6ffbe3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/pybind11/cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ object object_or_cast(T &&o) {
}

// This is being used to get around the conflict with the deprecated str() function on object_api
typedef str py_str;
using py_str = str;

// Declared in pytypes.h:
// Written here so make_caster<T> can be used
Expand All @@ -1380,7 +1380,7 @@ obj_attr_accessor object_api<D>::attr_with_type_hint(handle key) const {
"https://en.cppreference.com/w/cpp/language/static#Static_data_members");
#endif
object ann = annotations();
object reinterpreted_key = reinterpret_borrow<object>(key);
auto reinterpreted_key = reinterpret_borrow<object>(key);
if (ann.contains(reinterpreted_key)) {
throw std::runtime_error("__annotations__[\"" + std::string(py_str(reinterpreted_key))
+ "\"] was set already.");
Expand Down

0 comments on commit a6ffbe3

Please sign in to comment.