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

patcher9371c9ba64e47
diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml
index 176e213c..03934062 100644
--- a/.github/workflows/pylint.yml
+++ b/.github/workflows/pylint.yml
@@ -15,15 +15,38 @@ 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
- current_version=$(python3 -c "import tomli; print(tomli.load(open('sdk/python/pyproject.toml', 'rb'))['tool.poetry']['version'])")
- main_version=$(git show origin/main:sdk/python/pyproject.toml | python3 -c "import tomli; import sys; print(tomli.load(sys.stdin.buffer)['tool.poetry']['version'])")
+ 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 "Current branch version: $current_version"
echo "Main branch version: $main_version"
+ if [ "$current_version" = "Version not found" ] || [ "$main_version" = "Version not found" ]; then
+ 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