Commit Graph

336 Commits

Author SHA1 Message Date
Victor Stinner 11e83488c5
gh-111089: Revert PyUnicode_AsUTF8() changes (#111833)
* Revert "gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic (#111585)"

This reverts commit d9b606b3d0.

* Revert "gh-111089: Use PyUnicode_AsUTF8() in getargs.c (#111620)"

This reverts commit cde1071b2a.

* Revert "gh-111089: PyUnicode_AsUTF8() now raises on embedded NUL (#111091)"

This reverts commit d731579bfb.

* Revert "gh-111089: Add PyUnicode_AsUTF8() to the limited C API (#111121)"

This reverts commit d8f32be5b6.

* Revert "gh-111089: Use PyUnicode_AsUTF8() in sqlite3 (#111122)"

This reverts commit 37e4e20eaa.
2023-11-07 22:36:13 +00:00
Victor Stinner d9b606b3d0
gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic (#111585)
Replace PyUnicode_AsUTF8AndSize() with PyUnicode_AsUTF8() to remove
the explicit check for embedded null characters.

The change avoids to have to include explicitly <string.h> to get the
strlen() function when using a recent version of the limited C API.
2023-11-01 16:34:42 +01:00
Furkan Onder 32c37fe1ba
gh-67565: Remove redundant C-contiguity checks (GH-105521)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
2023-10-23 12:54:46 +03:00
Victor Stinner 0937b11b89
gh-110964: clinic: refactor output_templates() (#110982) 2023-10-20 23:42:02 +02:00
Victor Stinner be5e8a0103
gh-110964: Remove private _PyArg functions (#110966)
Move the following private functions and structures to
pycore_modsupport.h internal C API:

* _PyArg_BadArgument()
* _PyArg_CheckPositional()
* _PyArg_NoKeywords()
* _PyArg_NoPositional()
* _PyArg_ParseStack()
* _PyArg_ParseStackAndKeywords()
* _PyArg_Parser structure
* _PyArg_UnpackKeywords()
* _PyArg_UnpackKeywordsWithVararg()
* _PyArg_UnpackStack()
* _Py_ANY_VARARGS()

Changes:

* Python/getargs.h now includes pycore_modsupport.h to export
  functions.
* clinic.py now adds pycore_modsupport.h when one of these functions
  is used.
* Add pycore_modsupport.h includes when a C extension uses one of
  these functions.
* Define Py_BUILD_CORE_MODULE in C extensions which now include
  directly or indirectly (via code generated by Argument Clinic)
  pycore_modsupport.h:

  * _csv
  * _curses_panel
  * _dbm
  * _gdbm
  * _multiprocessing.posixshmem
  * _sqlite.row
  * _statistics
  * grp
  * resource
  * syslog

* _testcapi: bad_get() no longer uses METH_FASTCALL calling
  convention but METH_VARARGS. Replace _PyArg_UnpackStack() with
  PyArg_ParseTuple().
* _testcapi: add PYTESTCAPI_NEED_INTERNAL_API macro which is defined
  by _testcapi sub-modules which need the internal C API
  (pycore_modsupport.h): exceptions.c, float.c, vectorcall.c,
  watchers.c.
* Remove Include/cpython/modsupport.h header file.
  Include/modsupport.h no longer includes the removed header file.
* Fix mypy clinic.py
2023-10-17 14:30:31 +02:00
Victor Stinner 054f496bd4
gh-85283: Fix Argument Clinic for md5 extension (#110976)
Limited C API supports the defining class under some conditions.
2023-10-17 13:46:16 +02:00
Nikita Sobolev bad7a35055
gh-110907: AC: Disallow using `*` with vararg (#110908) 2023-10-16 15:26:11 +01:00
Alex Waygood fc811c8d20
gh-110558: Enable ruff's pyupgrade rules when running on Argument Clinic (#110603) 2023-10-10 09:35:36 +00:00
Alex Waygood 7b2764e798
gh-110558: Run ruff on Argument Clinic in CI (#110559) 2023-10-10 07:52:39 +00:00
Serhiy Storchaka 1796c191b4
gh-108494: Argument Clinic: inline parsing code for positional-only parameters in the limited C API (GH-108622) 2023-09-03 17:28:14 +03:00
Victor Stinner ad73674283
gh-107603: Argument Clinic: Only include pycore_gc.h if needed (#108726)
Argument Clinic now only includes pycore_gc.h if PyGC_Head is needed,
and only includes pycore_runtime.h if _Py_ID() is needed.

* Add 'condition' optional argument to Clinic.add_include().
* deprecate_keyword_use() includes pycore_runtime.h when using
  the _PyID() function.
* Fix rendering of includes: comments start at the column 35.
* Mark PC/clinic/_wmimodule.cpp.h and
  "Objects/stringlib/clinic/*.h.h" header files as generated in
  .gitattributes.

Effects:

* 42 header files generated by AC no longer include the internal C
  API, instead of 4 header files before. For example,
  Modules/clinic/_abc.c.h no longer includes the internal C API.
* Fix _testclinic_depr.c.h: it now always includes pycore_runtime.h
  to get _Py_ID().
2023-08-31 23:42:34 +02:00
Victor Stinner e675e515ae
gh-108494: Argument Clinic: fix option group for Limited C API (#108574)
Use PyTuple_Size() instead of PyTuple_GET_SIZE().
2023-08-29 13:33:28 +02:00
Adam Turner 0bd2ba553d
GH-107603: Clinic: Pass specific attributes to ``print_block()`` (#108581) 2023-08-28 21:31:45 +00:00
Alex Waygood 242bef459b
gh-108494: Argument clinic: Improve the `parse_file()` API (#108575)
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-08-28 18:25:16 +00:00
Serhiy Storchaka bc5356bb5d
gh-108494: Argument Clinic: fix support of Limited C API (GH-108536) 2023-08-28 16:04:27 +03:00
Erlend E. Aasland d90973340b
gh-104683: Argument Clinic: Refactor the module and class resolver (#108552) 2023-08-28 14:41:05 +02:00
Victor Stinner 8ba4714611
gh-106320: Remove private AC converter functions (#108505)
Move these private functions to the internal C API
(pycore_abstract.h):

* _Py_convert_optional_to_ssize_t()
* _PyNumber_Index()

Argument Clinic now emits #include "pycore_abstract.h" when these
functions are used.

The parser of the c-analyzer tool now uses a list of files which use
the limited C API, rather than a list of files using the internal C
API.
2023-08-26 04:05:17 +02:00
Victor Stinner 6353c21b78
gh-106320: Remove private _PyLong_FileDescriptor_Converter() (#108503)
Move the private _PyLong converter functions to the internal C API

* _PyLong_FileDescriptor_Converter(): moved to pycore_fileutils.h
* _PyLong_Size_t_Converter(): moved to pycore_long.h

Argument Clinic now emits includes for pycore_fileutils.h and
pycore_long.h when these functions are used.
2023-08-26 03:18:09 +02:00
Victor Stinner 713afb8804
gh-106320: Remove private _PyLong converter functions (#108499)
Move these private functions to the internal C API (pycore_long.h):

* _PyLong_UnsignedInt_Converter()
* _PyLong_UnsignedLongLong_Converter()
* _PyLong_UnsignedLong_Converter()
* _PyLong_UnsignedShort_Converter()

Argument Clinic now emits #include "pycore_long.h" when these
functions are used.
2023-08-26 02:24:27 +02:00
Victor Stinner 86bc9e35c4
gh-108494: AC supports pos-only args in limited C API (#108498)
AC now checks for "#define Py_LIMITED_API" pattern to use the limited
C API.
2023-08-26 00:39:24 +02:00
Victor Stinner 73d33c1a30
gh-107603: Argument Clinic can emit includes (#108486)
* Add Clinic.add_include() method
* Add CConverter.include and CConverter.add_include()
* Printer.print_block() gets a second parameter: clinic.
* Remove duplicated declaration of "clinic" global variable.
2023-08-26 00:01:10 +02:00
Victor Stinner 1dd9510977
gh-108494: Argument Clinic partial supports of Limited C API (#108495)
Argument Clinic now has a partial support of the
Limited API:

* Add --limited option to clinic.c.
* Add '_testclinic_limited' extension which is built with
  the limited C API version 3.13.
* For now, hardcode in clinic.py that "_testclinic_limited.c" targets
  the limited C API.
2023-08-25 23:22:08 +02:00
Victor Stinner 4e5a7284ee
gh-108444: Argument Clinic uses PyLong_AsInt() (#108458)
Argument Clinic now uses the new public PyLong_AsInt(), rather than
the old name _PyLong_AsInt().
2023-08-25 00:51:22 +02:00
Serhiy Storchaka 60942cccb1
gh-95065, gh-107704: Argument Clinic: support multiple '/ [from ...]' and '* [from ...]' markers (GH-108132) 2023-08-21 13:59:58 +00:00
Serhiy Storchaka 2f311437cd
gh-107704: Argument Clinic: add support for deprecating keyword use of parameters (GH-107984)
It is now possible to deprecate passing keyword arguments for
keyword-or-positional parameters with Argument Clinic, using the new
'/ [from X.Y]' syntax.
(To be read as "positional-only from Python version X.Y")

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-19 10:13:35 +03:00
Erlend E. Aasland 292a22bdc2
gh-104683: Argument Clinic: Remove unreachable code from _module_and_class() (#108092)
'not hasattr(parent, "classes")' is always false, since 'parent' is an
instance of either the Module, Class, or Clinic classes, and all of
them has a "classes" attribute.
2023-08-17 18:16:08 +00:00
Erlend E. Aasland 42429d3b9a
gh-104683: Argument Clinic: Extract parse function name helper (#107964)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-16 13:47:15 +00:00
Erlend E. Aasland 607f18c894
gh-107972: Argument Clinic: Ensure a C basename is provided after 'as' (#107973)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-15 14:41:40 +00:00
Erlend E. Aasland e90036c9bd
gh-107880: Argument Clinic: Fix regression in gh-107885 (#107974)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-15 14:00:52 +00:00
Erlend E. Aasland 9b75ada6e4
gh-107880: Teach Argument Clinic to clone __init__ and __new__ methods (#107885) 2023-08-13 12:13:11 +02:00
Erlend E. Aasland ee40b3e20d
gh-107883: Argument Clinic: Handle full module/class path in Function.fulldisplayname (#107884)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-12 23:46:00 +00:00
Erlend E. Aasland 0a7f48b9a8
gh-95065: Produce nicer deprecation messages in Argument Clinic (#107808) 2023-08-09 13:28:18 +00:00
Erlend E. Aasland 1b3f5f24af
gh-104683: Argument Clinic: Params now render their own docstrings (#107790)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-09 12:44:26 +00:00
Erlend E. Aasland 925bbc2166
gh-80282: Argument Clinic: Add clarifying comment about ASCII docstring limitation (#107764)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-09 07:55:34 +02:00
Erlend E. Aasland 73507382ac
gh-104683: Argument Clinic: refactor format_docstring() (#107623)
Extract helper methods for formatting the signature and parameter
sections, and clean up the remaining function body.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-08 21:12:35 +00:00
Erlend E. Aasland 0be3743f54
gh-104683: Add --exclude option to Argument Clinic CLI (#107770)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-08 20:50:54 +00:00
Alex Waygood 7c5153de5a
gh-106368: Argument clinic: add tests for more failure paths (#107731) 2023-08-08 12:12:49 +00:00
Erlend E. Aasland 5df8b0d5c7
gh-95065: Argument Clinic: Add comment to preprocessor warning code (#107766) 2023-08-08 08:43:41 +00:00
Erlend E. Aasland 0db043dd5a
gh-95065: Make Argument Clinic append deprecation warnings to docstrings (#107745) 2023-08-08 08:41:09 +02:00
Serhiy Storchaka 0e6e32fb84
gh-86457: Fix signature for code.replace() (GH-23199)
Also add support of @text_signature in Argument Clinic.
2023-08-07 23:34:53 +03:00
Erlend E. Aasland 835e388915
gh-95065: Argument Clinic: Pretty-print long C strings in generated code (#107712)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-07 14:33:52 +00:00
Alex Waygood c399b5e1a5
gh-107713: Reduce usage of mocks in `test_clinic.py` (#107714) 2023-08-07 14:26:49 +01:00
Erlend E. Aasland 33cb0b06ef
gh-95065: Add Argument Clinic support for deprecating positional use of parameters (#95151)
It is now possible to deprecate passing parameters positionally with
Argument Clinic, using the new '* [from X.Y]' syntax.
(To be read as "keyword-only from Python version X.Y")

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-07 11:28:08 +00:00
Alex Waygood ee3bf45e5e
gh-106368: Improve coverage reports for argument clinic (#107693) 2023-08-06 20:40:55 +01:00
Alex Waygood 6996b406bc
gh-104683: Improve consistency and test coverage of argument-clinic `__repr__` functions (#107667) 2023-08-05 21:58:38 +01:00
Alex Waygood 2c25bd82f4
gh-106368: Argument clinic: improve coverage for `self.valid_line()` calls (#107641) 2023-08-04 20:41:04 +01:00
Erlend E. Aasland 321f0f7932
gh-104683: Argument Clinic: Use CConverter.length_name where possible (#107638)
Also make it a cached property.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-04 17:49:07 +00:00
Alex Waygood 407d7fda94
gh-104146: Argument clinic: remove dead code highlighted by the `vulture` tool (#107632) 2023-08-04 14:56:50 +00:00
Alex Waygood 7eba274fb3
gh-104146: Argument clinic: Remove dead code flagged by mypy's `truthy-bool` check (#107627) 2023-08-04 13:28:13 +00:00
Erlend E. Aasland ac7605ed19
gh-107614: Normalise Argument Clinic error messages (#107615)
- always wrap the offending line, token, or name in quotes
- in most cases, put the entire error message on one line

Added tests for uncovered branches that were touched by this PR.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-04 12:13:10 +00:00
Erlend E. Aasland a443c310ac
gh-107609: Fix duplicate module check in Argument Clinic (#107610)
Also remove duplicate module def from _testcapi.
2023-08-04 07:28:25 +02:00
Alex Waygood ee78d01a61
gh-104146: Argument clinic: remove unused methods and variables (#107608) 2023-08-04 00:17:17 +00:00
Erlend E. Aasland 1cd479c6d3
gh-104683: Rework Argument Clinic error handling (#107551)
Introduce ClinicError, and use it in fail(). The CLI runs main(),
catches ClinicError, formats the error message, prints to stderr
and exits with an error.

As a side effect, this refactor greatly improves the accuracy of
reported line numbers in case of error.

Also, adapt the test suite to work with ClinicError.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-03 00:00:06 +00:00
Erlend E. Aasland bcdd307231
gh-104683: Make Argument Clinic template strings class level members (#107556)
The motivation for this change is to clean up the output_templates()
method a little bit, as it accounts for ~10% of the lines of code in
clinic.py; removing some clutter helps readability.
2023-08-02 21:37:36 +02:00
Erlend E. Aasland 9ff7b4af13
gh-107559: Argument Clinic: complain about non-ASCII chars in param docstrings (#107560)
Previously, only function docstrings were checked for non-ASCII characters.
Also, improve the warn() message.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-02 12:40:23 +00:00
Erlend E. Aasland 439466a02b
gh-104146: Remove dead code from Argument Clinic (#107555) 2023-08-02 09:22:17 +00:00
Erlend E. Aasland b4d8897781
gh-104683: Argument Clinic: Refactor and simplify 'add docstring' states (#107550)
Introduce docstring_append() helper, and use it for both parameter and
function docstrings. Remove docstring fixup from
do_post_block_processing_cleanup(); instead, make sure no fixup is needed.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-01 23:32:27 +00:00
Alex Waygood 818c83cf81
gh-104683: Argument clinic: cleanup `DLSParser` `state_foo` methods (#107543) 2023-08-01 21:42:39 +01:00
Alex Waygood 030f6b1e84
gh-104683: Argument clinic: remove the `LandMine` class (#107541) 2023-08-01 21:10:54 +01:00
Erlend E. Aasland 49f238e78c
gh-107467: Restructure Argument Clinic command-line interface (#107469)
- Use ArgumentParser.error() to handle CLI errors
- Put the entire CLI in main()
- Rework ClinicExternalTest to call main() instead of using subprocesses

Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2023-08-01 18:24:23 +02:00
Alex Waygood 5113ed7a2b
gh-104683: Argument clinic: pass `clinic` as a parameter where possible (#107435) 2023-07-29 19:47:42 +01:00
Alex Waygood 6c74b2f669
gh-104683: Argument clinic: Make the `filename` parameter to `Clinic` required (#107439) 2023-07-29 19:46:52 +01:00
Alex Waygood 87de2fbb1e
gh-104050: Argument clinic: enable mypy's `--warn-return-any` setting (#107405) 2023-07-29 13:39:21 +01:00
Alex Waygood 55ed85e49c
gh-104050: Argument clinic: complete type annotations (#107399) 2023-07-28 21:27:21 +01:00
Alex Waygood ecc05e23a1
gh-106368: Argument clinic: Fix minor bug in `state_modulename_name` (#107387) 2023-07-28 19:10:45 +01:00
Alex Waygood c2b1689abc
gh-104683: Argument clinic: cleanup `state_modulename_name()` (#107340) 2023-07-27 22:51:18 +01:00
Erlend E. Aasland 2ad699002e
Docs: Argument Clinic: Restructure "Basic concepts and usage" (#106981)
Split "Basic concepts and usage" into:

- Reference
  - Terminology
  - CLI reference

- Background
  - Basic concepts

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-07-26 22:08:43 +00:00
Alex Waygood 5aa6964a5c
gh-104050: Argument clinic: Annotate `str_converter_key()` (#107294) 2023-07-26 21:12:18 +01:00
Alex Waygood f9bcdf2368
gh-104050: Argument clinic: Complete `get_destination_buffer` annotations (#107293) 2023-07-26 21:11:15 +01:00
Alex Waygood 14d074e1fb
gh-104683: Argument Clinic: Make most arguments to `Class` and `Function` required (#107289) 2023-07-26 11:54:03 +01:00
Alex Waygood c362678dd2
gh-104050: Argument clinic: improve typing around `parse_arg()` methods (#107288) 2023-07-26 11:51:24 +01:00
Alex Waygood 33838fedf7
gh-104050: Argument clinic: annotate `post_parsing()` and `cleanup()` (#107225) 2023-07-25 23:33:03 +01:00
Alex Waygood ee9010784c
gh-104050: Argument clinic: more misc typing improvements (#107264) 2023-07-25 22:08:52 +01:00
Alex Waygood d9e34db993
gh-104050: Argument clinic: more misc typing coverage improvements (#107210) 2023-07-25 08:49:07 +00:00
Alex Waygood dbfe73837d
gh-104050: Argument clinic: improve typing around adding C converters (#107209) 2023-07-25 09:18:19 +01:00
Alex Waygood 4bbf071635
gh-104050: Argument Clinic: Annotate `CRenderData.__init__` (#107207)
Argument Clinic: Annotate `CRenderData.__init__`
2023-07-24 21:38:50 +00:00
Alex Waygood d93fe5afe2
gh-104050: Argument clinic: misc improvements to type annotation coverage (#107206) 2023-07-24 21:23:58 +00:00
Alex Waygood ac2d85a174
gh-104050: Argument clinic: annotate `format_docstring()` (#107200) 2023-07-24 20:29:50 +00:00
Alex Waygood db17529f80
gh-104050: Argument Clinic: annotate `main()` (#107192) 2023-07-24 19:32:38 +00:00
Erlend E. Aasland 3aeffc0d8f
gh-104050: Argument Clinic: Increase typing coverage (#107074)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-22 22:30:42 +00:00
Erlend E. Aasland c5adf26b18
gh-104050: Argument Clinic: Annotate the BufferSeries class (#106935)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-22 12:46:42 +02:00
Erlend E. Aasland 3372bcba98
gh-106970: Fix Argument Clinic 'destination <name> clear' command (#106972)
Add test for the 'destination <name> clear' command,
and the 'destination' directive in general.

Fix two bugs in 'destination <name> clear' command:

1. The text attribute of the allocator is called 'text', not '_text'
2. Return after processing the 'clear' command,
   instead of proceeding directly to the fail().
2023-07-22 09:43:13 +02:00
Erlend E. Aasland d81b4f8ff8
gh-104050: Argument Clinic: Annotate the IndentStack class (#106934) 2023-07-20 23:19:11 +00:00
Erlend E. Aasland 1d5a625eb0
gh-104050: Argument Clinic: Increase CConverter typing coverage (#106932)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-20 22:45:02 +00:00
Erlend E. Aasland 42c6300d4f
gh-104050: Argument Clinic: Annotate CLanguage.render_option_group_parsing() (#106929)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-20 21:33:33 +00:00
Erlend E. Aasland 00e52acebd
gh-104683: Argument Clinic: Modernise parse_special_symbol() (#106837)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-17 22:37:11 +00:00
Erlend E. Aasland 036bb73656
gh-104050: Improve Argument Clinic type annotation coverage (#106810)
Add various missing annotations in the following classes:
- BlockPrinter
- CConverter
- CLanguage
- FormatCounterFormatter
- Language
- _TextAccumulator

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-17 13:47:08 +02:00
Erlend E. Aasland 383dcbebcd
gh-104050: Argument Clinic: Annotate Clinic.parse() (#106760)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-17 00:04:10 +00:00
Erlend E. Aasland bbf6297985
gh-104050: Argument Clinic: Annotate BlockParser (#106750) 2023-07-15 10:11:32 +00:00
Erlend E. Aasland 7c95345e4f
gh-104050: Argument Clinic: Annotate `output_templates()` (#106732)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2023-07-14 12:20:58 +00:00
Alex Waygood 128a6c1d88
gh-104683: Argument clinic: use an enum to describe the different kinds of functions (#106721)
Argument clinic: use an enum to describe the different kinds of functions
2023-07-13 22:54:05 +00:00
Erlend E. Aasland 2d43beec22
gh-104050: Argument Clinic: Annotate nested function parser_body() in the CLanguage class (#106699) 2023-07-12 22:49:30 +00:00
Alex Waygood a180e7a0df
gh-104050: Argument clinic: Annotate the `Destination` class (#106655)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-12 22:33:47 +01:00
Alex Waygood 7ce3ea4906
gh-104683: Argument clinic: Minor readability improvements for `Destination.__init__` (#106652) 2023-07-11 23:08:28 +00:00
Alex Waygood d0972c77aa
gh-104050: Argument Clinic: Annotate the `Block` class (#106519) 2023-07-11 21:21:14 +00:00
Alex Waygood 363f4f99c5
gh-104683: clinic.py: refactor `Parameter` and `Function` as dataclasses (#106477) 2023-07-07 13:10:07 +00:00
Alex Waygood 5548097925
gh-104683: clinic.py: refactor four simple classes as dataclasses (#106476) 2023-07-06 22:17:12 +01:00
Alex Waygood d0c6ba956f
gh-104683: clinic.py: Don't needlessly reimplement `contextlib.redirect_stdout` (#106478)
clinic.py: Don't needlessly reimplement `contextlib.redirect_stdout`
2023-07-06 14:23:02 +01:00
Erlend E. Aasland 9d1d4f9c73
gh-64595: Fix regression in file write logic in Argument Clinic (#106449)
Revert the two commits that introduced the regressions:

 - gh-104152
 - gh-104507
2023-07-05 13:23:22 +02:00
Erlend E. Aasland 7bb9fa5ae4
gh-104050: Partially annotate Argument Clinic CLanguage class (#106437)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-04 23:07:57 +00:00