Skip to content

Explicit arguments with *args and **kwargs #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Xlib/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ class _BaseDisplay(protocol_display.Display):
# Implement a cache of atom names, used by Window objects when
# dealing with some ICCCM properties not defined in Xlib.Xatom

def __init__(self, *args, **keys):
def __init__(self, display = None):
self.resource_classes = _resource_baseclasses.copy()
protocol_display.Display.__init__(self, *args, **keys)
protocol_display.Display.__init__(self, display)
self._atom_cache = {}

def get_atom(self, atomname, only_if_exists=0):
Expand Down
4 changes: 2 additions & 2 deletions Xlib/ext/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@ class EnableContext(rq.ReplyRequest):

# See the discussion on ListFonstsWithInfo in request.py

def __init__(self, callback, *args, **keys):
def __init__(self, callback, display, defer = False, *args, **keys):
self._callback = callback
rq.ReplyRequest.__init__(self, *args, **keys)
rq.ReplyRequest.__init__(self, display, defer=defer, *args, **keys)

def _parse_response(self, data):
r, d = self._reply.parse_binary(data, self._display)
Expand Down
6 changes: 3 additions & 3 deletions Xlib/ext/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def get_rectangles(self, source_kind):
source_kind=source_kind,
)

def input_selected(self, ):
def input_selected(self):
return InputSelected(
display=self.display,
opcode=self.display.get_extension_major(extname),
Expand Down Expand Up @@ -249,14 +249,14 @@ def offset(self, destination_kind, x_offset, y_offset):
y_offset=y_offset,
)

def query_extents(self, ):
def query_extents(self):
return QueryExtents(
display=self.display,
opcode=self.display.get_extension_major(extname),
destination_window=self,
)

def query_version(self, ):
def query_version(self):
return QueryVersion(
display=self.display,
opcode=self.display.get_extension_major(extname),
Expand Down
4 changes: 2 additions & 2 deletions Xlib/protocol/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,9 +785,9 @@ class ListFontsWithInfo(rq.ReplyRequest):

# Bastards.

def __init__(self, *args, **keys):
def __init__(self, display, defer = False, *args, **keys):
self._fonts = []
rq.ReplyRequest.__init__(self, *args, **keys)
rq.ReplyRequest.__init__(self, display, defer=defer, *args, **keys)

def _parse_response(self, data):

Expand Down