Skip to content

Allow ARC to use mockter as a TS guess adapter #784

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

alongd
Copy link
Member

@alongd alongd commented Apr 8, 2025

will be used for functional tests of ARC and T3
Tests added

@@ -238,7 +238,21 @@
Set the input_file_memory attribute.
"""
self.input_file_memory = self.job_memory_gb


def get_mock_xyz(self):

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns Note

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.

Copilot Autofix

AI 3 months ago

To fix the problem, we need to add an explicit return statement at the end of the get_mock_xyz function to handle cases where none of the conditions are met. This will ensure that the function always returns a value explicitly, making the code easier to read and understand.

  • Add an explicit return statement at the end of the get_mock_xyz function.
  • The return value should be None to maintain the existing functionality.
Suggested changeset 1
arc/job/adapters/mockter.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/arc/job/adapters/mockter.py b/arc/job/adapters/mockter.py
--- a/arc/job/adapters/mockter.py
+++ b/arc/job/adapters/mockter.py
@@ -254,3 +254,3 @@
             return str_to_xyz(ts_xyz_str)
-
+        return None
     def execute_incore(self):
EOF
@@ -254,3 +254,3 @@
return str_to_xyz(ts_xyz_str)

return None
def execute_incore(self):
Copilot is powered by AI and may make mistakes. Always verify output.
@alongd alongd changed the title Allo ARC to use mockter as a TS guess adapter Allow ARC to use mockter as a TS guess adapter Apr 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant