fix: Use os.environ[] instead of .get() for DATABASE_URL
Some checks failed
CI / lint-and-test (push) Has been cancelled
Some checks failed
CI / lint-and-test (push) Has been cancelled
Fixes Pylance type error - create_engine() expects str, not str | None. Using direct access raises KeyError if not set, which is correct behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
"# Load .env from project root\n",
|
||||
"load_dotenv('../../.env')\n",
|
||||
"\n",
|
||||
"engine = create_engine(os.environ.get('DATABASE_URL'))\n",
|
||||
"engine = create_engine(os.environ['DATABASE_URL'])\n",
|
||||
"\n",
|
||||
"# City-wide average rent by year\n",
|
||||
"query = \"\"\"\n",
|
||||
|
||||
Reference in New Issue
Block a user