Age | Commit message (Collapse) | Author | Files | Lines |
|
This parameter isn't used, at all, so just remove it
|
|
I needed to figure this out for the purposes of annotating CleanTrees
anyway.
|
|
The baseclass has code that assumes said method exists, and it really
doesn't seem to do anything ninja specific, so move it to the generic
backend.
|
|
Because it should be defined there.
|
|
|
|
It is theoretically possible for the command to be None so we should
handle that.
|
|
|
|
This is really, really, annoying. What we really want is (psuedocode):
```python
class SubValues(TypedDict[str, str], total=False):
@INPUT@: T.List[str]
@OUTPUT@: T.List[str]
```
Which would specifiy that `@INPUT@` and `@OUTPUT@` *may* be present and
if they are, then they are lists. There may be additional keys, which
have a single string as a value. Of course there is currently no way to
do that with typing, so we have to instead take a union type and then
use asserts to help the type checker unerstand this.
More info: https://github.com/python/mypy/issues/4617
|
|
It gives us a little more saftey, and makes pylance happy.
|
|
get_compiler_for_source and classify_unity_sources are both wrong, in
that they expect to be given a seqence of strings, but they really
should take a `Sequence[str | File]`.
Additionally, they're using `CompilerType`, which we don't need anymore,
and should stop using, most methods for the Compiler are actually
defined in the base compiler class.
|
|
|
|
These are not complete, and are just enough for backends/backends.py
|
|
This is needed to make CustomTargetIndex polymorphic with Target derived
classes, and is used in the build module.
|
|
the `output` parameter is a string, not an int.
|
|
|
|
Again, this is not complete and is just enough for backend.py. Again,
typing these is complicated massively by the layering violations in the
Target classes and the interpreter.
|
|
|
|
This is not complete, it's just enough for backend/backend.py. A more
completely typing would be more difficult, especially whithout
untangling the layering violation between the build targets and the
interpreter.
|
|
|
|
The underlying attributes are typed properly, but the getters are not
|
|
This really does need to be an OrderedDict, not a MutableMapping, as
there are consumers in the backend that need dictionary only methods.
|
|
|
|
|
|
Fixes: #7638
|
|
Fully type check rust.bindgen
|
|
|
|
|
|
|
|
|
|
|
|
They are documented to go in site-packages, and indeed belong there.
Regression from the initial implementation via commit ad296976f079cd185ab7361e3e4b18c6bf684090
Fixes #6331
|
|
Basically just reorganize code. Try to make it a little neater, while
we're at it.
|
|
It is always set to python3 even if we asked for python2...
|
|
rsplit(..., 1) always produces exactly one split, by design, there's no
need to then join a 1-element list via a generator comprehension after
extracting the end of it via pop. If this commit message sounds
confusing, then so was I when trying to figure out what this actually
did and if it needed extracting to PythonExternalModule.
|
|
Currently, we write each file to the command line, but this can result in
situations where the number of files passed exceeds OS imposed command
line limits. For compilers, we solve this with response files. For
depscan I've chosen to use a JSON list instead. JSON has several
advantages in that it's standardized, there's a built-in python module
for it, and it's familiar. I've also chosen to always use the JSON file
instead of having a heuristic to decide between JSON and not JSON,
while there may be a small performance trade off here, keeping the
implementation simple with only one path is wort it.
Fixes #9129
|
|
Without this, rustc will fail to find libfoo.a; same as with MSVC.
|
|
Fixes: #7007.
|
|
There are two changes here, one is to remove an `elif` that is
effectively an `else`, that helps the type checker and provides a small
speedup potentially. The second is a potentially unbound variable, that
currently isn't hit, but very much could be.
|
|
|
|
This adds a full set of `typed_pos_args` and `typed_kwarg` decorations,
as well as fixing all of the typing errors reported by mypy.
|
|
|
|
It's not documented, and it's been marked deprecated for who knows how
long.
|
|
which can also be a callable taking a CompileChekcMode as an argumetn
and returning a list of strings.
|
|
Which absolutely should accept `str | File`, but the annotations claim
that only strings are accepted.
|
|
The former isn't really correct, as it wants a set and is getting a
dict, the other is also conceptually clearer I think.
|
|
This allows for more accurate type checking
|
|
This assert causes several type checkers (both mypy and pyright) to
force `obj` to be a base `HoldableObject` instead of the specialized
object. Since the check itself may still be valuable as we don't have
fully type annotation coverage it's simply been removed when type
checking to aid in type specialization.
|
|
|
|
So that it's accurate, and we don't need to use to use `#type: ignore`
declaration
|
|
This was the only function left in here that wasn't fully typed, so
let's fix that
|