Commit Graph

17 Commits

Author SHA1 Message Date
Josh Soref cf9fd56bc9 fix various spelling issues
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-11 19:21:05 -04:00
Eli Schwartz 680b5ff819
treewide: add future annotations import 2023-02-01 17:01:30 -05:00
Brad Smith dd25b88f00 Revert "openbsd: execinfo is not a compiler lib"
OpenBSD now has execinfo as compiler lib. DragonFly has all along.

This reverts commit 0241948d8f.
2022-12-13 21:00:53 +02:00
Dylan Baker 988a50b19c
pylint: enable unnecessary-dunder-call 2022-10-03 00:00:26 -04:00
Dylan Baker 798b6c5624 pylint: enable use-list-literal 2022-09-19 20:57:52 -04:00
Dylan Baker b5a66ce2a3 arglist: use typing.MutableSequence instead of collections
In the long run collections is the right thing to use, but until we can
require 3.9.x as the minimum we cannot annotate the collections.abc
version, only the typing version. This allows correct type annotations
in users of `CompilerArgs`, as mypy (and friends) can determine that
`CompilerArgs` is ~= `T.Sequence[str]`
2022-09-12 18:51:27 -04:00
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