Commit Graph

11 Commits

Author SHA1 Message Date
Christian Clauss a5020857f3 Fix typos discovered by codespell 2021-10-10 16:12:25 -04:00
Eli Schwartz 6a0fabc647
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04 17:16:11 -05:00
Antonin Décimo 39ede12aa5 Fix misspells
Signed-off-by: Antonin Décimo <antonin.decimo@gmail.com>
2021-01-13 12:53:10 -05:00
Daniel Mensinger e681235e5f
typing: fix code review 2020-09-08 20:15:58 +02:00
Daniel Mensinger 47373a2438
typing: get rid of most T.cast 2020-09-08 20:15:58 +02:00
Daniel Mensinger 3dbfe8f75a
typing: fully annotate arglist 2020-09-08 20:15:57 +02:00
Paolo Bonzini b7a4c0793c arglist: optimize flush_pre_post
pre_flush_set and post_flush_set are almost always empty, so we can use
extend() instead of a for...in loop to add the previous elements of
self._container.

We can also skip the conversion from deque to list since pre_flush is
always appended on the right side.

On a QEMU build the time spent in flush_pre_post goes from 1.4 to 0.5
seconds.
2020-08-18 08:09:42 +02:00
Dylan Baker d42cd735a4 arglist: Fix remaining mypy errors and warnings
So we can lint it with mypy
2020-06-22 12:06:10 -07:00
Dylan Baker 4f6bd29ac9 arglist: Split the C/C++ specifics parts into a subclass for CLike
This means that we don't need work arounds for D-like compilers, as the
special c-like hanlding wont be used for D compilers.
2020-06-22 12:06:10 -07:00
Dylan Baker 93c3ec7e2d compilers: Return CompilerArgs from compiler instance
Since the CompileArgs class already needs to know about the compiler,
and we really need at least per-lanaguage if not per-compiler
CompilerArgs classes, let's get the CompilerArgs instance from the
compiler using a method.
2020-06-22 12:06:10 -07:00
Dylan Baker 9d0ad66c29 compilers: Split CompilerArgs into a separate module
I've also moved this out of the compilers pacakge because we're soon
going to need it in linkers, and that creates some serious spagetti
2020-06-22 12:06:10 -07:00