-
Notifications
You must be signed in to change notification settings - Fork 6
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
Type hinting and misc changes #417
Conversation
…, added type hinting (GEOS-ESM#349)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mranst Thanks for all of these type hint changes and catches
…typing.Optional used where appropriate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work! I just had a few minor suggestions, but overall, this is well done. Having type hints everywhere will be a huge quality of life improvement for Swell developers, especially around some of our weirder functions.
Did you also try running Swell through a static type checker like mypy or Pyright?
src/swell/deployment/prepare_config_and_suite/question_and_answer_defaults.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this is colossal work @mranst! Just a few minor comments following others.
I made a copy of your branch to run Tier1 tests (which they run succesfully)
https://github.com/GEOS-ESM/swell/actions/runs/10850825590
Are you part of GEOS-ESM and push changes to and create branches on Swell repo? I think we need to add you.
Co-authored-by: Alexey Shiklomanov <[email protected]>
@asewnath @Dooruk Thanks both for the thorough reviews! We should probably come to some consensus on the use of Forward References in type hints (i.e., I don't have very strong feelings about this. My mild preference is:
What do you two think? |
Thanks for the comments everyone! I have added direct type hinting for Logger everywhere, unless we do want to go back to the forward references. I'm looking through for other object instance calls so I can type them directly, as well. |
… typing functions
@ashiklom I'm inclined to sticking with direct class references for now. Seeing both forward references and direct class references may be confusing for new users and developers. If we wanted to use both approaches, we should document our type hinting methodology for clarification. |
I agree with @asewnath on this one. I think many Python users (myself included) aren't familiar with typehinting and forward refence is one step beyond that. Direct class reference is more straightforward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all good, thanks again @mranst! I will wait on others approval before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good! However, when I ran this through a type checker locally (mypy
), it turned up a bunch of errors. We don't have to address all (or even most, and perhaps not any) of them now...but I recommend taking a look through this list and deciding consciously which of the errors are worth fixing now and which ones we can wait on for a future PR.
@mranst I leave this up to your judgment. Let me know when you think we've hit a reasonably stopping point for this PR.
Full mypy
output is in the Details below.
src/swell/deployment/platforms/platforms.py:12: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/deployment/platforms/platforms.py:12: note: Hint: "python3 -m pip install types-PyYAML"
src/swell/deployment/platforms/platforms.py:12: note: (or run "mypy --install-types" to install all missing stub packages)
src/swell/deployment/platforms/platforms.py:12: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
src/swell/utilities/slurm.py:13: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/utilities/slurm.py:201: error: Item "None" of "Match[str] | None" has no attribute "group" [union-attr]
src/swell/utilities/shell_commands.py:39: error: Item "None" of "IO[bytes] | None" has no attribute "readline" [union-attr]
src/swell/utilities/shell_commands.py:71: error: Argument "stdout" to "run_subprocess" has incompatible type "int"; expected "str | None" [arg-type]
src/swell/utilities/shell_commands.py:71: error: Argument "stderr" to "run_subprocess" has incompatible type "int"; expected "str | None" [arg-type]
src/swell/utilities/shell_commands.py:86: error: Argument "stdout" to "run" has incompatible type "str | None"; expected "int | IO[Any] | None" [arg-type]
src/swell/utilities/shell_commands.py:86: error: Argument "stderr" to "run" has incompatible type "str | None"; expected "int | IO[Any] | None" [arg-type]
src/swell/utilities/observations.py:11: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/utilities/netcdf_files.py:12: error: Cannot find implementation or library stub for module named "xarray" [import-not-found]
src/swell/utilities/get_channels.py:10: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/utilities/get_channels.py:54: error: Incompatible return value type (got "str", expected "list[Any]") [return-value]
src/swell/utilities/get_channels.py:59: error: Missing return statement [return]
src/swell/utilities/get_channels.py:110: error: Incompatible return value type (got "tuple[list[Any], list[int]]", expected "tuple[str, list[Any]]") [return-value]
src/swell/utilities/get_channels.py:113: error: Incompatible return value type (got "tuple[None, None]", expected "tuple[str, list[Any]]") [return-value]
src/swell/utilities/get_channels.py:134: error: No return value expected [return-value]
src/swell/utilities/exceptions.py:25: error: "Logger" not callable [operator]
src/swell/utilities/dictionary.py:10: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/utilities/dictionary.py:19: error: Missing return statement [return]
src/swell/utilities/config.py:11: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/utilities/config.py:68: error: Incompatible types in assignment (expression has type "None", variable has type "list[Any]") [assignment]
src/swell/utilities/scripts/check_jedi_interface_templates.py:71: error: Need type annotation for "templates" (hint: "templates: list[<type>] = ...") [var-annotated]
src/swell/utilities/git_utils.py:28: error: Argument 2 to "run_subprocess_dev_null" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/utilities/git_utils.py:51: error: Argument 2 to "run_subprocess_dev_null" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/utilities/git_utils.py:75: error: Argument 2 to "run_subprocess_dev_null" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/utilities/git_utils.py:85: error: Argument 2 to "run_subprocess_dev_null" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/utilities/geos.py:11: error: Skipping analyzing "f90nml": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/utilities/geos.py:13: error: Skipping analyzing "isodate": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/utilities/geos.py:14: error: Skipping analyzing "netCDF4": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/utilities/geos.py:110: error: Argument 2 to "run_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/utilities/geos.py:172: error: Incompatible default for argument "dst_dir" (default has type "None", argument has type "str") [assignment]
src/swell/utilities/geos.py:172: note: PEP 484 prohibits implicit Optional. Accordingly, mypy has changed its default to no_implicit_optional=True
src/swell/utilities/geos.py:172: note: Use https://github.com/hauntsaninja/no_implicit_optional to automatically upgrade your codebase
src/swell/utilities/geos.py:279: error: Incompatible types in assignment (expression has type "list[str]", variable has type "str") [assignment]
src/swell/utilities/data_assimilation_window_params.py:11: error: Skipping analyzing "isodate": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/utilities/data_assimilation_window_params.py:66: error: Incompatible return value type (got "datetime", expected "str") [return-value]
src/swell/test/code_tests/slurm_test.py:54: error: Argument 1 to "prepare_scheduling_dict" has incompatible type "logging.Logger"; expected "swell.utilities.logger.Logger" [arg-type]
src/swell/test/code_tests/slurm_test.py:60: error: Argument 1 to "prepare_scheduling_dict" has incompatible type "logging.Logger"; expected "swell.utilities.logger.Logger" [arg-type]
src/swell/test/code_tests/slurm_test.py:68: error: Argument 1 to "prepare_scheduling_dict" has incompatible type "logging.Logger"; expected "swell.utilities.logger.Logger" [arg-type]
src/swell/deployment/launch_experiment.py:58: error: Argument 2 to "run_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/deployment/launch_experiment.py:60: error: Argument 2 to "run_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/deployment/launch_experiment.py:67: error: Argument 2 to "run_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/deployment/launch_experiment.py:72: error: Argument 2 to "run_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/deployment/launch_experiment.py:97: error: Argument 2 to "run_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/utilities/gsi_record_parser.py:1: error: Library stubs not installed for "pandas" [import-untyped]
src/swell/utilities/gsi_record_parser.py:1: note: Hint: "python3 -m pip install pandas-stubs"
src/swell/utilities/gsi_record_parser.py:28: error: "None" has no attribute "loc" [attr-defined]
src/swell/utilities/gsi_record_parser.py:28: error: Value of type "None" is not indexable [index]
src/swell/utilities/gsi_record_parser.py:43: error: "None" has no attribute "iloc" [attr-defined]
src/swell/utilities/gsi_record_parser.py:44: error: "None" has no attribute "iloc" [attr-defined]
src/swell/utilities/gsi_record_parser.py:51: error: Value of type "None" is not indexable [index]
src/swell/utilities/gsi_record_parser.py:54: error: "None" has no attribute "loc" [attr-defined]
src/swell/utilities/gsi_record_parser.py:54: error: Value of type "None" is not indexable [index]
src/swell/utilities/gsi_record_parser.py:65: error: "None" has no attribute "loc" [attr-defined]
src/swell/utilities/gsi_record_parser.py:65: error: Value of type "None" is not indexable [index]
src/swell/utilities/gsi_record_parser.py:101: error: "None" has no attribute "loc" [attr-defined]
src/swell/utilities/gsi_record_parser.py:101: error: Value of type "None" is not indexable [index]
src/swell/utilities/observing_system_records.py:2: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/utilities/observing_system_records.py:3: error: Library stubs not installed for "pandas" [import-untyped]
src/swell/utilities/observing_system_records.py:94: error: Need type annotation for "column_names" (hint: "column_names: list[<type>] = ...") [var-annotated]
src/swell/utilities/observing_system_records.py:97: error: Need type annotation for "obs_registry" (hint: "obs_registry: list[<type>] = ...") [var-annotated]
src/swell/utilities/observing_system_records.py:169: error: Value of type "None" is not indexable [index]
src/swell/utilities/observing_system_records.py:171: error: "None" has no attribute "loc" [attr-defined]
src/swell/utilities/observing_system_records.py:171: error: Value of type "None" is not indexable [index]
src/swell/utilities/observing_system_records.py:172: error: "None" has no attribute "loc" [attr-defined]
src/swell/utilities/observing_system_records.py:172: error: Value of type "None" is not indexable [index]
src/swell/utilities/filehandler.py:113: error: Need type annotation for "listing" (hint: "listing: list[<type>] = ...") [var-annotated]
src/swell/utilities/filehandler.py:137: error: "FileHandler" has no attribute "list" [attr-defined]
src/swell/utilities/filehandler.py:172: error: "FileHandler" has no attribute "list" [attr-defined]
src/swell/utilities/filehandler.py:274: error: Argument 1 to "FileCollection" has incompatible type "dict[str, bool]"; expected "list[Any]" [arg-type]
src/swell/utilities/filehandler.py:341: error: Argument 1 to "FileCollection" has incompatible type "dict[Any, Any]"; expected "list[Any]" [arg-type]
src/swell/utilities/filehandler.py:355: error: Incompatible types in assignment (expression has type "Literal[True] | list[Any]", variable has type "bool") [assignment]
src/swell/utilities/filehandler.py:392: error: Need type annotation for "listing" (hint: "listing: list[<type>] = ...") [var-annotated]
src/swell/utilities/filehandler.py:393: error: "list[Any]" has no attribute "get" [attr-defined]
src/swell/utilities/filehandler.py:394: error: "list[Any]" has no attribute "get" [attr-defined]
src/swell/utilities/filehandler.py:395: error: "list[Any]" has no attribute "get" [attr-defined]
src/swell/utilities/file_system_operations.py:54: error: Argument 2 to "info" of "Logger" has incompatible type "list[Any]"; expected "bool" [arg-type]
src/swell/utilities/file_system_operations.py:93: error: Missing return statement [return]
src/swell/utilities/build.py:13: error: Cannot find implementation or library stub for module named "jedi_bundle.bin.jedi_bundle" [import-not-found]
src/swell/utilities/build.py:14: error: Cannot find implementation or library stub for module named "jedi_bundle.config.config" [import-not-found]
src/swell/utilities/build.py:33: error: Incompatible return value type (got "tuple[str, str]", expected "str") [return-value]
src/swell/utilities/scripts/task_question_dicts_defaults.py:14: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/utilities/scripts/task_question_dicts_defaults.py:42: error: Item "list[Any]" of "list[Any] | dict[Any, Any]" has no attribute "items" [union-attr]
src/swell/utilities/scripts/task_question_dicts_defaults.py:59: error: Need type annotation for "jedi_tq_dict" [var-annotated]
src/swell/utilities/scripts/task_question_dicts_defaults.py:104: error: Item "list[Any]" of "list[Any] | dict[Any, Any]" has no attribute "items" [union-attr]
src/swell/utilities/scripts/task_question_dicts_defaults.py:110: error: Need type annotation for "platform_tq_dict" [var-annotated]
src/swell/utilities/scripts/task_question_dicts.py:15: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/utilities/jinja2.py:37: error: Signature of "__getitem__" incompatible with supertype "Undefined" [override]
src/swell/utilities/jinja2.py:37: note: Superclass:
src/swell/utilities/jinja2.py:37: note: def (self: Undefined, *args: Any, **kwargs: Any) -> Never
src/swell/utilities/jinja2.py:37: note: Subclass:
src/swell/utilities/jinja2.py:37: note: def __getitem__(self, str | int, /) -> SilentUndefined
src/swell/utilities/render_jedi_interface_files.py:11: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/utilities/render_jedi_interface_files.py:48: error: "str" has no attribute "dto" [attr-defined]
src/swell/utilities/render_jedi_interface_files.py:60: error: Incompatible types in assignment (expression has type "str | None", target has type "str") [assignment]
src/swell/utilities/render_jedi_interface_files.py:132: error: Incompatible types in assignment (expression has type "object", target has type "str") [assignment]
src/swell/utilities/render_jedi_interface_files.py:163: error: Incompatible return value type (got "object", expected "dict[Any, Any]") [return-value]
src/swell/utilities/render_jedi_interface_files.py:176: error: Argument 3 to "join" has incompatible type "str | None"; expected "str" [arg-type]
src/swell/utilities/render_jedi_interface_files.py:180: error: Incompatible return value type (got "object", expected "dict[Any, Any]") [return-value]
src/swell/utilities/render_jedi_interface_files.py:189: error: Incompatible types in assignment (expression has type "str", variable has type "None") [assignment]
src/swell/utilities/render_jedi_interface_files.py:191: error: Incompatible types in assignment (expression has type "str", variable has type "None") [assignment]
src/swell/utilities/render_jedi_interface_files.py:204: error: Argument 3 to "join" has incompatible type "str | None"; expected "str" [arg-type]
src/swell/utilities/render_jedi_interface_files.py:228: error: Incompatible return value type (got "object", expected "dict[Any, Any]") [return-value]
src/swell/utilities/render_jedi_interface_files.py:239: error: Incompatible types in assignment (expression has type "str | dict[Any, Any]", variable has type "str | None") [assignment]
src/swell/utilities/render_jedi_interface_files.py:247: error: Argument 3 to "join" has incompatible type "str | None"; expected "str" [arg-type]
src/swell/utilities/render_jedi_interface_files.py:251: error: Incompatible return value type (got "object", expected "dict[Any, Any]") [return-value]
src/swell/tasks/base/task_base.py:50: error: Argument 2 to "info" of "Logger" has incompatible type "type[Logger]"; expected "bool" [arg-type]
src/swell/tasks/base/task_base.py:98: error: Item "None" of "Datetime | None" has no attribute "string_directory" [union-attr]
src/swell/tasks/base/task_base.py:107: error: Argument 4 to "JediConfigRendering" has incompatible type "str | None"; expected "str" [arg-type]
src/swell/tasks/base/task_base.py:108: error: Argument 5 to "JediConfigRendering" has incompatible type "Datetime | None"; expected "str | None" [arg-type]
src/swell/tasks/base/task_base.py:112: error: Argument 2 to "Geos" has incompatible type "str | None"; expected "str" [arg-type]
src/swell/tasks/base/task_base.py:164: error: Incompatible return value type (got "str | None", expected "str") [return-value]
src/swell/tasks/base/task_base.py:194: error: Item "None" of "Datetime | None" has no attribute "string_directory" [union-attr]
src/swell/tasks/base/task_base.py:205: error: Argument 1 to "makedirs" has incompatible type "str | None"; expected "str | bytes | PathLike[str] | PathLike[bytes]" [arg-type]
src/swell/tasks/base/task_base.py:219: error: Argument 1 to "join" has incompatible type "str | None"; expected "str" [arg-type]
src/swell/tasks/base/task_base.py:221: error: Incompatible return value type (got "str | None", expected "str") [return-value]
src/swell/tasks/base/task_base.py:227: error: Item "None" of "Datetime | None" has no attribute "dto" [union-attr]
src/swell/tasks/base/task_base.py:233: error: Item "None" of "Datetime | None" has no attribute "string_iso" [union-attr]
src/swell/utilities/run_jedi_executables.py:12: error: Skipping analyzing "netCDF4": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/utilities/run_jedi_executables.py:88: error: Item "str" of "str | None" has no attribute "copy" [union-attr]
src/swell/utilities/run_jedi_executables.py:88: error: Item "None" of "str | None" has no attribute "copy" [union-attr]
src/swell/utilities/run_jedi_executables.py:91: error: Argument 1 to "check_obs" has incompatible type "None"; expected "str" [arg-type]
src/swell/utilities/run_jedi_executables.py:92: error: Argument 4 to "check_obs" has incompatible type "str | None"; expected "str" [arg-type]
src/swell/utilities/run_jedi_executables.py:97: error: Item "str" of "str | None" has no attribute "remove" [union-attr]
src/swell/utilities/run_jedi_executables.py:97: error: Item "None" of "str | None" has no attribute "remove" [union-attr]
src/swell/utilities/run_jedi_executables.py:101: error: Argument 1 to "render_interface_model" of "JediConfigRendering" has incompatible type "str | None"; expected "str" [arg-type]
src/swell/utilities/run_jedi_executables.py:129: error: Argument 2 to "run_track_log_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/tasks/store_background.py:12: error: Skipping analyzing "isodate": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/tasks/store_background.py:14: error: Cannot find implementation or library stub for module named "r2d2" [import-not-found]
src/swell/tasks/stage_jedi.py:77: error: Argument 1 to "get_file_handler" has incompatible type "dict[Any, Any]"; expected "list[Any]" [arg-type]
src/swell/tasks/run_geos_executable.py:26: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/run_geos_executable.py:31: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/run_geos_executable.py:32: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/run_geos_executable.py:36: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/run_geos_executable.py:83: error: Argument 2 to "run_track_log_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/tasks/prepare_analysis.py:11: error: Skipping analyzing "netCDF4": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/tasks/prepare_analysis.py:51: error: "str" has no attribute "hour" [attr-defined]
src/swell/tasks/prepare_analysis.py:51: error: "str" has no attribute "minute" [attr-defined]
src/swell/tasks/prepare_analysis.py:51: error: "str" has no attribute "second" [attr-defined]
src/swell/tasks/prepare_analysis.py:63: error: "object" has no attribute "strftime" [attr-defined]
src/swell/tasks/prepare_analysis.py:65: error: "object" has no attribute "strftime" [attr-defined]
src/swell/tasks/prepare_analysis.py:78: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prepare_analysis.py:81: error: "str" has no attribute "strftime" [attr-defined]
src/swell/tasks/prepare_analysis.py:133: error: Argument 2 to "run_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/tasks/prepare_analysis.py:142: error: Name "ana_path" is not defined [name-defined]
src/swell/tasks/prep_geos_run_dir.py:12: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/tasks/prep_geos_run_dir.py:69: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:70: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:75: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:76: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:95: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:96: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:98: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:114: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:118: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:123: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:133: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:156: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:173: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:174: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:190: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:195: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:233: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:234: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:303: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:338: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:429: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:434: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/prep_geos_run_dir.py:442: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/move_forecast_restart.py:70: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/move_forecast_restart.py:84: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/move_da_restart.py:79: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/move_da_restart.py:84: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/move_da_restart.py:91: error: "str" has no attribute "strftime" [attr-defined]
src/swell/tasks/move_da_restart.py:105: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/move_da_restart.py:120: error: "str" has no attribute "hour" [attr-defined]
src/swell/tasks/move_da_restart.py:120: error: "str" has no attribute "minute" [attr-defined]
src/swell/tasks/move_da_restart.py:120: error: "str" has no attribute "second" [attr-defined]
src/swell/tasks/move_da_restart.py:122: error: "str" has no attribute "strftime" [attr-defined]
src/swell/tasks/move_da_restart.py:130: error: "str" has no attribute "strftime" [attr-defined]
src/swell/tasks/link_geos_output.py:11: error: Skipping analyzing "netCDF4": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/tasks/link_geos_output.py:13: error: Cannot find implementation or library stub for module named "xarray" [import-not-found]
src/swell/tasks/link_geos_output.py:65: error: "object" has no attribute "strftime" [attr-defined]
src/swell/tasks/link_geos_output.py:80: error: "str" has no attribute "hour" [attr-defined]
src/swell/tasks/link_geos_output.py:80: error: "str" has no attribute "minute" [attr-defined]
src/swell/tasks/link_geos_output.py:80: error: "str" has no attribute "second" [attr-defined]
src/swell/tasks/link_geos_output.py:89: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/link_geos_output.py:92: error: "str" has no attribute "strftime" [attr-defined]
src/swell/tasks/gsi_ncdiag_to_ioda.py:18: error: Cannot find implementation or library stub for module named "pyiodaconv.gsi_ncdiag" [import-not-found]
src/swell/tasks/gsi_ncdiag_to_ioda.py:18: error: Cannot find implementation or library stub for module named "pyiodaconv" [import-not-found]
src/swell/tasks/gsi_ncdiag_to_ioda.py:19: error: Cannot find implementation or library stub for module named "pyiodaconv.combine_obsspace" [import-not-found]
src/swell/tasks/gsi_ncdiag_to_ioda.py:73: error: Need type annotation for "ioda_to_gsi_dict" (hint: "ioda_to_gsi_dict: dict[<type>, <type>] = ...") [var-annotated]
src/swell/tasks/gsi_ncdiag_to_ioda.py:95: error: Argument 1 to "strftime" of "date" has incompatible type "object"; expected "date" [arg-type]
src/swell/tasks/gsi_bc_to_ioda.py:14: error: Cannot find implementation or library stub for module named "generate_aircraft_bias_csv" [import-not-found]
src/swell/tasks/gsi_bc_to_ioda.py:112: error: Invalid index type "int | None" for "list[str]"; expected type "SupportsIndex" [index]
src/swell/tasks/gsi_bc_to_ioda.py:113: error: Invalid index type "int | None" for "list[str]"; expected type "SupportsIndex" [index]
src/swell/tasks/gsi_bc_to_ioda.py:144: error: Incompatible types in assignment (expression has type "list[str]", target has type "str") [assignment]
src/swell/tasks/gsi_bc_to_ioda.py:157: error: Incompatible types in assignment (expression has type "list[dict[str, Any]]", target has type "str") [assignment]
src/swell/tasks/gsi_bc_to_ioda.py:167: error: Argument 2 to "run_track_log_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/tasks/gsi_bc_to_ioda.py:185: error: Invalid index type "int | None" for "list[str]"; expected type "SupportsIndex" [index]
src/swell/tasks/gsi_bc_to_ioda.py:205: error: No overload variant of "join" matches argument types "str", "object" [call-overload]
src/swell/tasks/gsi_bc_to_ioda.py:205: note: Possible overload variants:
src/swell/tasks/gsi_bc_to_ioda.py:205: note: def join(str, /, *paths: str) -> str
src/swell/tasks/gsi_bc_to_ioda.py:205: note: def join(str | PathLike[str], /, *paths: str | PathLike[str]) -> str
src/swell/tasks/gsi_bc_to_ioda.py:205: note: def join(bytes | PathLike[bytes], /, *paths: bytes | PathLike[bytes]) -> bytes
src/swell/tasks/get_observations.py:10: error: Skipping analyzing "isodate": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/tasks/get_observations.py:13: error: Skipping analyzing "netCDF4": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/tasks/get_observations.py:20: error: Cannot find implementation or library stub for module named "r2d2" [import-not-found]
src/swell/tasks/get_observations.py:125: error: Argument 3 to "create_obs_time_list" of "GetObservations" has incompatible type "str"; expected "datetime" [arg-type]
src/swell/tasks/get_observations.py:258: error: "object" has no attribute "__iter__"; maybe "__dir__" or "__str__"? (not iterable) [attr-defined]
src/swell/tasks/get_observations.py:281: error: Return value expected [return-value]
src/swell/tasks/get_observations.py:285: error: Return value expected [return-value]
src/swell/tasks/get_observations.py:289: error: Return value expected [return-value]
src/swell/tasks/get_observations.py:296: error: Return value expected [return-value]
src/swell/tasks/get_gsi_ncdiag.py:31: error: "object" has no attribute "strftime" [attr-defined]
src/swell/tasks/get_gsi_bc.py:12: error: Skipping analyzing "isodate": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/tasks/get_geovals.py:15: error: Cannot find implementation or library stub for module named "r2d2" [import-not-found]
src/swell/tasks/get_geos_restart.py:40: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/get_geos_restart.py:41: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/get_geos_restart.py:64: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/get_geos_restart.py:75: error: Argument 1 to "forecast_dir" of "taskBase" has incompatible type "str"; expected "list[Any]" [arg-type]
src/swell/tasks/get_geos_adas_background.py:48: error: Item "None" of "Match[str] | None" has no attribute "group" [union-attr]
src/swell/tasks/get_ensemble.py:36: error: "object" has no attribute "strftime" [attr-defined]
src/swell/tasks/get_background_geos_experiment.py:12: error: Skipping analyzing "isodate": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/tasks/get_background.py:14: error: Skipping analyzing "isodate": module is installed, but missing library stubs or py.typed marker [import-untyped]
src/swell/tasks/get_background.py:16: error: Cannot find implementation or library stub for module named "r2d2" [import-not-found]
src/swell/tasks/eva_jedi_log.py:12: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/tasks/eva_jedi_log.py:14: error: Cannot find implementation or library stub for module named "eva.eva_driver" [import-not-found]
src/swell/tasks/eva_increment.py:12: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/tasks/eva_increment.py:14: error: Cannot find implementation or library stub for module named "eva.eva_driver" [import-not-found]
src/swell/tasks/eva_increment.py:45: error: "object" has no attribute "strftime" [attr-defined]
src/swell/tasks/eva_increment.py:48: error: "str" has no attribute "strftime" [attr-defined]
src/swell/tasks/eva_increment.py:64: error: "object" has no attribute "strftime" [attr-defined]
src/swell/tasks/clone_jedi.py:13: error: Cannot find implementation or library stub for module named "jedi_bundle.bin.jedi_bundle" [import-not-found]
src/swell/tasks/clone_jedi.py:34: error: Unpacking a string is disallowed [misc]
src/swell/tasks/clone_jedi.py:41: error: Cannot determine type of "jedi_bundle_source_path" [has-type]
src/swell/tasks/clone_jedi.py:61: error: Cannot determine type of "jedi_bundle_source_path" [has-type]
src/swell/tasks/clone_jedi.py:62: error: Cannot determine type of "jedi_bundle_build_path" [has-type]
src/swell/tasks/clone_geos.py:32: error: Unpacking a string is disallowed [misc]
src/swell/tasks/clone_geos.py:39: error: Cannot determine type of "geos_gcm_source_path" [has-type]
src/swell/tasks/clone_geos.py:59: error: Argument 2 to "run_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/tasks/clone_geos.py:64: error: Name "geos_build_method" is not defined [name-defined]
src/swell/tasks/build_jedi_by_linking.py:31: error: Unpacking a string is disallowed [misc]
src/swell/tasks/build_jedi_by_linking.py:53: error: Cannot determine type of "jedi_bundle_build_path" [has-type]
src/swell/tasks/build_jedi.py:13: error: Cannot find implementation or library stub for module named "jedi_bundle.bin.jedi_bundle" [import-not-found]
src/swell/tasks/build_jedi.py:32: error: Unpacking a string is disallowed [misc]
src/swell/tasks/build_jedi.py:54: error: Cannot determine type of "jedi_bundle_source_path" [has-type]
src/swell/tasks/build_jedi.py:55: error: Cannot determine type of "jedi_bundle_build_path" [has-type]
src/swell/tasks/build_geos_by_linking.py:31: error: Unpacking a string is disallowed [misc]
src/swell/tasks/build_geos_by_linking.py:53: error: Cannot determine type of "geos_gcm_build_path" [has-type]
src/swell/tasks/build_geos.py:32: error: Unpacking a string is disallowed [misc]
src/swell/tasks/build_geos.py:33: error: Cannot determine type of "geos_gcm_build_path" [has-type]
src/swell/tasks/build_geos.py:38: error: Name "jedi_build_method" is not defined [name-defined]
src/swell/tasks/build_geos.py:43: error: Cannot determine type of "geos_gcm_build_path" [has-type]
src/swell/tasks/build_geos.py:46: error: Cannot determine type of "geos_gcm_source_path" [has-type]
src/swell/tasks/build_geos.py:52: error: Cannot determine type of "geos_gcm_build_path" [has-type]
src/swell/tasks/build_geos.py:56: error: Cannot determine type of "geos_gcm_source_path" [has-type]
src/swell/test/code_tests/missing_obs_test.py:30: error: Argument 5 to "JediConfigRendering" has incompatible type "Datetime"; expected "str | None" [arg-type]
src/swell/test/code_tests/missing_obs_test.py:43: error: Argument 4 to "check_obs" has incompatible type "datetime"; expected "str" [arg-type]
src/swell/test/code_tests/missing_obs_test.py:51: error: Argument 4 to "check_obs" has incompatible type "datetime"; expected "str" [arg-type]
src/swell/test/code_tests/missing_obs_test.py:59: error: Argument 4 to "check_obs" has incompatible type "datetime"; expected "str" [arg-type]
src/swell/test/code_tests/missing_obs_test.py:67: error: Argument 4 to "check_obs" has incompatible type "datetime"; expected "str" [arg-type]
src/swell/test/code_tests/missing_obs_test.py:75: error: Argument 4 to "check_obs" has incompatible type "datetime"; expected "str" [arg-type]
src/swell/tasks/save_obs_diags.py:12: error: Cannot find implementation or library stub for module named "r2d2" [import-not-found]
src/swell/tasks/save_obs_diags.py:60: error: Argument 1 to "check_obs" has incompatible type "None"; expected "str" [arg-type]
src/swell/tasks/save_obs_diags.py:61: error: Argument 4 to "check_obs" has incompatible type "object"; expected "str" [arg-type]
src/swell/tasks/run_jedi_variational_executable.py:12: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/tasks/run_jedi_variational_executable.py:117: error: Argument 5 to "jedi_dictionary_iterator" has incompatible type "object"; expected "str | None" [arg-type]
src/swell/tasks/run_jedi_ufo_tests_executable.py:13: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/tasks/run_jedi_ufo_tests_executable.py:68: error: Argument 5 to "jedi_dictionary_iterator" has incompatible type "object"; expected "str | None" [arg-type]
src/swell/tasks/run_jedi_ufo_tests_executable.py:105: error: Incompatible types in assignment (expression has type "bool", target has type "str") [assignment]
src/swell/tasks/run_jedi_local_ensemble_da_executable.py:12: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/tasks/run_jedi_local_ensemble_da_executable.py:152: error: Argument 5 to "jedi_dictionary_iterator" has incompatible type "object"; expected "str | None" [arg-type]
src/swell/tasks/run_jedi_local_ensemble_da_executable.py:206: error: Unsupported operand types for + ("str" and overloaded function) [operator]
src/swell/tasks/run_jedi_local_ensemble_da_executable.py:210: error: Argument 4 to "run_executable" has incompatible type overloaded function; expected "str" [arg-type]
src/swell/tasks/run_jedi_hofx_executable.py:13: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/tasks/run_jedi_hofx_executable.py:119: error: Argument 5 to "jedi_dictionary_iterator" has incompatible type "object"; expected "str | None" [arg-type]
src/swell/tasks/run_jedi_hofx_executable.py:205: error: Argument 5 to "jedi_dictionary_iterator" has incompatible type "object"; expected "str | None" [arg-type]
src/swell/tasks/run_jedi_ensemble_mean_variance.py:12: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/tasks/run_jedi_ensemble_mean_variance.py:91: error: Argument 5 to "jedi_dictionary_iterator" has incompatible type "object"; expected "str | None" [arg-type]
src/swell/tasks/run_jedi_convert_state_soca2cice_executable.py:12: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/tasks/generate_b_climatology.py:9: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/tasks/generate_b_climatology.py:104: error: Argument 2 to "run_track_log_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/tasks/generate_b_climatology.py:157: error: Argument 2 to "run_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/tasks/generate_b_climatology.py:215: error: Argument 2 to "run_track_log_subprocess" has incompatible type "list[str]"; expected "str" [arg-type]
src/swell/tasks/eva_observations.py:13: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/tasks/eva_observations.py:15: error: Cannot find implementation or library stub for module named "eva.eva_driver" [import-not-found]
src/swell/tasks/eva_observations.py:99: error: Argument 1 to "check_obs" has incompatible type "None"; expected "str" [arg-type]
src/swell/tasks/eva_observations.py:100: error: Argument 4 to "check_obs" has incompatible type "object"; expected "str" [arg-type]
src/swell/tasks/eva_observations.py:151: error: Incompatible types in assignment (expression has type "bool", target has type "str") [assignment]
src/swell/tasks/eva_observations.py:156: error: Incompatible types in assignment (expression has type "list[int]", target has type "str") [assignment]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:40: error: Incompatible types in assignment (expression has type "str | list[Any]", variable has type "str") [assignment]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:42: error: Incompatible types in assignment (expression has type "bool", variable has type "str") [assignment]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:64: error: Function "questionary.prompts.text.text" is not valid as a type [valid-type]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:64: note: Perhaps you need "Callable[...]" or a callback protocol?
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:65: error: questionary.text? not callable [misc]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:71: error: Function "questionary.prompts.text.text" is not valid as a type [valid-type]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:71: note: Perhaps you need "Callable[...]" or a callback protocol?
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:73: error: questionary.text? not callable [misc]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:86: error: Function "questionary.prompts.text.text" is not valid as a type [valid-type]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:86: note: Perhaps you need "Callable[...]" or a callback protocol?
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:89: error: questionary.text? not callable [misc]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:104: error: Function "questionary.prompts.text.text" is not valid as a type [valid-type]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:104: note: Perhaps you need "Callable[...]" or a callback protocol?
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:109: error: questionary.text? not callable [misc]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:119: error: Function "questionary.prompts.text.text" is not valid as a type [valid-type]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:119: note: Perhaps you need "Callable[...]" or a callback protocol?
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:122: error: questionary.text? not callable [misc]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:132: error: Function "questionary.prompts.text.text" is not valid as a type [valid-type]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:132: note: Perhaps you need "Callable[...]" or a callback protocol?
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:145: error: questionary.text? not callable [misc]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:156: error: Function "questionary.prompts.text.text" is not valid as a type [valid-type]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:156: note: Perhaps you need "Callable[...]" or a callback protocol?
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:183: error: questionary.text? not callable [misc]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:195: error: Function "questionary.prompts.text.text" is not valid as a type [valid-type]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:195: note: Perhaps you need "Callable[...]" or a callback protocol?
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:206: error: Incompatible types in assignment (expression has type "None", variable has type "str | list[Any]") [assignment]
src/swell/deployment/prepare_config_and_suite/question_and_answer_cli.py:208: error: questionary.text? not callable [misc]
src/swell/tasks/run_jedi_hofx_ensemble_executable.py:12: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/tasks/run_jedi_hofx_ensemble_executable.py:27: error: Signature of "execute" incompatible with supertype "RunJediHofxExecutable" [override]
src/swell/tasks/run_jedi_hofx_ensemble_executable.py:27: note: Superclass:
src/swell/tasks/run_jedi_hofx_ensemble_executable.py:27: note: def execute(self, ensemble_members: list[Any] | None = ...) -> None
src/swell/tasks/run_jedi_hofx_ensemble_executable.py:27: note: Subclass:
src/swell/tasks/run_jedi_hofx_ensemble_executable.py:27: note: def execute(self) -> None
src/swell/tasks/run_jedi_hofx_ensemble_executable.py:133: error: Argument 5 to "jedi_dictionary_iterator" has incompatible type "object"; expected "str | None" [arg-type]
src/swell/deployment/prepare_config_and_suite/prepare_config_and_suite.py:13: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/deployment/prepare_config_and_suite/prepare_config_and_suite.py:69: error: Incompatible types in assignment (expression has type "GetAnswerDefaults", variable has type "GetAnswerCli") [assignment]
src/swell/deployment/prepare_config_and_suite/prepare_config_and_suite.py:73: error: Need type annotation for "experiment_dict" (hint: "experiment_dict: dict[<type>, <type>] = ...") [var-annotated]
src/swell/deployment/prepare_config_and_suite/prepare_config_and_suite.py:74: error: Need type annotation for "questions_dict" (hint: "questions_dict: dict[<type>, <type>] = ...") [var-annotated]
src/swell/deployment/create_experiment.py:16: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/deployment/create_experiment.py:63: error: Missing positional argument "slurm" in call to "prepare_config" [call-arg]
src/swell/deployment/create_experiment.py:212: error: Argument 1 to "copy_platform_files" has incompatible type "str"; expected "Logger" [arg-type]
src/swell/deployment/create_experiment.py:305: error: Value of type variable "AnyOrLiteralStr" of "split" cannot be "str | None" [type-var]
src/swell/deployment/create_experiment.py:417: error: Argument 4 to "dict_get" has incompatible type "list[Never]"; expected "str" [arg-type]
src/swell/deployment/create_experiment.py:425: error: Need type annotation for "cycle_times" (hint: "cycle_times: list[<type>] = ...") [var-annotated]
src/swell/test/suite_tests/suite_tests.py:2: error: Library stubs not installed for "yaml" [import-untyped]
src/swell/test/suite_tests/suite_tests.py:56: error: Argument 2 to "update_dict" has incompatible type "Path"; expected "dict[Any, Any]" [arg-type]
src/swell/test/suite_tests/suite_tests.py:80: error: Argument 6 to "create_experiment_directory" has incompatible type "None"; expected "str" [arg-type]
src/swell/swell.py:116: error: Argument 4 to "create_experiment_directory" has incompatible type "dict[Any, Any] | str | None"; expected "str" [arg-type]
src/swell/swell.py:151: error: Missing positional arguments "method", "platform", "override", "advanced", "slurm" in call to "create_experiment_directory" [call-arg]
src/swell/swell.py:204: error: Argument 4 to "task_wrapper" has incompatible type "str | None"; expected "str" [arg-type]
Found 318 errors in 69 files (checked 104 source files)
I've gone through the output of mypy and revised many of the more obvious mistypes I had, although there's still a lot of errors. A lot of them don't seem to necessarily be related to mistakes in type hinting, for instance it doesn't like any action being done on an optional parameter, although as far as I can tell most instances are valid per expected behavior. I feel like I've addressed most of the low-hanging fruit, but if you think I should go deeper, let me know |
Updated type hint to optional for consistency Co-authored-by: Alexey Shiklomanov <[email protected]>
Description
Adds type hinting for all python modules (#349)
SLES15 is now default platform (#407)
If specified in config and a valid location, appropriate tasks will now source from swell_static_files_user (#360)
Addressed a potential error when trying to abort in observing_system_records.py