Skip to content

Commit

Permalink
fix: never use .. in a header include (#5321)
Browse files Browse the repository at this point in the history
* fix: never use `..` in a header include

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

* fix: one more parent include

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Aug 22, 2024
1 parent c6239a8 commit b0050f3
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions include/pybind11/detail/class.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#pragma once

#include "../attr.h"
#include "../options.h"
#include <pybind11/attr.h>
#include <pybind11/options.h>

PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
PYBIND11_NAMESPACE_BEGIN(detail)
Expand Down
4 changes: 2 additions & 2 deletions include/pybind11/detail/internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#include "common.h"

#if defined(PYBIND11_SIMPLE_GIL_MANAGEMENT)
# include "../gil.h"
# include <pybind11/gil.h>
#endif

#include "../pytypes.h"
#include <pybind11/pytypes.h>

#include <exception>
#include <mutex>
Expand Down
3 changes: 2 additions & 1 deletion include/pybind11/detail/type_caster_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

#pragma once

#include "../pytypes.h"
#include <pybind11/pytypes.h>

#include "common.h"
#include "descr.h"
#include "internals.h"
Expand Down
3 changes: 2 additions & 1 deletion include/pybind11/eigen/matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

#pragma once

#include "../numpy.h"
#include <pybind11/numpy.h>

#include "common.h"

/* HINT: To suppress warnings originating from the Eigen headers, use -isystem.
Expand Down
3 changes: 2 additions & 1 deletion include/pybind11/eigen/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

#pragma once

#include "../numpy.h"
#include <pybind11/numpy.h>

#include "common.h"

#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
Expand Down
10 changes: 5 additions & 5 deletions include/pybind11/stl/filesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

#pragma once

#include "../pybind11.h"
#include "../detail/common.h"
#include "../detail/descr.h"
#include "../cast.h"
#include "../pytypes.h"
#include <pybind11/cast.h>
#include <pybind11/detail/common.h>
#include <pybind11/detail/descr.h>
#include <pybind11/pybind11.h>
#include <pybind11/pytypes.h>

#include <string>

Expand Down

0 comments on commit b0050f3

Please sign in to comment.