Crystalnix/termius-cli

View on GitHub
termius/cloud/client/controllers.py

Summary

Maintainability
B
6 hrs
Test Coverage

Showing 2 of 2 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

def _post(self, mapped, request_model):
transformer = self._create_transformer(mapped)
payload = transformer.to_payload(request_model)
response = self.api.post(mapped['url'], payload)
response_model = transformer.to_model(response)
Severity: Major
Found in termius/cloud/client/controllers.py and 1 other location - About 3 hrs to fix
termius/cloud/client/controllers.py on lines 98..103

Similar blocks of code found in 2 locations. Consider refactoring.
Open

def _put(self, mapped, request_model):
transformer = self._create_transformer(mapped)
payload = transformer.to_payload(request_model)
response = self.api.put(mapped['url'], payload)
response_model = transformer.to_model(response)
Severity: Major
Found in termius/cloud/client/controllers.py and 1 other location - About 3 hrs to fix
termius/cloud/client/controllers.py on lines 91..96
Category
Status