Skip to content

Commit

Permalink
resoleved pylint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gsheth21 committed Oct 31, 2024
1 parent f78b89f commit 2212a84
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
23 changes: 19 additions & 4 deletions app/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
"""
config.py
This module contains configuration settings for the application.
"""

import os
basedir = os.path.abspath(os.path.dirname(__file__))

class Config(object):
"""The class creates a connection to the database"""
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'sqlite:///' + os.path.join(basedir, 'app.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False
class Config:
"""Configuration settings for the database connection."""
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
'sqlite:///' + os.path.join(basedir, 'app.db')
SQLALCHEMY_TRACK_MODIFICATIONS = False

def get_database_uri(self):
"""Returns the database URI."""
return self.SQLALCHEMY_DATABASE_URI

def is_sqlalchemy_tracking_enabled(self):
"""Returns whether SQLAlchemy tracking modifications is enabled."""
return self.SQLALCHEMY_TRACK_MODIFICATIONS
1 change: 0 additions & 1 deletion tests/test_app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import unittest
from unittest.mock import patch, MagicMock
from bson import ObjectId
from app import app
from app.routes import db, intializeDB, setTest

Expand Down

0 comments on commit 2212a84

Please sign in to comment.