Skip to content
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

Fix ruff failure #64

Merged
merged 3 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Need to clone everything to determine version from git.
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
Expand All @@ -41,12 +41,12 @@ jobs:
needs: [build_and_test]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
cache: "pip"
Expand All @@ -60,7 +60,7 @@ jobs:
run: |
python -m build --sdist

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: dist/*

Expand All @@ -86,13 +86,13 @@ jobs:
# with:
# platforms: arm64

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Need to clone everything to embed the versiona
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand All @@ -103,15 +103,15 @@ jobs:
- name: Build and create distribution
run: |
python -m cibuildwheel --output-dir dist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: dist/*

pipy_upload:
needs: [pypi_sdist_build, pypi_wheel_build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cmake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
cmake:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Need to clone everything to determine version from git.
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
4 changes: 2 additions & 2 deletions misc/makeHilbertLuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ def make_TR_algo3_lut(M):
for i, x in enumerate(algo2_lut):
if i % 8 == 0:
print("\n ", end="")
print(" 0x%02x" % x, end="," if i != len(algo2_lut) - 1 else "")
print(f" 0x{x:02x}", end="," if i != len(algo2_lut) - 1 else "")
print("\n}\n")
print("alignas(64) static uint8_t const HILBERT_INVERSE_LUT_3[256] = {", end="")
for i, x in enumerate(algo3_lut):
if i % 8 == 0:
print("\n ", end="")
print(" 0x%02x" % x, end="," if i != len(algo3_lut) - 1 else "")
print(f" 0x{x:02x}", end="," if i != len(algo3_lut) - 1 else "")
print("\n}\n")
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ exclude_lines = [
]

[tool.ruff]
line-length = 110
target-version = "py310"
exclude = [
"__init__.py",
]

[tool.ruff.lint]
ignore = [
"N802",
"N803",
Expand All @@ -107,7 +111,6 @@ ignore = [
"D200",
"D205",
]
line-length = 110
select = [
"E", # pycodestyle
"F", # pyflakes
Expand All @@ -116,13 +119,12 @@ select = [
"D", # pydocstyle
"UP", # pyupgrade
]
target-version = "py310"
extend-select = [
"RUF100", # Warn about unused noqa
]

[tool.ruff.pycodestyle]
[tool.ruff.lint.pycodestyle]
max-doc-length = 79

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
Loading