diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-05-07 13:44:12 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-05-10 13:51:24 -0700 |
commit | cb70a20490eb1ca9a201bb2de652726d6bb28725 (patch) | |
tree | 487aff4e2feed83b455085d71369274f83f756f0 /mesonbuild/compilers/compilers.py | |
parent | dcfd9185488a843e85f051169ee1d10f503a13ef (diff) | |
download | meson-cb70a20490eb1ca9a201bb2de652726d6bb28725.zip meson-cb70a20490eb1ca9a201bb2de652726d6bb28725.tar.gz meson-cb70a20490eb1ca9a201bb2de652726d6bb28725.tar.bz2 |
compilers: make keyword args to Compiler.compile keyword only
Becuase treating args as either keyword or positional makes inheritance
really awful to work with.
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index a3401e8..ff443b3 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -1146,7 +1146,7 @@ class Compiler: return os.path.join(dirname, 'output.' + suffix) @contextlib.contextmanager - def compile(self, code, extra_args=None, mode='link', want_output=False): + def compile(self, code, extra_args=None, *, mode='link', want_output=False): if extra_args is None: extra_args = [] try: @@ -1199,7 +1199,7 @@ class Compiler: pass @contextlib.contextmanager - def cached_compile(self, code, cdata: coredata.CoreData, extra_args=None, mode: str = 'link'): + def cached_compile(self, code, cdata: coredata.CoreData, *, extra_args=None, mode: str = 'link'): assert(isinstance(cdata, coredata.CoreData)) # Calculate the key |