Skip to content

Commit

Permalink
fix: pylint fixes, new_session kw-only
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Mar 28, 2022
1 parent fa39cbd commit a6020d0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plumbum/commands/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ def popen(self, args=(), **kwargs):

class ConcreteCommand(BaseCommand):
QUOTE_LEVEL: ClassVar[int]
__slots__ = ("executable", "custom_encoding")
__slots__ = ("executable",)

def __init__(self, executable, encoding):
self.executable = executable
Expand Down
2 changes: 1 addition & 1 deletion plumbum/machines/paramiko_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def sftp(self):
return self._sftp

def session(
self, isatty=False, term="vt100", width=80, height=24, new_session=False
self, isatty=False, term="vt100", width=80, height=24, *, new_session=False
):
# new_session is ignored for ParamikoMachine
trans = self._client.get_transport()
Expand Down
4 changes: 2 additions & 2 deletions plumbum/machines/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def getdelta(self):


class RemoteCommand(ConcreteCommand):
__slots__ = ["remote", "executable"]
__slots__ = ("remote",)
QUOTE_LEVEL = 1

def __init__(self, remote, executable, encoding="auto"):
Expand Down Expand Up @@ -276,7 +276,7 @@ def python(self):
self._python = self["python3"]
return self._python

def session(self, isatty=False, new_session=False):
def session(self, isatty=False, *, new_session=False):
"""Creates a new :class:`ShellSession <plumbum.session.ShellSession>` object; this invokes the user's
shell on the remote machine and executes commands on it over stdin/stdout/stderr"""
raise NotImplementedError()
Expand Down

0 comments on commit a6020d0

Please sign in to comment.