Skip to content

Commit

Permalink
Update Pyright CI action (#169)
Browse files Browse the repository at this point in the history
* Update Pyright CI action

* Stop rewriting names

It has weird side-effects as observed in svcs. Also Pyright is more vehement now.
  • Loading branch information
hynek committed Jan 26, 2024
1 parent e7d12b6 commit e5c1812
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: hynek/build-and-inspect-python-package@v2

tests:
name: Tests & Mypy on ${{ matrix.python-version }}
name: Tests & Mypy API on ${{ matrix.python-version }}
runs-on: ubuntu-latest
needs: build-package
strategy:
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
if: ${{ failure() }}

system-package:
name: Install & test with system package of Argon2.
name: Install & test with system package of Argon2
runs-on: ubuntu-latest
needs: build-package

Expand All @@ -156,7 +156,7 @@ jobs:
- run: python -Im tox run -e system-argon2

mypy-pkg:
name: Type-check code base
name: Mypy Codebase
runs-on: ubuntu-latest
needs: build-package
steps:
Expand All @@ -175,7 +175,7 @@ jobs:
- run: python -Im tox run -e mypy-pkg

pyright:
name: Check code base & API w/ Pyright
name: Pyright Codebase
runs-on: ubuntu-latest
needs: build-package

Expand All @@ -195,7 +195,7 @@ jobs:
python -Im venv .venv
.venv/bin/python -Im pip install .[typing]
echo "$PWD/.venv/bin" >> $GITHUB_PATH
- uses: jakebailey/pyright-action@v1
- uses: jakebailey/pyright-action@v2

docs:
name: Build docs & run doctests
Expand Down Expand Up @@ -238,8 +238,8 @@ jobs:
python -Im pip install -e .[dev]
python -Im argon2 -n 1 -t 1 -m 8 -p 1
# Ensure everything required is passing for branch protection.
required-checks-pass:
name: Ensure everything required is passing for branch protection
if: always()

needs:
Expand Down
9 changes: 0 additions & 9 deletions src/argon2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,3 @@ def __getattr__(name: str) -> str:
return meta["Author-email"].split("<", 1)[1].rstrip(">")

return meta[dunder_to_metadata[name]]


# Make nicer public names.
__locals = locals()
for __name in __all__:
if not __name.startswith(("__", "DEFAULT_")) and not __name.islower():
__locals[__name].__module__ = "argon2"
del __locals
del __name # pyright: ignore[reportUnboundVariable]

0 comments on commit e5c1812

Please sign in to comment.