Skip to content

Commit

Permalink
fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
euhoro committed Jun 19, 2024
1 parent ec95877 commit 87e8123
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
pip install -r requirements_dev.txt
- name: Lint with Pylint
run: |
pylint app main.py redis_inventory_service.py json_inventory_service.py atm_service.py tests
pylint main.py atm_repository_redis.py atm_repository_json_file.py atm_service.py tests
- name: Format with Black
run: |
black --check .
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ignore=tests
max-line-length=88

[MESSAGES CONTROL]
disable=C0114,C0115,C0116
disable=C0114,C0115,C0116, C0301,C0415,W0718,W0612,R1710,W0150,R0913,W1514,R0912,C0411,C0304,R1705,W0134

[REPORTS]
output-format=colorized
3 changes: 0 additions & 3 deletions atm_service_json_file.py → atm_repository_json_file.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import fcntl
import json
import os
import time

from common import Inventory, InventoryService

Expand Down
File renamed without changes.
64 changes: 0 additions & 64 deletions atm_repository_sqllite.py

This file was deleted.

7 changes: 4 additions & 3 deletions atm_service.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import time

from atm_service_redis import RedisInventoryService
from atm_repository_redis import RedisInventoryService
from common import Inventory

MAX_AMOUNT = 2000
Expand All @@ -28,7 +28,8 @@
ERR_INSUFFICIENT_FUNDS = "Insufficient funds. Max available amount:"

SETTINGS_MODE = os.getenv("SETTINGS_MODE", "redis")
REDIS_HOST = os.getenv("REDIS_HOST", "127.0.0.1") # Default to 127.0.0.1 for local development
REDIS_HOST = os.getenv("REDIS_HOST", "127.0.0.1")
# Default to 127.0.0.1 for local development


def get_db_service():
Expand All @@ -38,7 +39,7 @@ def get_db_service():
inventory_service = RedisInventoryService(
redis.StrictRedis(host=REDIS_HOST, port=6379, db=0))
else:
from atm_service_json_file import JSONFileInventoryService
from atm_repository_json_file import JSONFileInventoryService
inventory_service = JSONFileInventoryService()

return inventory_service
Expand Down

0 comments on commit 87e8123

Please sign in to comment.