TechDebt - remove print statements (#5571)
This commit is contained in:
parent
047c1a6b7e
commit
43a3fecbd2
@ -57,8 +57,6 @@ class AppSyncResponse(BaseResponse):
|
||||
|
||||
def tags(self, request: Any, full_url: str, headers: Any) -> TYPE_RESPONSE: # type: ignore[return]
|
||||
self.setup_class(request, full_url, headers)
|
||||
print("tags")
|
||||
print(request.method)
|
||||
if request.method == "POST":
|
||||
return self.tag_resource()
|
||||
if request.method == "DELETE":
|
||||
|
@ -25,10 +25,7 @@ class BatchResponse(BaseResponse):
|
||||
if self.body is None or self.body == "":
|
||||
self._json = {}
|
||||
elif not hasattr(self, "_json"):
|
||||
try:
|
||||
self._json = json.loads(self.body)
|
||||
except ValueError:
|
||||
print()
|
||||
return self._json
|
||||
|
||||
def _get_param(self, param_name, if_none=None):
|
||||
|
@ -25,7 +25,7 @@ class ThreadedMotoServer:
|
||||
|
||||
def start(self):
|
||||
if self._verbose:
|
||||
print(
|
||||
print( # noqa
|
||||
f"Starting a new Thread with MotoServer running on {self._ip_address}:{self._port}..."
|
||||
)
|
||||
self._thread = Thread(target=self._server_entry, daemon=True)
|
||||
|
@ -78,7 +78,7 @@ class DomainDispatcherApplication(object):
|
||||
return backend
|
||||
|
||||
if "amazonaws.com" in host:
|
||||
print(
|
||||
print( # noqa
|
||||
"Unable to find appropriate backend for {}."
|
||||
"Remember to add the URL to urls.py, and run scripts/update_backend_index.py to index it.".format(
|
||||
host
|
||||
|
@ -118,15 +118,15 @@ def get_docker_host():
|
||||
else:
|
||||
_ip = network_settings["IPAddress"]
|
||||
if network_name:
|
||||
print(
|
||||
print( # noqa
|
||||
f"WARNING - Moto couldn't find network '{network_name}' - defaulting to {_ip}"
|
||||
)
|
||||
return f"http://{_ip}"
|
||||
except Exception as e: # noqa
|
||||
print(
|
||||
print( # noqa
|
||||
"WARNING - Unable to parse Docker API response. Defaulting to 'host.docker.internal'"
|
||||
)
|
||||
print(f"{type(e)}::{e}")
|
||||
print(f"{type(e)}::{e}") # noqa
|
||||
return "http://host.docker.internal"
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@ class MockXrayClient:
|
||||
return wrapped_f
|
||||
|
||||
def start(self):
|
||||
print("Starting X-Ray Patch")
|
||||
print("Starting X-Ray Patch") # noqa
|
||||
self.old_xray_context_var = os.environ.get("AWS_XRAY_CONTEXT_MISSING")
|
||||
os.environ["AWS_XRAY_CONTEXT_MISSING"] = "LOG_ERROR"
|
||||
self.old_xray_context = aws_xray_sdk.core.xray_recorder._context
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
black==22.3.0
|
||||
flake8==4.0.1
|
||||
flake8-print
|
||||
click
|
||||
inflection
|
||||
lxml
|
||||
|
Loading…
Reference in New Issue
Block a user