Skip to content

Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.

Update pylint.yml

patcher9f34b82108611
diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml
index 03934062..a2d407eb 100644
--- a/.github/workflows/pylint.yml
+++ b/.github/workflows/pylint.yml
@@ -15,30 +15,17 @@ jobs:
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
+
- name: Check if version was updated in pyproject.toml
run: |
sudo apt-get install -y python3-tomli
- python3 -c "
- import tomli
- with open('sdk/python/pyproject.toml', 'rb') as f:
- data = tomli.load(f)
- print('Current branch pyproject.toml structure:', data)
- "
- current_version=$(python3 -c "
- import tomli
- with open('sdk/python/pyproject.toml', 'rb') as f:
- data = tomli.load(f)
- version = data.get('tool', {}).get('poetry', {}).get('version', 'Version not found')
- print(version)
- ")
- main_version=$(git show origin/main:sdk/python/pyproject.toml | python3 -c "
- import tomli
- import sys
- data = tomli.load(sys.stdin.buffer)
- print('Main branch pyproject.toml structure:', data)
- version = data.get('tool', {}).get('poetry', {}).get('version', 'Version not found')
- print(version)
- ")
+
+ echo "Checking current version in pyproject.toml"
+ python3 -c "import tomli; print(tomli.load(open('sdk/python/pyproject.toml', 'rb')))" || { echo "Failed to read pyproject.toml"; exit 1; }
+
+ current_version=$(python3 -c "import tomli; data=tomli.load(open('sdk/python/pyproject.toml', 'rb')); print(data.get('tool', {}).get('poetry', {}).get('version', 'Version not found'))")
+ main_version=$(git show origin/main:sdk/python/pyproject.toml | python3 -c "import tomli; import sys; data=tomli.load(sys.stdin.buffer); print(data.get('tool', {}).get('poetry', {}).get('version', 'Version not found'))")
+
echo "Current branch version: $current_version"
echo "Main branch version: $main_version"
@@ -46,7 +33,7 @@ jobs:
echo "Error: Could not find version in pyproject.toml." >&2
exit 1
fi
-
+
if [ "$current_version" = "$main_version" ]; then
echo "Version in pyproject.toml was not updated. Please update the version." >&2
exit 1