uranusjr commented on code in PR #28627:
URL: https://github.com/apache/airflow/pull/28627#discussion_r1058744792


##########
airflow/cli/commands/info_command.py:
##########
@@ -155,12 +156,16 @@ class Architecture:
     ARM = "arm"
 
     @staticmethod
-    def get_current():
+    def get_current() -> Architecture:
         """Get architecture."""
-        return _MACHINE_TO_ARCHITECTURE.get(platform.machine().lower())
+        current_architecture = 
_MACHINE_TO_ARCHITECTURE.get(platform.machine().lower())
+        if current_architecture:
+            return current_architecture
+        else:
+            raise RuntimeError(f"Unknown architecture for machine: 
{platform.machine()}")

Review Comment:
   Some `get_current` usages has built-in handling of the `None` case here, do 
we want to continue to allow that?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to