Skip to content

Commit

Permalink
Fix new pytype warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
arichardson committed Oct 11, 2023
1 parent 82d840a commit a71a883
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pycheribuild/boot_cheribsd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def flush(self):
def wait(self):
info("Exiting (fake) ", coloured(AnsiColour.yellow, commandline_to_str(self.cmd)))

def interact(self, **kwargs):
def interact(self, escape_character=chr(29), input_filter=None, output_filter=None):
info("Interacting with (fake) ", coloured(AnsiColour.yellow, commandline_to_str(self.cmd)))

def sendcontrol(self, char):
Expand Down Expand Up @@ -730,7 +730,7 @@ def send(self, s):
def sendintr(self):
self.stderr.write("^C\n")

def interact(self, **kwargs):
def interact(self, escape_character=chr(29), input_filter=None, output_filter=None):
if self.should_quit:
super().kill(signal.SIGTERM)
time.sleep(0.1)
Expand Down
2 changes: 1 addition & 1 deletion pycheribuild/config/compilation_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ def semihosting_ldflags(self) -> "list[str]":
f"-Wl,--defsym=__ram_size={hex(dram_size)}",
f"-Wl,--defsym=__stack_size={stack_size}",
"-lsemihost",
self.sysroot_dir / "lib/crt0-semihost.o",
str(self.sysroot_dir / "lib/crt0-semihost.o"),
]

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion pycheribuild/projects/cmake_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def configure(self, **kwargs) -> None:
self.install_file(self.build_dir / "compile_commands.json", self.source_dir / "compile_commands.json",
force=True)

def install(self, _stdout_filter=_default_stdout_filter) -> None:
def install(self, *, _stdout_filter=_default_stdout_filter) -> None:
if _stdout_filter is _default_stdout_filter:
_stdout_filter = self._cmake_install_stdout_filter
super().install(_stdout_filter=_stdout_filter)
Expand Down
4 changes: 2 additions & 2 deletions pycheribuild/projects/cross/cheribsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ def kernconf_list(self) -> "list[str]":
assert self.kernel_config is not None
return [self.kernel_config, *self.extra_kernels]

def compile(self, mfs_root_image: "Optional[Path]" = None, sysroot_only=False, **kwargs) -> None:
def compile(self, *, mfs_root_image: "Optional[Path]" = None, sysroot_only=False, **kwargs) -> None:
# The build seems to behave differently when -j1 is passed (it still complains about parallel make failures)
# so just omit the flag here if the user passes -j1 on the command line
if not self.use_bootstrapped_toolchain:
Expand Down Expand Up @@ -1218,7 +1218,7 @@ def installworld_args(self) -> MakeOptions:
result.set_env(METALOG=self.install_dir / "METALOG.world")
return result

def install(self, kernconfs: "Optional[list[str]]" = None, sysroot_only=False, **kwargs) -> None:
def install(self, *, kernconfs: "Optional[list[str]]" = None, sysroot_only=False, **kwargs) -> None:
if self.config.freebsd_host_tools_only:
self.info("Skipping install step because freebsd-host-tools was set")
return
Expand Down
6 changes: 3 additions & 3 deletions pycheribuild/projects/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ def set_configure_prog_with_args(self, prog: str, path: Path, args: list) -> Non
fullpath += " " + self.commandline_to_str(args)
self.configure_environment[prog] = fullpath

def configure(self, cwd: "Optional[Path]" = None, configure_path: "Optional[Path]" = None) -> None:
def configure(self, *, cwd: "Optional[Path]" = None, configure_path: "Optional[Path]" = None) -> None:
if cwd is None:
cwd = self.build_dir
if not self.should_run_configure():
Expand All @@ -1263,7 +1263,7 @@ def configure(self, cwd: "Optional[Path]" = None, configure_path: "Optional[Path
self.run_with_logfile([str(configure_path), *self.configure_args], logfile_name="configure", cwd=cwd,
env=self.configure_environment)

def compile(self, cwd: "Optional[Path]" = None, parallel: bool = True) -> None:
def compile(self, *, cwd: "Optional[Path]" = None, parallel: bool = True) -> None:
if cwd is None:
cwd = self.build_dir
self.run_make("all", cwd=cwd, parallel=parallel)
Expand Down Expand Up @@ -1315,7 +1315,7 @@ def run_make_install(self, *, options: "Optional[MakeOptions]" = None, _stdout_f
self.run_make(make_target=target, options=options, stdout_filter=_stdout_filter, cwd=cwd,
parallel=parallel, **kwargs)

def install(self, _stdout_filter=_default_stdout_filter) -> None:
def install(self, *, _stdout_filter=_default_stdout_filter) -> None:
self.run_make_install(_stdout_filter=_stdout_filter)
if self.compiling_for_cheri() and not (self.real_install_root_dir / "lib64c").exists():
self.create_symlink(self.real_install_root_dir / "lib", self.real_install_root_dir / "lib64c")
Expand Down

0 comments on commit a71a883

Please sign in to comment.