summaryrefslogtreecommitdiffstats
path: root/SCons/Variables/EnumVariable.py
Commit message (Collapse)AuthorAgeFilesLines
* Tweak Variables docsMats Wichmann2024-12-151-5/+6
| | | | | | | | | Adjusts some doctrings and comments, and one error in typing. Manpage has the introdctory Variables material updated a bit, and the methods sorted, to match everywhere else in the manpage. Signed-off-by: Mats Wichmann <mats@linux.com>
* Integrate `from __future__ import annotations`Thaddeus Crews2024-11-161-4/+6
|
* Minor cleanups in VariablesMats Wichmann2024-06-291-5/+0
| | | | | | | | Continuing the maintenance pass on Variables, these are some minor tweaks for a few checker niggles and fixing up a couple of docstrings. There is no functional change. Signed-off-by: Mats Wichmann <mats@linux.com>
* Variables cleanup: EnumVariableMats Wichmann2024-05-101-38/+78
| | | | | | | | | Part 2 of a series, updating the EnumVariable implementation, tests and docstrings. While this is a small change, it looks bigger in the diff, due to the conversion of a series of lambdas to inner fuctions (fixing a pylint complaint) Signed-off-by: Mats Wichmann <mats@linux.com>
* Add some cheap return and parameter annotationsMats Wichmann2023-05-011-1/+1
| | | | | | | | | | | | | | | | | Use: https://github.com/JelleZijlstra/autotyping to add "safe" return annotations. Where a parameter has a default value that is an obvious scalar type (bool, int, str, etc.) add those annotations as well. Also fixed two small bugs that popped up when sanity-checking with mypy. One in FortranCommon, where a return had been previously annotated to be a tuple of Action, which should be ActionBase - Action is the factory function, not the base class. The other was a typo in the error raised in _add_cppdefines - the message was formatted with the value of "define" which should have been "defines". Signed-off-by: Mats Wichmann <mats@linux.com>
* Tweak Variables incl. manpage, docstringsMats Wichmann2021-10-071-24/+27
| | | | | | | | | | | | | | * Added link anchors in variables-related funcs/methods, and link to them - these methods are not part of the generated link setup. * Clarified that vars set to defaults are not saved. * Updated docstrings in the Variables source (for API docs). * Added return-type annotations to Variables. * Fix for converter function possibly failing if it tries to access an environment. Fixes #2064. * Fixed up the behavior of aliases to variables, and added docu. Fixes #3869. * Fix PathIsDirCreate validator to catch permission problems. Fixes #2828 Signed-off-by: Mats Wichmann <mats@linux.com>
* Update some copyright strings and drop __revision__ [skip appveyor]Mats Wichmann2020-09-231-19/+25
| | | | | | | | | | | | | | | | | | Touches the first and second levels of SCons (except SCons.Tool), not tests or docs which remain TODO. Make sure docstring is first non-comment content, eliminate cases where docstring is set elsewhere but assigns to __doc__ - this approach of course worked inside Python, but confuses various tools. Some module-level docstrings modified a bit, in particular the convention of having the name of the module as the first line is dropped, replaced by a summary description going there instead - this improves the look in the API Docs, which otherwise display something like: SCons.Foo - SCons.Foo Signed-off-by: Mats Wichmann <mats@linux.com>
* Minor: drop engine prefix from docstrings [ci skip]Mats Wichmann2020-06-111-1/+1
| | | | | | | | A number of module docstrings start with the module name, these end up appearing in API docs. Drop the "engine/" prefix where it appears. Signed-off-by: Mats Wichmann <mats@linux.com>
* Reorganize the repo. Moved src/engine/SCons to ./SCons to be more in line ↵William Deegan2020-05-061-0/+101
with current python packaging practices