1. 14 Jul, 2021 1 commit
    • Ralf W. Grosse-Kunstleve's avatar
      * Removing stray semicolons (discovered by running clang-format v12 followed... · aca6c3ba
      Ralf W. Grosse-Kunstleve authored
      * Removing stray semicolons (discovered by running clang-format v12 followed by tools/check-style.sh). (#3087)
      
      * Manually moving `// NOLINT` comments so that clang-format does not move them to the wrong places.
      
      * Manually reformatting comments related to `static_assert`s so that clang-format does not need two passes.
      
      * Empty lines between #includes, to prevent clang-format from shuffling the order and thereby confusing MSVC 2015.
      
      * git diff -U0 --no-color HEAD^ | python3 $HOME/clone/llvm-project/clang/tools/clang-format/clang-format-diff.py -p1 -style=file -i
      aca6c3ba
  2. 13 Jul, 2021 4 commits
    • Antony Lee's avatar
      Add helper to build in-tree extensions. (#2831) · 1be0a0a6
      Antony Lee authored
      
      
      For single-file extensions, a convenient pattern offered by cython
      is to place the source files directly in the python source tree
      (`foo/__init__.py`, `foo/ext.pyx`), deriving the package names from
      their filesystem location.  Adapt this pattern for pybind11, using an
      `intree_extensions` helper, which should be thought of as the moral
      equivalent to `cythonize`.
      
      Differences with cythonize: I chose not to include globbing support
      (`intree_extensions(glob.glob("**/*.cpp"))` seems sufficient), nor to
      provide extension-customization kwargs (directly setting the attributes
      on the resulting Pybind11Extension objects seems sufficient).
      
      We could choose to have `intree_extension` (singular instead) and make
      users write `[*map(intree_extension, glob.glob("**/*.cpp"))]`; no strong
      opinion here.
      Co-authored-by: default avatarAaron Gokaslan <skylion.aaron@gmail.com>
      1be0a0a6
    • Aaron Gokaslan's avatar
      fix(clang-tidy): Add cppcoreguidelines-init-vars,slicing, and... · 25e470c5
      Aaron Gokaslan authored
      fix(clang-tidy): Add cppcoreguidelines-init-vars,slicing, and throw-by-value-catch-by-reference checks (#3094)
      
      * clang-tidy: guard against more UB behavior
      
      * Remove slicing check for now
      25e470c5
    • Henry Schreiner's avatar
      style: add pyupgrade check, 2.7+ · 0e2e0035
      Henry Schreiner authored
      0e2e0035
    • Henry Schreiner's avatar
      chore: update pre-commit hooks · 84fdadfb
      Henry Schreiner authored
      84fdadfb
  3. 12 Jul, 2021 3 commits
  4. 09 Jul, 2021 2 commits
  5. 08 Jul, 2021 1 commit
  6. 06 Jul, 2021 1 commit
  7. 04 Jul, 2021 1 commit
  8. 02 Jul, 2021 1 commit
  9. 30 Jun, 2021 2 commits
  10. 26 Jun, 2021 1 commit
  11. 22 Jun, 2021 1 commit
    • Aaron Gokaslan's avatar
      fix(clang-tidy): performance fixes applied in tests and CI (#3051) · dac74ebd
      Aaron Gokaslan authored
      * Initial fixes
      
      * Whoops
      
      * Finish clang-tidy manual fixes
      
      * Add two missing fixes
      
      * Revert
      
      * Update clang-tidy
      
      * Try to fix unreachable code error
      
      * Move nolint comment
      
      * Apply missing fix
      
      * Don't override clang-tidy config
      
      * Does this fix clang-tidy?
      
      * Make all clang-tidy errors visible
      
      * Add comments about NOLINTs and remove a few
      
      * Fix typo
      dac74ebd
  12. 21 Jun, 2021 1 commit
  13. 19 Jun, 2021 1 commit
  14. 08 Jun, 2021 1 commit
    • Jack S. Hale's avatar
      Add const T to docstring generation. (#3020) · 4c7697db
      Jack S. Hale authored
      
      
      * Add const T to docstring generation.
      
      * Change order.
      
      * See if existing test triggers for a const type.
      
      * Add tests.
      
      * Fix test.
      
      * Remove experiment.
      
      * Reformat.
      
      * More tests, checks run.
      
      * Adding `test_fmt_desc_` prefix to new test functions.
      
      * Using pytest.mark.parametrize to 1. condense test; 2. exercise all functions even if one fails; 3. be less platform-specific (e.g. C++ float is not necessarily float32).
      Co-authored-by: default avatarRalf W. Grosse-Kunstleve <rwgk@google.com>
      4c7697db
  15. 27 May, 2021 2 commits
  16. 06 May, 2021 1 commit
  17. 04 May, 2021 1 commit
    • Pieter P's avatar
      Fix Unicode support for ostream redirects (#2982) · 0c93a0f3
      Pieter P authored
      * Crash when printing Unicode to redirected cout
      Add failing tests
      
      * Fix Unicode crashes redirected cout
      
      * pythonbuf::utf8_remainder check end iterator
      
      * Remove trailing whitespace and formatting iostream
      
      * Avoid buffer overflow if ostream redirect races
      This doesn't solve the actual race, but at least it now has a much lower
      probability of reading past the end of the buffer even when data races
      do occur.
      0c93a0f3
  18. 21 Apr, 2021 1 commit
  19. 14 Apr, 2021 1 commit
  20. 13 Apr, 2021 1 commit
  21. 03 Apr, 2021 1 commit
  22. 02 Apr, 2021 2 commits
  23. 09 Mar, 2021 1 commit
  24. 08 Mar, 2021 1 commit
  25. 05 Mar, 2021 1 commit
  26. 25 Feb, 2021 1 commit
  27. 23 Feb, 2021 3 commits
  28. 14 Feb, 2021 1 commit
    • Vikram Pal's avatar
      Add pybind11::bytearray (#2799) · 417067ee
      Vikram Pal authored
      * Add initial implementation
      
      * Add few more methods
      
      * Add tests
      
      * Fix a typo
      
      * Use std::string constructor which takes size
      
      * Fix implicit sign conversion error
      
      * Add size method and test
      
      * Remove implicit conversion
      
      * Fix bytearray constructors and operator std::string()
      
      * Make implicit bytearray constructor explicit
      
      * Rerun tests
      
      * Add null check
      
      * Rerun tests
      
      * Rerun tests - 2
      
      * Remove NULL check
      417067ee
  29. 12 Feb, 2021 1 commit