Skip to content

Commit

Permalink
fix(coderabbitai) fixing errors for coderabbitai 2
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasz8 committed Jan 30, 2024
1 parent f39f8df commit 47f1330
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ jobs:
pip install pipenv
pipenv install --dev
- name: Cache pipenv
uses: actions/cache@v3
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-pipenv-
- name: Run Super-Linter
uses: super-linter/super-linter/slim@v5
env:
Expand Down
16 changes: 8 additions & 8 deletions libs/aws/s3.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Union

import boto3

from typing import Union, Optional

from libs.config import get_config


Expand All @@ -12,12 +12,12 @@ class AwsS3Client:

def __init__(
self,
bucket_name: str = None,
aws_access_key_id: str = None,
aws_secret_access_key: str = None,
aws_region_name: str = None,
aws_session_token: str = None,
aws_endpoint_url: str = None,
bucket_name: Optional[str] = None,
aws_access_key_id: Optional[str] = None,
aws_secret_access_key: Optional[str] = None,
aws_region_name: Optional[str] = None,
aws_session_token: Optional[str] = None,
aws_endpoint_url: Optional[str] = None,
):
"""
:param bucket_name: The name of the bucket.
Expand Down
2 changes: 1 addition & 1 deletion libs/config/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def get_var(self, key, default: Any = None, throw_error: bool = False) -> Any:
envs_instance = None


def get_envs(args: Optional[Dict[str, Any]] = None) -> EnvironmentVariable:
def get_envs(args: Optional[Dict[str, Any]] = None) -> EnvironmentVariable: # type: ignore
"""
Get the envs instance. If it doesn't exist, create it.
Expand Down
6 changes: 3 additions & 3 deletions libs/db/mongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(
port: int,
database: str,
protocol: str = "mongodb",
collection: str = None, # type: ignore
collection: Optional[str] = None,
throw_error: bool = True,
) -> None:
connection_uri = (
Expand Down Expand Up @@ -73,7 +73,7 @@ def find_sorted_limit(
self,
query: Dict[str, Any],
sort: List[Tuple[str, int]],
limit: int,
limit: int, # type: ignore
projection: Optional[Dict[str, Any]] = None,
) -> List[Dict[str, Any]]:
return list(self._collection.find(query, projection).sort(sort).limit(limit))
Expand All @@ -83,7 +83,7 @@ def find_sorted_limit_skip(
query: Dict[str, Any],
sort: List[Tuple[str, int]],
limit: int,
skip: int,
skip: int, # type: ignore
projection: Optional[Dict[str, Any]] = None,
) -> List[Dict[str, Any]]:
return list(
Expand Down

0 comments on commit 47f1330

Please sign in to comment.