From 4035ed52be25dc91c0adbe3418928bf73c4773f4 Mon Sep 17 00:00:00 2001 From: wtfsck Date: Sat, 16 Mar 2024 20:51:04 +0100 Subject: [PATCH 1/2] pylint warnings --- .../Enums/Python/PythonEnumsGenerator.cs | 2 +- .../Intel/Generator/Misc/Python/PyiGen.cs | 2 ++ src/rust/iced-x86-py/src/iced_x86/__init__.py | 36 +++++++++---------- .../iced-x86-py/src/iced_x86/_iced_x86_py.pyi | 2 ++ 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/csharp/Intel/Generator/Enums/Python/PythonEnumsGenerator.cs b/src/csharp/Intel/Generator/Enums/Python/PythonEnumsGenerator.cs index 6058519e0..0d1d7fba2 100644 --- a/src/csharp/Intel/Generator/Enums/Python/PythonEnumsGenerator.cs +++ b/src/csharp/Intel/Generator/Enums/Python/PythonEnumsGenerator.cs @@ -270,7 +270,7 @@ public override void GenerateEnd() { writer.WriteLine(); writer.WriteLine("import typing"); foreach (var cls in exportedClasses.Where(x => x.kind != DocClassKind.Enum)) - writer.WriteLine($"from ._iced_x86_py import {cls.name}"); + writer.WriteLine($"from ._iced_x86_py import {cls.name} # pylint: disable=import-self"); foreach (var cls in exportedClasses.Where(x => x.kind == DocClassKind.Enum)) writer.WriteLine($"from . import {cls.name}"); writer.WriteLine(); diff --git a/src/csharp/Intel/Generator/Misc/Python/PyiGen.cs b/src/csharp/Intel/Generator/Misc/Python/PyiGen.cs index bb4061668..cd2aef12d 100644 --- a/src/csharp/Intel/Generator/Misc/Python/PyiGen.cs +++ b/src/csharp/Intel/Generator/Misc/Python/PyiGen.cs @@ -94,6 +94,8 @@ void WritePyi(List classes) { var filename = genTypes.Dirs.GetPythonPyFilename("_iced_x86_py.pyi"); using (var writer = new FileWriter(TargetLanguage.Python, FileUtils.OpenWrite(filename))) { writer.WriteFileHeader(); + writer.WriteLine("# pylint: skip-file"); + writer.WriteLine(); writer.WriteLine("from collections.abc import Iterator"); writer.WriteLine("from enum import IntEnum, IntFlag"); writer.WriteLine("from typing import Any, List, Optional, Union"); diff --git a/src/rust/iced-x86-py/src/iced_x86/__init__.py b/src/rust/iced-x86-py/src/iced_x86/__init__.py index 80de409d3..32bc18994 100644 --- a/src/rust/iced-x86-py/src/iced_x86/__init__.py +++ b/src/rust/iced-x86-py/src/iced_x86/__init__.py @@ -12,24 +12,24 @@ """ import typing -from ._iced_x86_py import BlockEncoder -from ._iced_x86_py import ConstantOffsets -from ._iced_x86_py import Decoder -from ._iced_x86_py import Encoder -from ._iced_x86_py import FastFormatter -from ._iced_x86_py import Formatter -from ._iced_x86_py import FpuStackIncrementInfo -from ._iced_x86_py import Instruction -from ._iced_x86_py import InstructionInfo -from ._iced_x86_py import InstructionInfoFactory -from ._iced_x86_py import MemoryOperand -from ._iced_x86_py import MemorySizeExt -from ._iced_x86_py import MemorySizeInfo -from ._iced_x86_py import OpCodeInfo -from ._iced_x86_py import RegisterExt -from ._iced_x86_py import RegisterInfo -from ._iced_x86_py import UsedMemory -from ._iced_x86_py import UsedRegister +from ._iced_x86_py import BlockEncoder # pylint: disable=import-self +from ._iced_x86_py import ConstantOffsets # pylint: disable=import-self +from ._iced_x86_py import Decoder # pylint: disable=import-self +from ._iced_x86_py import Encoder # pylint: disable=import-self +from ._iced_x86_py import FastFormatter # pylint: disable=import-self +from ._iced_x86_py import Formatter # pylint: disable=import-self +from ._iced_x86_py import FpuStackIncrementInfo # pylint: disable=import-self +from ._iced_x86_py import Instruction # pylint: disable=import-self +from ._iced_x86_py import InstructionInfo # pylint: disable=import-self +from ._iced_x86_py import InstructionInfoFactory # pylint: disable=import-self +from ._iced_x86_py import MemoryOperand # pylint: disable=import-self +from ._iced_x86_py import MemorySizeExt # pylint: disable=import-self +from ._iced_x86_py import MemorySizeInfo # pylint: disable=import-self +from ._iced_x86_py import OpCodeInfo # pylint: disable=import-self +from ._iced_x86_py import RegisterExt # pylint: disable=import-self +from ._iced_x86_py import RegisterInfo # pylint: disable=import-self +from ._iced_x86_py import UsedMemory # pylint: disable=import-self +from ._iced_x86_py import UsedRegister # pylint: disable=import-self from . import CC_a from . import CC_ae from . import CC_b diff --git a/src/rust/iced-x86-py/src/iced_x86/_iced_x86_py.pyi b/src/rust/iced-x86-py/src/iced_x86/_iced_x86_py.pyi index 2cffc62b5..20b7a5a7f 100644 --- a/src/rust/iced-x86-py/src/iced_x86/_iced_x86_py.pyi +++ b/src/rust/iced-x86-py/src/iced_x86/_iced_x86_py.pyi @@ -3,6 +3,8 @@ # ⚠️This file was generated by GENERATOR!🦹‍♂️ +# pylint: skip-file + from collections.abc import Iterator from enum import IntEnum, IntFlag from typing import Any, List, Optional, Union From e9f9caa0fdce32362bd956ac51d04f7726eb71a4 Mon Sep 17 00:00:00 2001 From: wtfsck Date: Sat, 16 Mar 2024 20:52:12 +0100 Subject: [PATCH 2/2] Bump deps Closes #532 Closes #533 --- src/csharp/Intel/Iced.UnitTests/Iced.UnitTests.csproj | 2 +- src/java/iced-x86/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/csharp/Intel/Iced.UnitTests/Iced.UnitTests.csproj b/src/csharp/Intel/Iced.UnitTests/Iced.UnitTests.csproj index 91764384c..64295f739 100644 --- a/src/csharp/Intel/Iced.UnitTests/Iced.UnitTests.csproj +++ b/src/csharp/Intel/Iced.UnitTests/Iced.UnitTests.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/java/iced-x86/pom.xml b/src/java/iced-x86/pom.xml index 6353ee256..bfb13e3ec 100644 --- a/src/java/iced-x86/pom.xml +++ b/src/java/iced-x86/pom.xml @@ -151,7 +151,7 @@ maven-gpg-plugin - 3.1.0 + 3.2.0 sign-artifacts