diff --git a/autosubmit/autosubmit.py b/autosubmit/autosubmit.py index 2d245ebed934322eaf534cf3d69981c30e4c9f87..1796337f0ead874952e14549332c320a60df4ac4 100644 --- a/autosubmit/autosubmit.py +++ b/autosubmit/autosubmit.py @@ -1785,7 +1785,7 @@ class Autosubmit: :param expid: a string with the experiment id :param job_list: a JobList object :param as_conf: a AutosubmitConfig object - :return: a experiment history object + :return: an experiment history object """ exp_history = None try: @@ -1875,7 +1875,7 @@ class Autosubmit: # Paramiko is the only way to communicate with the remote machines. Previously we had also Saga. submitter = Autosubmit._get_submitter(as_conf) submitter.load_platforms(as_conf) - # Tries to loads the job_list from disk, discarding any changes in running time ( if recovery ). + # Tries to load the job_list from disk, discarding any changes in running time ( if recovery ). # Could also load a backup from previous iteration. # The submit ready functions will cancel all job submitted if one submitted in that iteration had issues, so it should be safe to recover from a backup without losing job ids if recover: @@ -1932,7 +1932,7 @@ class Autosubmit: except IOError as e: raise AutosubmitError( "job_packages not found", 6016, str(e)) - # Check if the user wants to continuing using wrappers and loads the appropiate info. + # Check if the user wants to continue using wrappers and loads the appropiate info. if as_conf.experiment_data.get("WRAPPERS",None) is not None: os.chmod(os.path.join(BasicConfig.LOCAL_ROOT_DIR, expid, "pkl", "job_packages_" + expid + ".db"), 0o644) @@ -2113,8 +2113,8 @@ class Autosubmit: job_list.update_list(as_conf, submitter=submitter) job_list.save() # Submit jobs that are prepared to hold (if remote dependencies parameter are enabled) - # This currently is not used as SLURM not longer allow to jobs to adquire priority while in hold state. - # This only works for SLURM. ( Prepare status can not be achieve in other platforms ) + # This currently is not used as SLURM no longer allows to jobs to adquire priority while in hold state. + # This only works for SLURM. ( Prepare status can not be achieved in other platforms ) if as_conf.get_remote_dependencies() == "true" and len(job_list.get_prepared()) > 0: Autosubmit.submit_ready_jobs( as_conf, job_list, platforms_to_test, packages_persistence, hold=True) diff --git a/autosubmit/database/db_common.py b/autosubmit/database/db_common.py index 626cfa1e930ac0925862f4fff6829d7b7f15d576..9f93e04c5ee48c9378fc0f0751b1a3a87bf01b42 100644 --- a/autosubmit/database/db_common.py +++ b/autosubmit/database/db_common.py @@ -407,7 +407,6 @@ def _update_experiment_descrip_version(name, description=None, version=None): if row == 0: raise AutosubmitCritical( "Update on experiment {} failed.".format(name), 7005) - return False return True @@ -521,7 +520,6 @@ def _delete_experiment(experiment_id): except DbException as e: raise AutosubmitCritical( "Could not establish a connection to database", 7001, str(e)) - return False cursor.execute('DELETE FROM experiment ' 'WHERE name=:name', {'name': experiment_id}) row = cursor.fetchone() diff --git a/autosubmit/monitor/diagram.py b/autosubmit/monitor/diagram.py index 17fe9d789023807076621ebea404b4433ad19188..d2408f954b4d8317768ae8df0965e4407a1f45dc 100644 --- a/autosubmit/monitor/diagram.py +++ b/autosubmit/monitor/diagram.py @@ -48,7 +48,7 @@ def _seq(start, end, step): return itertools.islice(itertools.count(start, step), sample_count) def create_bar_diagram(experiment_id, jobs_list, general_stats, output_file, period_ini=None, period_fi=None, - queue_time_fixes=None): + queue_time_fixes=None) -> bool: # type: (str, List[Job], List[str], str, datetime, datetime, Dict[str, int]) -> None """ Creates a bar diagram of the statistics. diff --git a/autosubmit/platforms/paramiko_platform.py b/autosubmit/platforms/paramiko_platform.py index 916c95698db4c3af6389d159badd875850cc88ae..58582bc0b9e71963111afe547c5ef8ced1975ea9 100644 --- a/autosubmit/platforms/paramiko_platform.py +++ b/autosubmit/platforms/paramiko_platform.py @@ -199,7 +199,7 @@ class ParamikoPlatform(Platform): twofactor_nonpush = None for prompt_, _ in prompt_list: prompt = str(prompt_).strip().lower() - # str() used to to make sure that we're dealing with a string rather than a unicode string + # str() used to make sure that we're dealing with a string rather than a unicode string # strip() used to get rid of any padding spaces sent by the server if "password" in prompt: answers.append(self.pw) @@ -740,7 +740,7 @@ class ParamikoPlatform(Platform): if job.start_time is not None and str(job.wrapper_type).lower() == "none": wallclock = job.wallclock if job.wallclock == "00:00": - wallclock == job.platform.max_wallclock + wallclock = job.platform.max_wallclock if wallclock != "00:00" and wallclock != "00:00:00" and wallclock != "": if job.is_over_wallclock(job.start_time,wallclock): try: diff --git a/autosubmit/platforms/pjmplatform.py b/autosubmit/platforms/pjmplatform.py index 36b03d799a18e6cedd712a706b1e31becc583340..9014cd6a5b5544a490a1b1d7730672370da360bb 100644 --- a/autosubmit/platforms/pjmplatform.py +++ b/autosubmit/platforms/pjmplatform.py @@ -405,7 +405,7 @@ class PJMPlatform(ParamikoPlatform): # split(" ") is not enough reason = [x.split()[2] for x in output.splitlines() if x.split()[0] == str(job_id)] - # In case of duplicates.. we take the first one + # In case of duplicates we take the first one if len(reason) > 0: return reason[0] return reason