Skip to content

Commit

Permalink
Fix linting errors in kafka_protocol.py
Browse files Browse the repository at this point in the history
  • Loading branch information
arenard authored Nov 27, 2023
1 parent 2990134 commit 4d3302b
Showing 1 changed file with 6 additions and 23 deletions.
29 changes: 6 additions & 23 deletions module_utils/kafka_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def encode(cls, value):
def decode(cls, data):
return _unpack(cls._unpack, data.read(8))


class DescribeClientQuotasResponse_v0(Response):
API_KEY = 48
API_VERSION = 0
Expand All @@ -39,7 +38,6 @@ class DescribeClientQuotasResponse_v0(Response):
('value', Float64))))),
)


class OffsetDeleteResponse_v0(Response):
API_KEY = 47
API_VERSION = 0
Expand All @@ -53,7 +51,6 @@ class OffsetDeleteResponse_v0(Response):
('error_code', Int16)))))
)


class OffsetDeleteRequest_v0(Request):
API_KEY = 47
API_VERSION = 0
Expand All @@ -66,10 +63,8 @@ class OffsetDeleteRequest_v0(Request):
))
)


API_KEYS[47] = 'OffsetDelete'


class DescribeClientQuotasRequest_v0(Request):
API_KEY = 48
API_VERSION = 0
Expand All @@ -83,7 +78,6 @@ class DescribeClientQuotasRequest_v0(Request):
('strict', Boolean)
)


class AlterClientQuotasResponse_v0(Response):
API_KEY = 49
API_VERSION = 0
Expand All @@ -97,7 +91,6 @@ class AlterClientQuotasResponse_v0(Response):
('entity_name', String('utf-8'))))))
)


class AlterClientQuotasRequest_v0(Request):
API_KEY = 49
API_VERSION = 0
Expand All @@ -114,11 +107,9 @@ class AlterClientQuotasRequest_v0(Request):
('validate_only', Boolean)
)


API_KEYS[48] = 'DescribeClientQuotas'
API_KEYS[49] = 'AlterClientQuotas'


# Bug https://github.com/dpkp/kafka-python/pull/2206
class DescribeConfigsResponse_v1(Response):
API_KEY = 32
Expand All @@ -142,7 +133,6 @@ class DescribeConfigsResponse_v1(Response):
('config_source', Int8)))))))
)


class DescribeConfigsRequest_v1(Request):
API_KEY = 32
API_VERSION = 1
Expand All @@ -155,7 +145,6 @@ class DescribeConfigsRequest_v1(Request):
('include_synonyms', Boolean)
)


try:
from kafka.protocol.admin import AlterPartitionReassignmentsRequest_v0 \
as _AlterPartitionReassignmentsRequest_v0
Expand Down Expand Up @@ -529,11 +518,9 @@ class ListPartitionReassignmentsRequest_v0(Request):
API_KEYS[45] = 'AlterPartitionReassignments'
API_KEYS[46] = 'ListPartitionReassignments'


class DescribeUserScramCredentialsResponse_v0(Response):
"""
DescribeUserScramCredentials Response (Version: 0) =>
throttle_time_ms => INT32
error_code => INT16
error_message => COMPACT_NULLABLE_STRING
Expand Down Expand Up @@ -563,8 +550,7 @@ class DescribeUserScramCredentialsResponse_v0(Response):
("tags", TaggedFields)
))
)



class DescribeUserScramCredentialsRequest_v0(Request):
"""
DescribeUserScramCredentials Request (Version: 0) => [users] TAG_BUFFER
Expand All @@ -582,11 +568,9 @@ class DescribeUserScramCredentialsRequest_v0(Request):
)),
("tags", TaggedFields)
)



API_KEYS[50] = 'DescribeUserScramCredentials'



class AlterUserScramCredentialsResponse_v0(Response):
"""
AlterUserScramCredentials Response (Version: 0)
Expand All @@ -609,8 +593,7 @@ class AlterUserScramCredentialsResponse_v0(Response):
)),
("tags", TaggedFields)
)



class AlterUserScramCredentialsRequest_v0(Request):
""""
AlterUserScramCredentials Request (Version: 0)
Expand Down Expand Up @@ -645,6 +628,6 @@ class AlterUserScramCredentialsRequest_v0(Request):
)),
("tags", TaggedFields)
)



API_KEYS[51] = 'AlterUserScramCredentials'

0 comments on commit 4d3302b

Please sign in to comment.