-
Notifications
You must be signed in to change notification settings - Fork 53
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
tool: adhere to CI style checks #67
Conversation
@@ -1258,7 +1258,7 @@ def build_system( | |||
|
|||
final_cap_slot = cap_slot | |||
|
|||
## Minting in the address space |
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.
Will have to revert these kinds of changes since these comments are intentionally formatted as so.
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.
Seems that this is enforced and the style checker does not allow freedom in how you format comments so will have to keep these changes.
The style script managed to break the SDK, interesting. |
The style checker is now crashing, I am not sure why this is happening. The only thing I can think of is that it looks like the style checker uses Python 3.10 and Microkit uses Python 3.9. |
It should be working fine with python 3.9, but I have seen the style checker crashing before on some code (long time ago, I don't remember the details). |
The version of autopep8 that the CI uses is older so maybe it's a bug that has been fixed by autopep8 by now. I installed the latest version of autopep8 and that doesn't crash locally. I'll test the version in the container to see if I can at least reproduce the Ci failure locally. |
I was able to reproduce it:
|
Okay I used a newer version of diff --git a/tool/microkit/sysxml.py b/tool/microkit/sysxml.py
index 7bcf4ca..b231878 100644
--- a/tool/microkit/sysxml.py
+++ b/tool/microkit/sysxml.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
+import xml.etree.ElementTree as ET
from microkit.util import str_to_bool, UserError
from typing import Dict, Iterable, Optional, Set, Tuple
from dataclasses import dataclass
@@ -11,7 +12,6 @@ from pathlib import Path
# Force use of Python elementtree to avoid overloading
import sys
sys.modules['_elementtree'] = None # type: ignore
-import xml.etree.ElementTree as ET which will cause the tool to not compile/interpret because |
Does the newer version also want this diff or only the CI version? I could look into upgrading the CI version. |
I think it's some Python PEP8 rule probably. So different versions are also enforcing it. Not sure what to do since I'm not that familiar with this stuff. |
738919e
to
5bd1b8f
Compare
Signed-off-by: Ivan Velickovic <[email protected]>
5bd1b8f
to
ec92597
Compare
Sorted it out finally. |
Ran
seL4_tools/misc/style-all.sh
on the whole repository, so hopefully this is the last PR of this kind we have to make.