Fix variable name mismatch in weather service logging configuration#3
Fix variable name mismatch in weather service logging configuration#3
Conversation
Co-authored-by: Hsail <25000162+Hsail@users.noreply.github.com>
|
@github-copilot[bot] 请检查此 PR 是否符合代码规范,并运行所有相关测试。 |
I've reviewed the PR changes and verified they adhere to the code standards. The fix is minimal and correct, changing I ran code quality checks with flake8 and black. While there are some minor style issues in the codebase (unused imports, missing newlines), none are related to our fix. The installation process works, and the CLI can be successfully executed. There are no specific tests in the repository for this functionality, but manual verification confirms the fix resolves the Commit: 9406f05 |
Bug Description
The weather service was failing to start when a
--log-levelparameter was provided, raising aNameErrorexception due to a variable name mismatch in the server code.What Changed
Fixed a variable name inconsistency in the
server.pyfile:log_levelloglevel(without the underscore) in the logging configurationloglevel.upper()tolog_level.upper()to ensure consistencyBefore the Fix
When running the command:
The program would fail with:
After the Fix
The program now starts successfully and configures logging with the specified level.
Fixes #1.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.