diff --git a/python/sdist/amici/sbml_import.py b/python/sdist/amici/sbml_import.py index d436531031..a26c6e7d4a 100644 --- a/python/sdist/amici/sbml_import.py +++ b/python/sdist/amici/sbml_import.py @@ -1839,7 +1839,8 @@ def _process_event_observables( f'Event observable {eo["name"]} uses `t` in ' "it's formula which is not the time variable. " "For the time variable, please use `time` " - "instead!" + "instead!", + stacklevel=1, ) # check for nesting of observables (unsupported) @@ -2158,7 +2159,8 @@ def _get_conservation_laws_demartino( "Conservation laws for non-constant species in " "combination with parameterized stoichiometric " "coefficients are not currently supported " - "and will be turned off." + "and will be turned off.", + stacklevel=1, ) return [] @@ -2235,7 +2237,8 @@ def _get_conservation_laws_rref( "Conservation laws for non-constant species in " "combination with parameterized stoichiometric " "coefficients are not currently supported " - "and will be turned off." + "and will be turned off.", + stacklevel=1, ) return [] @@ -3049,7 +3052,8 @@ def _non_const_conservation_laws_supported(sbml_model: sbml.Model) -> bool: warnings.warn( "Conservation laws for non-constant species in " "models with RateRules are currently not supported " - "and will be turned off." + "and will be turned off.", + stacklevel=1, ) return False @@ -3061,7 +3065,8 @@ def _non_const_conservation_laws_supported(sbml_model: sbml.Model) -> bool: warnings.warn( "Conservation laws for non-constant species in " "models with Species-AssignmentRules are currently not " - "supported and will be turned off." + "supported and will be turned off.", + stacklevel=1, ) return False diff --git a/python/sdist/amici/swig_wrappers.py b/python/sdist/amici/swig_wrappers.py index 3c4df44809..5762f50bec 100644 --- a/python/sdist/amici/swig_wrappers.py +++ b/python/sdist/amici/swig_wrappers.py @@ -78,7 +78,8 @@ def runAmiciSimulation( warnings.warn( "Adjoint sensitivity analysis for models with discontinuous right hand sides (events/piecewise functions) has not been thoroughly tested." "Sensitivities might be wrong. Tracked at https://github.com/AMICI-dev/AMICI/issues/18. " - "Adjoint sensitivity analysis may work if the location of the discontinuity is not parameter-dependent, but we still recommend testing accuracy of gradients." + "Adjoint sensitivity analysis may work if the location of the discontinuity is not parameter-dependent, but we still recommend testing accuracy of gradients.", + stacklevel=1, ) with _capture_cstdout(): @@ -119,7 +120,8 @@ def runAmiciSimulations( warnings.warn( "Adjoint sensitivity analysis for models with discontinuous right hand sides (events/piecewise functions) has not been thoroughly tested. " "Sensitivities might be wrong. Tracked at https://github.com/AMICI-dev/AMICI/issues/18. " - "Adjoint sensitivity analysis may work if the location of the discontinuity is not parameter-dependent, but we still recommend testing accuracy of gradients." + "Adjoint sensitivity analysis may work if the location of the discontinuity is not parameter-dependent, but we still recommend testing accuracy of gradients.", + stacklevel=1, ) with _capture_cstdout(): diff --git a/python/sdist/pyproject.toml b/python/sdist/pyproject.toml index 58d39d4ea7..7c903273b5 100644 --- a/python/sdist/pyproject.toml +++ b/python/sdist/pyproject.toml @@ -130,4 +130,5 @@ line-length = 79 extend-include = ["*.ipynb"] [tool.ruff.lint] +extend-select = ["B028"] ignore = ["E402", "F403", "F405", "E741"]