Skip to content

Commit

Permalink
Merge pull request #707 from nathanchance/update-for-ruff-0.2.0
Browse files Browse the repository at this point in the history
Update for ruff 0.2.0
  • Loading branch information
nathanchance committed Feb 2, 2024
2 parents bf21dc4 + 165545a commit a188b9b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion generator/generate_tuxsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def emit_tuxsuite_yml(config, tree, llvm_version):
if build["git_repo"] == repo and \
build["git_ref"] == ref and \
build["llvm_version"] == llvm_version:
arch = build["ARCH"] if "ARCH" in build else "x86_64"
arch = build.get("ARCH", "x86_64")
if llvm_version == max_version:
toolchain = "clang-nightly"

Expand Down
4 changes: 2 additions & 2 deletions generator/generate_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def print_config(build):


def get_job_name(build):
job = "ARCH=" + (build["ARCH"] if "ARCH" in build else "x86_64")
job = "ARCH=" + build.get("ARCH", "x86_64")
# BOOT=1 is the default, only show if we have disabled it
if not build["boot"]:
job += " BOOT=0"
Expand Down Expand Up @@ -213,7 +213,7 @@ def get_steps(build, build_set):
"name": name,
"if": "${{ needs.check_cache.outputs.status != 'pass' }}",
"env": {
"ARCH": build["ARCH"] if "ARCH" in build else "x86_64",
"ARCH": build.get("ARCH", "x86_64"),
"LLVM_VERSION": build["llvm_version"],
"BOOT": int(build["boot"]),
"CONFIG": print_config(build),
Expand Down
10 changes: 6 additions & 4 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# https://beta.ruff.rs/docs/rules/
target-version = 'py38'
# Separate repo used as a submodule, ignore it
extend-exclude = ['boot-utils']

# https://docs.astral.sh/ruff/rules/
[lint]
select = [
'A', # flake8-builtins
'ARG', # flake8-unused-arguments
Expand All @@ -23,6 +28,3 @@ ignore = [
'PLR0915', # too-many-statements
'PLR2004', # magic-value-comparison
]
target-version = 'py38'
# Separate repo used as a submodule, ignore it
extend-exclude = ['boot-utils']

0 comments on commit a188b9b

Please sign in to comment.