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

chore(internal): enable lint rule #9

Merged
merged 1 commit into from
Oct 14, 2023
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
14 changes: 0 additions & 14 deletions .github/workflows/create-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,3 @@ jobs:
with:
repo: ${{ github.event.repository.full_name }}
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}

- name: Set up Python
if: ${{ steps.release.outputs.releases_created }}
uses: actions/setup-python@v4
with:
python-version: '3.7'

- name: Publish to PyPI
if: ${{ steps.release.outputs.releases_created }}
run: |
pipx install poetry
bash ./bin/publish-pypi
env:
PYPI_TOKEN: ${{ secrets.ANTHROPIC_BEDROCK_PYPI_TOKEN }}
25 changes: 0 additions & 25 deletions .github/workflows/publish-pypi.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ jobs:
bash ./bin/check-release-environment
env:
STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }}
PYPI_TOKEN: ${{ secrets.ANTHROPIC_BEDROCK_PYPI_TOKEN }}
4 changes: 0 additions & 4 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ if [ -z "${STAINLESS_API_KEY}" ]; then
errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organisation secrets on GitHub.")
fi

if [ -z "${PYPI_TOKEN}" ]; then
errors+=("The ANTHROPIC_BEDROCK_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organisation secrets.")
fi

len=${#errors[@]}

if [[ len -gt 0 ]]; then
Expand Down
3 changes: 0 additions & 3 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@
"hidden": true
}
],
"reviewers": [
"@anthropics/sdk"
],
"release-type": "python",
"extra-files": [
"src/anthropic_bedrock/_version.py"
Expand Down
12 changes: 12 additions & 0 deletions src/anthropic_bedrock/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,20 @@ def __init__(

This automatically infers the `aws_region` argument from the `AWS_REGION` environment variable if it is not provided.
"""
if aws_secret_key is None:
aws_secret_key = None
self.aws_secret_key = aws_secret_key

if aws_access_key is None:
aws_access_key = None
self.aws_access_key = aws_access_key

if aws_region is None:
aws_region = os.environ.get("AWS_REGION") or "us-east-1"
self.aws_region = aws_region

if aws_session_token is None:
aws_session_token = None
self.aws_session_token = aws_session_token

if base_url is None:
Expand Down Expand Up @@ -285,14 +291,20 @@ def __init__(

This automatically infers the `aws_region` argument from the `AWS_REGION` environment variable if it is not provided.
"""
if aws_secret_key is None:
aws_secret_key = None
self.aws_secret_key = aws_secret_key

if aws_access_key is None:
aws_access_key = None
self.aws_access_key = aws_access_key

if aws_region is None:
aws_region = os.environ.get("AWS_REGION") or "us-east-1"
self.aws_region = aws_region

if aws_session_token is None:
aws_session_token = None
self.aws_session_token = aws_session_token

if base_url is None:
Expand Down