Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
autopybind11
autopybind11
Commits
f24a0d3e
Commit
f24a0d3e
authored
Jun 11, 2021
by
John Parent
Browse files
Add include filter
parent
ac3d2db8
Pipeline
#232861
failed with stages
in 9 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
autopybind11/__main__.py
View file @
f24a0d3e
...
...
@@ -83,6 +83,14 @@ class BindingsGenerator:
if
not
self
.
opts
.
skip_formatting
:
maybe_format_file_in_place
(
file_name
)
def
remove_duplicate_includes
(
self
,
includes
):
incs
=
set
()
for
inc
in
includes
:
filename
=
os
.
path
.
basename
(
inc
)
if
filename
in
incs
:
includes
.
discard
(
inc
)
incs
.
add
(
filename
)
def
get_include_str
(
self
,
found_includes
):
include_str
=
""
for
f
in
found_includes
:
...
...
@@ -712,7 +720,10 @@ class BindingsGenerator:
:param is_custom: A boolean value to describe if the namespace has been added via customization
:return: None
"""
import
pdb
pdb
.
set_trace
()
self
.
remove_duplicate_includes
(
found_includes
)
self
.
indent
+=
" "
*
2
keys
=
{
"includes"
:
self
.
get_include_str
(
sorted
(
found_includes
)),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment