Skip to content

Commit

Permalink
linted with isort
Browse files Browse the repository at this point in the history
  • Loading branch information
rwmutel committed May 13, 2024
1 parent 9691ba0 commit 92b0568
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/check-ins/check_in_model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pydantic import BaseModel
from datetime import datetime

from pydantic import BaseModel


class CheckIn(BaseModel):
coffee_shop_id: int | None
Expand Down
7 changes: 4 additions & 3 deletions src/check-ins/check_ins_service.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from fastapi import HTTPException
from persistence import Client
import random

import requests
import utils
import random
from fastapi import HTTPException
from persistence import Client

conn = Client(random.choice(utils.get_consul_kv("check_ins_cluster_nodes")))

Expand Down
7 changes: 4 additions & 3 deletions src/check-ins/controller.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from contextlib import asynccontextmanager
import check_ins_service
from typing import Annotated
from check_in_model import CheckIn
from fastapi import FastAPI, HTTPException, Cookie

import check_ins_service
import utils
from check_in_model import CheckIn
from fastapi import Cookie, FastAPI, HTTPException


@asynccontextmanager
Expand Down
3 changes: 2 additions & 1 deletion src/check-ins/persistence.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Dict, Literal

from cassandra.cluster import Cluster, Session
from cassandra.query import dict_factory
from typing import Dict, Literal


class Client:
Expand Down
5 changes: 3 additions & 2 deletions src/check-ins/utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import json
import os
import random
import socket
from kafka.producer import KafkaProducer
import json
from datetime import datetime

from kafka.producer import KafkaProducer

import consul


Expand Down
4 changes: 2 additions & 2 deletions src/coffee-packs/utils.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import json
import os
import random
import socket
import json
from datetime import datetime

from kafka.producer import KafkaProducer

import consul


consul_addr = os.getenv("CONSUL_ADDR").split(":")
c = consul.Consul(host=consul_addr[0], port=int(consul_addr[1]))
HTTP_PREFIX = "http://"
Expand Down
5 changes: 3 additions & 2 deletions src/coffee-shops/utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import json
import os
import random
import socket
from kafka.producer import KafkaProducer
from datetime import datetime
import json

from kafka.producer import KafkaProducer

import consul

Expand Down

0 comments on commit 92b0568

Please sign in to comment.