Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Globally disable Pylint E0606 possibly-used-before-assignment rule + fix one case #1349

Merged
merged 2 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ disable = [
"R",
"C",
"W",
"E0606", # possibly-used-before-assignment - gives a lot of false positives
]


Expand Down
3 changes: 3 additions & 0 deletions src/tlo/analysis/hsi_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,9 @@ def main():
"""Entry point to do the inspection of HSI events when running as script."""
args = _parse_command_line_args()
warnings.simplefilter('ignore')
if args.json_file is None and args.merge_json_details:
msg = "Cannot merge details if JSON file not specified"
raise ValueError(msg)
if args.json_file is not None:
with open(args.json_file, 'r') as f:
hsi_event_details = json.load(f)
Expand Down