You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2023/05/27 14:24:47 UTC
[qpid-python] branch main updated: QPID-7070: add flake8 to CI as first step towards PEP-8, fix some most egregious things reported (#6)
This is an automated email from the ASF dual-hosted git repository.
jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-python.git
The following commit(s) were added to refs/heads/main by this push:
new b81faca QPID-7070: add flake8 to CI as first step towards PEP-8, fix some most egregious things reported (#6)
b81faca is described below
commit b81faca08ef0b83161157fbe2652cfcc9dba2334
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Sat May 27 16:24:42 2023 +0200
QPID-7070: add flake8 to CI as first step towards PEP-8, fix some most egregious things reported (#6)
---
qpid/connection08.py | 4 ++--
qpid/datatypes.py | 2 +-
qpid/debug.py | 4 ++--
qpid/framer.py | 1 +
qpid/packer.py | 4 ++--
qpid/saslmech/scram.py | 2 +-
qpid/tests/__init__.py | 2 +-
qpid_tests/broker_0_10/management.py | 1 +
8 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/qpid/connection08.py b/qpid/connection08.py
index 4272c01..d8f14a2 100644
--- a/qpid/connection08.py
+++ b/qpid/connection08.py
@@ -341,9 +341,9 @@ class Frame:
self.bof = True
self.eof = True
- def encode(self, enc): abstract
+ def encode(self, enc): abstract # noqa: F821
- def decode(spec, dec, size): abstract
+ def decode(spec, dec, size): abstract # noqa: F821
class Method(Frame):
diff --git a/qpid/datatypes.py b/qpid/datatypes.py
index 5fc6ee2..ec42eff 100644
--- a/qpid/datatypes.py
+++ b/qpid/datatypes.py
@@ -293,7 +293,7 @@ except ImportError:
class UUID:
def __init__(self, hex=None, bytes=None):
if [hex, bytes].count(None) != 1:
- raise TypeErrror("need one of hex or bytes")
+ raise TypeError("need one of hex or bytes")
if bytes is not None:
self.bytes = bytes
elif hex is not None:
diff --git a/qpid/debug.py b/qpid/debug.py
index bc02ae5..a8d3d2d 100644
--- a/qpid/debug.py
+++ b/qpid/debug.py
@@ -42,10 +42,10 @@ class LoudLock:
while not self.lock.acquire(blocking=0):
time.sleep(1)
print("TRYING", file=sys.out)
- traceback.print_stack(None, None, out)
+ traceback.print_stack(None, None, sys.out)
print("TRYING", file=sys.out)
print("ACQUIRED", file=sys.out)
- traceback.print_stack(None, None, out)
+ traceback.print_stack(None, None, sys.out)
print("ACQUIRED", file=sys.out)
return True
diff --git a/qpid/framer.py b/qpid/framer.py
index 95d9d7c..e676612 100644
--- a/qpid/framer.py
+++ b/qpid/framer.py
@@ -21,6 +21,7 @@ from __future__ import absolute_import
import struct, socket
from .exceptions import Closed
from .packer import Packer
+from .sasl import SASLError
from threading import RLock
from logging import getLogger
diff --git a/qpid/packer.py b/qpid/packer.py
index 25b7957..4b22d6c 100644
--- a/qpid/packer.py
+++ b/qpid/packer.py
@@ -22,9 +22,9 @@ import struct
class Packer:
- def read(self, n): abstract
+ def read(self, n): abstract # noqa: F821
- def write(self, s): abstract
+ def write(self, s): abstract # noqa: F821
def unpack(self, fmt):
values = struct.unpack(fmt, self.read(struct.calcsize(fmt)))
diff --git a/qpid/saslmech/scram.py b/qpid/saslmech/scram.py
index a6c112c..be8f2e3 100644
--- a/qpid/saslmech/scram.py
+++ b/qpid/saslmech/scram.py
@@ -20,7 +20,7 @@
from __future__ import absolute_import
from hmac import HMAC
from binascii import b2a_hex
-from .sasl import Sasl
+from .sasl import Sasl, SaslException
import os
import base64
diff --git a/qpid/tests/__init__.py b/qpid/tests/__init__.py
index 37b8fe4..ec734da 100644
--- a/qpid/tests/__init__.py
+++ b/qpid/tests/__init__.py
@@ -61,4 +61,4 @@ class TestTestsXXX(Test):
def testQuxFail(self):
import sys
sys.stdout.write("this test has output with no newline")
- fdsa
+ fdsa # noqa: F821
diff --git a/qpid_tests/broker_0_10/management.py b/qpid_tests/broker_0_10/management.py
index c1d4cf5..436c429 100644
--- a/qpid_tests/broker_0_10/management.py
+++ b/qpid_tests/broker_0_10/management.py
@@ -25,6 +25,7 @@ from threading import Condition
from time import sleep
import qmf.console
import qpid.messaging
+from qpid.messaging.exceptions import Empty
from qpidtoollibs import BrokerAgent
class ManagementTest (TestBase010):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org