Skip to content

Commit

Permalink
style: Ignore new pylint warnings.
Browse files Browse the repository at this point in the history
The new warnings don't show anything that we're uncomfortable with so
ignore them rather than fixing them in this case.  It's riskier to
change the method signatures or the types of exceptions thrown from this
critical bit of code.
  • Loading branch information
feanil committed Oct 16, 2024
1 parent 5eda003 commit 49bfca8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion codejail/jail_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class JailResult:
def __init__(self):
self.stdout = self.stderr = self.status = None


# pylint: disable=too-many-positional-arguments
def jail_code(command, code=None, files=None, extra_files=None, argv=None,
stdin=None, limit_overrides_context=None, slug=None):
"""
Expand Down Expand Up @@ -229,6 +229,7 @@ def jail_code(command, code=None, files=None, extra_files=None, argv=None,
# pylint: disable=too-many-statements

if not is_configured(command):
# pylint: disable=broad-exception-raised
raise Exception("jail_code needs to be configured for %r" % command)

# We make a temp directory to serve as the home of the sandboxed code.
Expand Down
2 changes: 1 addition & 1 deletion codejail/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def run_subprocess_through_proxy(*args, **kwargs): # pylint: disable=inconsiste
proxy_stdout = proxy.stdout.readline()
if not proxy_stdout:
# EOF: the proxy must have died.
raise Exception("Proxy process died unexpectedly!")
raise Exception("Proxy process died unexpectedly!") # pylint: disable=broad-exception-raised
status, stdout, stderr, log_calls = deserialize_out(proxy_stdout.rstrip())

# Write all the log messages to the log, and return.
Expand Down
2 changes: 2 additions & 0 deletions codejail/safe_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class SafeExecException(Exception):
"""


# pylint: disable=too-many-positional-arguments
def safe_exec(
code,
globals_dict,
Expand Down Expand Up @@ -235,6 +236,7 @@ def decode_object(obj):
return json.loads(json.dumps(jd))


# pylint: disable=too-many-positional-arguments
def not_safe_exec(
code,
globals_dict,
Expand Down
1 change: 1 addition & 0 deletions codejail/subproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
log = logging.getLogger("codejail")


# pylint: disable=too-many-positional-arguments
def run_subprocess(
cmd, stdin=None, cwd=None, env=None, rlimits=None, realtime=None,
slug=None,
Expand Down

0 comments on commit 49bfca8

Please sign in to comment.