Skip to content

Commit

Permalink
style: format code with Autopep8, Black, ClangFormat, dotnet-format, …
Browse files Browse the repository at this point in the history
…Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf

This commit fixes the style issues introduced in d254b9e according to the output
from Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java
Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt,
Scalafmt, StandardJS, StandardRB, swift-format and Yapf.

Details: None
  • Loading branch information
deepsource-autofix[bot] authored Aug 27, 2024
1 parent d254b9e commit 5fd744c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions iot-integration/iot_devices/autonomous_vehicle.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
import requests


class AutonomousVehicleDevice:

def __init__(self, device_id, device_token):
self.device_id = device_id
self.device_token = device_token

def make_payment(self, amount):
# Make a request to the autonomous vehicle API to make a payment
response = requests.post(f'https://autonomous-vehicle-api.com/payments/{self.device_id}', json={'amount': amount}, headers={'Authorization': f'Bearer {self.device_token}'})
response = requests.post(
f"https://autonomous-vehicle-api.com/payments/{self.device_id}",
json={"amount": amount},
headers={"Authorization": f"Bearer {self.device_token}"},
)
return response.json()

def get_vehicle_data(self):
# Make a request to the autonomous vehicle API to retrieve vehicle data
response = requests.get(f'https://autonomous-vehicle-api.com/vehicles/{self.device_id}', headers={'Authorization': f'Bearer {self.device_token}'})
response = requests.get(
f"https://autonomous-vehicle-api.com/vehicles/{self.device_id}",
headers={"Authorization": f"Bearer {self.device_token}"},
)
return response.json()

0 comments on commit 5fd744c

Please sign in to comment.