Age | Commit message (Collapse) | Author | Files | Lines |
|
Partially-Fixes: #1799
|
|
To be able to handle link_depends in backends that do not just operate on a
file basis like ninja, information about the targets, not just their output is
required.
|
|
Which resolves all of the remaining typing issues.
|
|
|
|
|
|
|
|
|
|
Why did this dumb thing of mine ever get committed???
|
|
|
|
|
|
|
|
discovered via flake8 --select E303
|
|
"X not in Y" is preferred over "not X in Y", as the former is more
readable.
|
|
|
|
Since typing != T as far as flake8 is aware, give the linter an extra
hint.
|
|
Imported both inside and outside of T.TYPE_CHECKING, the runtime import
can be removed by quote-deferring one of the use sites.
Update:
In between then and now, this got removed from T.TYPE_CHECKING, move it
back there rather than preserving the runtime import.
|
|
|
|
(var,) is the correct way to pass values to a percent formatted string,
but not to .format so we would end up printing something like:
unexpected input at line (4,)
Upgrade to an f-string and insert the correct value correctly.
|
|
'{}'.format('foo') for any given value of 'foo' (in this case, a
function returning a string), can always just be 'foo' directly, which
is a lot more readable.
|
|
|
|
All changes were created by running
"pyupgrade --py3-only"
and committing the results. Although this has been performed in the
past, newer versions of pyupgrade can automatically catch more
opportunities, notably list comprehensions can use generators instead,
in the following cases:
- unpacking into function arguments as function(*generator)
- unpacking into assignments of the form x, y = generator
- as the argument to some builtin functions such as min/max/sorted
Also catch a few creeping cases of new code added using older styles.
|
|
Reference Manual 2.0
|
|
We wrote:
ERROR: install_emptydir keyword argument "install_mode" permissions string must
be exactly 9 characters, got "4" in the form rwxr-xr-x
Let's change this around to be easier to read.
Also, 1-based numbering was used (for components) and 0-based for "bits".
And actually the "bits" are not bits, but octal digits. So say "permissions
character 1", "permissions character 2".
And finally change "must be … if provided" to "can only be". (If it isn't
provided, it "is not", so the sentence is still valid. The user will only
get this error if they provide something, so we don't need to be super precise
and say "if provided". And then we avoid confusing the reader whether
it's "if provided" attaches to the the "False" or to the whole sentence.)
|
|
Broken in commit 3feaea6b29197cd224fbce0ac65fd43d08c3beac.
|
|
The previous commit bd2fcb268b9ff48797bebb6a2ef94d2741234191
accidentally used the wrong var so the param name was missing,
leading to an error of "unrecognized arguments" for the
datadirs parameter value.
|
|
We ended up passing a NoneType as the program binary, which is a very
awkward way to communicate an error when failing to write a basic
package version file.
|
|
|
|
|
|
|
|
Otherwise changes to a dependency don't propogate
|
|
|
|
There were two allowed kwargs that were unused, I've dropped them for
now, though I need to check if they were documented. If they are then we
need to deprecate them to remove them, otherwise we'll just leave them
removed.
|
|
|
|
|
|
As there are so many wrappers that need these as well
|
|
|
|
|
|
Otherwise we have to do a lot of casting to ensure that we get the
appropriate invariant type
|
|
|
|
This does not convert the build side, or remove any of the checking it
does. We still need that for other callers of custom target. What we'll
do for those is add an internal interface that defaults things, then
we'll be able to have those callers do their own validation, and the
CustomTarget validation machinary can be removed.
Fixes #9096
|
|
We still need this to co-exist as long as there are interfaces for
CustomTarget other than `func_custom_target`, this gets us there.
|
|
We really want to move all of this option handling into the interpreter
through the typed_kwargs, this is the first step to that
|
|
This will happen as we transition from doing the conversion in the
function body to using the KwargInfo to make that change. If we get one
just return it.
|
|
|
|
since most of the Target classes use this, let's just go ahead and add
it here instead of moving it later
|
|
|
|
|
|
func_generator already has typed_kwargs, it doesn't need both.
|
|
|
|
In the comparison methods of Target. There are several problems with the
old implementation:
1. It's not idiomatic
2. It can match on things that It shouldn't (like a Compiler, which has
a `get_id() -> str` method, but not one that we should compare with
Targets
3. It confuses mypy, which doesn't handle hasattr
|