mirror of
https://github.com/openziti/zrok.git
synced 2025-03-30 17:16:05 +02:00
lint and re-arm the flake8 test
This commit is contained in:
parent
0851e3e560
commit
ef10caa21f
1
.flake8
1
.flake8
@ -1,6 +1,5 @@
|
||||
[flake8]
|
||||
max-line-length = 120
|
||||
exclude =
|
||||
./sdk/python/sdk/**,
|
||||
./build/**
|
||||
|
||||
|
4
.github/workflows/build-wheels.yml
vendored
4
.github/workflows/build-wheels.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
||||
needs: enforce_stable_semver
|
||||
defaults:
|
||||
run:
|
||||
working-directory: sdk/python/sdk/zrok
|
||||
working-directory: sdk/python/src
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@ -62,7 +62,7 @@ jobs:
|
||||
if: startsWith(matrix.spec.name, 'linux')
|
||||
with:
|
||||
name: zrok_sdk_${{ matrix.spec.target }}
|
||||
path: ${{ github.workspace }}/sdk/python/sdk/zrok/dist/*
|
||||
path: dist/*
|
||||
|
||||
publish-testpypi:
|
||||
runs-on: ubuntu-20.04
|
||||
|
7
.github/workflows/ci-build.yml
vendored
7
.github/workflows/ci-build.yml
vendored
@ -72,7 +72,7 @@ jobs:
|
||||
|
||||
- name: python lint
|
||||
shell: bash
|
||||
run: flake8 sdk/python/sdk/zrok
|
||||
run: flake8 sdk/python/src
|
||||
|
||||
- name: solve GOBIN
|
||||
id: solve_go_bin
|
||||
@ -91,6 +91,9 @@ jobs:
|
||||
pytest:
|
||||
|
||||
runs-on: ubuntu-24.04
|
||||
defaults:
|
||||
run:
|
||||
working-directory: sdk/python/src
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
||||
@ -105,7 +108,6 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
working-directory: sdk/python/src/
|
||||
run: |
|
||||
|
||||
set -o pipefail
|
||||
@ -118,7 +120,6 @@ jobs:
|
||||
|
||||
- name: Test with pytest
|
||||
shell: bash
|
||||
working-directory: sdk/python/src/
|
||||
run: |
|
||||
|
||||
set -o pipefail
|
||||
|
9
.gitignore
vendored
9
.gitignore
vendored
@ -16,8 +16,6 @@ node_modules/
|
||||
.docusaurus
|
||||
.cache-loader
|
||||
|
||||
sdk/python/sdk/build/
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
@ -39,6 +37,7 @@ yarn-error.log*
|
||||
sdk/nodejs/sdk/dist
|
||||
|
||||
# py module artifacts
|
||||
*.egg-info/
|
||||
__pycache__/
|
||||
.coverage
|
||||
/sdk/python/src/**/*.egg-info/
|
||||
/sdk/python/src/**/__pycache__/
|
||||
/.coverage
|
||||
/sdk/python/src/dist/
|
||||
|
@ -1,4 +1,3 @@
|
||||
from zrok import model
|
||||
from zrok_api.api import ShareApi
|
||||
from zrok.environment.root import Root
|
||||
from zrok_api.models.auth_user import AuthUser
|
||||
@ -85,6 +84,7 @@ def CreateShare(root: Root, request: model.ShareRequest) -> model.Share:
|
||||
# Parse the response body directly
|
||||
res_dict = json.loads(e.body)
|
||||
# Create a response object with the expected fields
|
||||
|
||||
class ShareResponse:
|
||||
def __init__(self, share_token, frontend_proxy_endpoints):
|
||||
self.share_token = share_token
|
||||
|
Loading…
Reference in New Issue
Block a user