Skip to content

Commit

Permalink
Del (object) from 50 inc watchman/python/pywatchman_aio/__init__.py
Browse files Browse the repository at this point in the history
Summary: Python3 makes the use of `(object)` in class inheritance unnecessary. Let's modernize our code by eliminating this.

Reviewed By: palmje

Differential Revision: D48718296

fbshipit-source-id: 13bd3775244fbe2404501a7a57b55eb0253c6d4c
  • Loading branch information
r-barnes authored and facebook-github-bot committed Aug 28, 2023
1 parent f47c3de commit 7fdb5a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions watchman/python/pywatchman_aio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def _resolve_sockname():
return await loop.run_in_executor(None, _resolve_sockname_helper)


class AsyncTransport(object):
class AsyncTransport:
"""Communication transport to the Watchman Service."""

async def activate(self, **kwargs):
Expand Down Expand Up @@ -116,7 +116,7 @@ def close(self):
self.writer.close()


class AsyncCodec(object):
class AsyncCodec:
"""Communication encoding for the Watchman service."""

def __init__(self, transport):
Expand Down Expand Up @@ -177,7 +177,7 @@ class ReceiveLoopError(Exception):
pass


class AIOClient(object):
class AIOClient:
"""Create and manage an asyncio Watchman connection.
Example usage:
Expand Down
2 changes: 1 addition & 1 deletion watchman/python/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def init_bser_mod(self):
make_class(mod, suffix)


class FakeFile(object):
class FakeFile:
def __init__(self, data):
self._data = data
self._ptr = 0
Expand Down
2 changes: 1 addition & 1 deletion watchman/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def loadTestsFromModule(self, module, *args, **kw):

# Manage printing from concurrent threads
# http://stackoverflow.com/a/3030755/149111
class ThreadSafeFile(object):
class ThreadSafeFile:
def __init__(self, f):
self.f = f
self.lock = threading.RLock()
Expand Down

0 comments on commit 7fdb5a5

Please sign in to comment.