Skip to content

Commit

Permalink
Black Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBurchLog committed Oct 19, 2023
1 parent a4ceadd commit ac1f915
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions brewtils/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,6 @@ def _initialize_command(method):
cmd.name = _method_name(method)
cmd.description = cmd.description or _method_docstring(method)

# if str(inspect.signature(method)._return_annotation) in ["<class 'object'>", "<class 'dict'>"]:
# cmd.output_type = "JSON"

try:
base_dir = os.path.dirname(inspect.getfile(method))

Expand Down Expand Up @@ -951,8 +948,9 @@ def _signature_validate(cmd, method):
method, param.key
) and param.type != _parameter_type_hint(method, param.key):
raise PluginParamError(
"Parameter Type assigned in the @parameter(type=?) does not match either the function Type Hint "
"or the Doc String definition. Please evaluate your type matching."
"Parameter Type assigned in the @parameter(type=?) does not match "
"either the function Type Hint or the Doc String definition. "
"Please evaluate your type matching."
)

# Couldn't find the parameter. That's OK if this parameter is meant to be part
Expand Down
4 changes: 2 additions & 2 deletions brewtils/rest/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def can_connect(self, **kwargs):
try:
self.session.get(self.config_url, **kwargs)
except requests.exceptions.ConnectionError as ex:
if type(ex) == requests.exceptions.ConnectionError:
if isinstance(ex, requests.exceptions.ConnectionError):
return False
raise

Expand Down Expand Up @@ -831,7 +831,7 @@ def post_chunked_file(self, fd, file_params, current_position=0):
data = fd.read(file_params["chunk_size"])
if not data:
break
if type(data) != bytes:
if not isinstance(data, bytes):
data = bytes(data, "utf-8")
data = b64encode(data)
chunk_result = self.session.post(
Expand Down

0 comments on commit ac1f915

Please sign in to comment.