From 23ffd06e34504bdd6f46d8d08756fe3f93cbe92b Mon Sep 17 00:00:00 2001 From: Jan <20126033+JanLJL@users.noreply.github.com> Date: Thu, 7 Apr 2022 12:12:33 +0200 Subject: [PATCH 1/3] Update lint.yml --- .github/workflows/lint.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 247eea3..1592981 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,11 +14,16 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: 3.9 - name: Install Python dependencies run: python -m pip install black flake8 + - name: Black solo + uses: psf/black@stable + with: + options: "--check --verbose --diff --color -l 99" + - name: Run linters uses: wearerequired/lint-action@v1 with: From 93c0753db362322237f2dc22ac84d0c7dd4c86e7 Mon Sep 17 00:00:00 2001 From: JanLJL Date: Thu, 7 Apr 2022 12:17:08 +0200 Subject: [PATCH 2/3] formatting --- osaca/db_interface.py | 2 +- osaca/parser/parser_AArch64.py | 2 +- osaca/semantics/hw_model.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osaca/db_interface.py b/osaca/db_interface.py index 09c352d..800289c 100755 --- a/osaca/db_interface.py +++ b/osaca/db_interface.py @@ -615,7 +615,7 @@ def _get_full_instruction_name(instruction_form): def __represent_none(self, data): """Get YAML None representation.""" - return self.represent_scalar(u"tag:yaml.org,2002:null", u"~") + return self.represent_scalar("tag:yaml.org,2002:null", "~") def _create_yaml_object(): diff --git a/osaca/parser/parser_AArch64.py b/osaca/parser/parser_AArch64.py index 3e80f83..4cf8c78 100755 --- a/osaca/parser/parser_AArch64.py +++ b/osaca/parser/parser_AArch64.py @@ -540,7 +540,7 @@ class ParserAArch64(BaseParser): exponent = int(ieee_val["exponent"], 10) if ieee_val["e_sign"] == "-": exponent *= -1 - return float(ieee_val["mantissa"]) * (10 ** exponent) + return float(ieee_val["mantissa"]) * (10**exponent) def parse_register(self, register_string): raise NotImplementedError diff --git a/osaca/semantics/hw_model.py b/osaca/semantics/hw_model.py index fc80a84..ef34761 100755 --- a/osaca/semantics/hw_model.py +++ b/osaca/semantics/hw_model.py @@ -811,4 +811,4 @@ class MachineModel(object): def __represent_none(self, yaml_obj, data): """YAML representation for `None`""" - return yaml_obj.represent_scalar(u"tag:yaml.org,2002:null", u"~") + return yaml_obj.represent_scalar("tag:yaml.org,2002:null", "~") From 3c5c516a6da8336ea7405723850c59a096071ed6 Mon Sep 17 00:00:00 2001 From: JanLJL Date: Thu, 7 Apr 2022 12:18:57 +0200 Subject: [PATCH 3/3] removed solo black run --- .github/workflows/lint.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1592981..ae00040 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,17 +19,12 @@ jobs: - name: Install Python dependencies run: python -m pip install black flake8 - - name: Black solo - uses: psf/black@stable - with: - options: "--check --verbose --diff --color -l 99" - - name: Run linters uses: wearerequired/lint-action@v1 with: github_token: ${{ secrets.github_token }} # Enable linters black: true - black_args: "-l 99" + black_args: "-l 99 --diff --color" flake8: true flake8_args: "--max-line-length=99 --extend-ignore=E203,E501"