swig/Source
William S Fulton f06d86749c [Python] Fix empty classes and imported bases in .pyi files
A generated stub class with no wrapped members had an empty suite, which
is invalid Python syntax. Stubs could also refer to base classes from
%imported modules without importing the corresponding Python proxy
module, leaving those names unresolved.

Track whether each stub class emits a member and use an ellipsis when
its body would otherwise be empty. Collect modules referenced through
%import and emit them before declarations, using the same package and
relative import rules as the generated Python proxy.

Keep annotation tests active with -pyi by parsing annotations from the
generated stub instead of expecting them on runtime objects. Include
each generated .pyi file in multi-module Pyrefly checks.

Add Python 3.14 Linux CI configurations for -pyi -typehints with and
without -builtin.

See #3473.

Assisted-by: Codex (GPT-5.6 Sol)
2026-08-04 23:41:57 +01:00
..
CParse Include stdint.h in parser.y so bison uses ptrdiff_t not long 2026-08-01 09:42:44 +01:00
DOH Replace all uses of sprintf with snprintf and poison sprintf 2026-08-01 09:42:44 +01:00
Doxygen Convert Doxygen comment markers to plain C comments in SWIG source 2026-06-08 22:16:29 +01:00
Include C++17: skip class template argument deduction variables 2026-05-30 00:51:25 +01:00
Modules [Python] Fix empty classes and imported bases in .pyi files 2026-08-04 23:41:57 +01:00
Preprocessor Beautify using swig specific .clang-format 2026-03-04 21:53:30 +00:00
Swig Tidy up the fix for a template argument scope being added twice 2026-08-04 12:04:38 +01:00
.clang-format Beautify using swig specific .clang-format 2026-03-04 21:53:30 +00:00
.clang-format-ignore Use clang-format instead of GNU indent for code formatting 2026-03-04 22:04:00 +00:00
Makefile.am C++20 concepts: add constraint tree data model and renderer 2026-05-10 17:37:52 +01:00
README Remove details of long-removed directories 2021-05-16 08:42:39 +12:00

README

SWIG Source directory

 Source/DOH          -  A core set of basic datatypes including
                        strings, lists, hashes, and files.  Used
                        extensively by the rest of SWIG.

 Source/Swig         -  Swig core. Type-system, utility functions.

 Source/Preprocessor -  SWIG C Preprocessor

 Source/CParse       -  SWIG C Parser (still messy)

 Source/Modules      -  Language modules.

 Source/Include      -  Include files.