diff options
author | Tim Hutt <timothy.hutt@codasip.com> | 2024-11-05 14:32:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-05 06:32:12 -0800 |
commit | 359a94356dba415cbd945e56126a326c59878e56 (patch) | |
tree | a1cbe073146a64c049db60f615acf6e1c2a94ad8 /parse.py | |
parent | 6bb00f9056db133a1bea48d2377316f49fb187df (diff) | |
download | riscv-opcodes-359a94356dba415cbd945e56126a326c59878e56.zip riscv-opcodes-359a94356dba415cbd945e56126a326c59878e56.tar.gz riscv-opcodes-359a94356dba415cbd945e56126a326c59878e56.tar.bz2 |
Enable Pylint in CI and fix its errors (#311)
* Remove wildcard imports
Use explicit imports rather than wildcards. This is more maintainable.
* Enable Pylint in CI and fix its errors
The main fixes were:
* Specify encoding for all file opens. By default it depends on environment variables which is bad.
* Use `with` to open files. Otherwise they don't necessarily get closed.
There were also a few minor things like using `enumerate`, not using objects as default arguments, etc. In some cases I slightly refactored the code.
Diffstat (limited to 'parse.py')
-rwxr-xr-x | parse.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -44,7 +44,7 @@ def main(): instr_dict = create_inst_dict(extensions, include_pseudo) - with open("instr_dict.json", "w") as outfile: + with open("instr_dict.json", "w", encoding="utf-8") as outfile: json.dump(add_segmented_vls_insn(instr_dict), outfile, indent=2) instr_dict = collections.OrderedDict(sorted(instr_dict.items())) |