Skip to content

Commit

Permalink
Remove sourcery
Browse files Browse the repository at this point in the history
  • Loading branch information
avgupta456 committed Nov 13, 2023
1 parent 215b7da commit 7829a73
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 98 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ jobs:
cd backend
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Sourcery lint
run: |
cd backend
pip install sourcery-cli
sourcery login --token ${{ secrets.SOURCERY_TOKEN }}
sourcery review --check .
env:
sourcery_token: ${{ secrets.SOURCERY_TOKEN }}
- name: Test with unittest
run: |
cd backend
Expand Down
70 changes: 0 additions & 70 deletions backend/.sourcery.yaml

This file was deleted.

15 changes: 1 addition & 14 deletions backend/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ flake8 = "^6.1.0"
isort = "^5.12.0"
pre-commit = "^3.5.0"
pyinstrument = "^4.6.1"
sourcery-cli = "^1.14.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
2 changes: 1 addition & 1 deletion backend/src/data/mongo/user_months/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

async def get_user_months(
user_id: str, private_access: bool, start_month: date, end_month: date
) -> List[UserMonth]: # sourcery skip: de-morgan, use-contextlib-suppress
) -> List[UserMonth]:
start = datetime(start_month.year, start_month.month, 1)
end = datetime(end_month.year, end_month.month, 28)
today = datetime.now()
Expand Down
1 change: 0 additions & 1 deletion backend/src/publisher/aggregation/user/commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def get_top_languages(
def get_top_repos(
data: UserPackage, loc_metric: str, include_private: bool, group: str
) -> Tuple[List[RepoStats], int]:
# sourcery skip: switch
repos: List[Any] = [
{
"repo": repo,
Expand Down
1 change: 0 additions & 1 deletion backend/src/publisher/render/top_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def get_top_repos_svg(
use_animation: bool,
theme: str,
) -> Drawing:
# sourcery skip: simplify-len-comparison
header = "Most Contributed Repositories"
subheader = time_str
subheader += " | " + ("LOC Changed" if loc_metric == "changed" else "LOC Added")
Expand Down
1 change: 0 additions & 1 deletion backend/src/subscriber/aggregation/user/languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def get_commit_languages(
files: Optional[List[RawCommitFile]],
repo: RawRepo,
) -> CommitLanguages:
# sourcery skip: extract-method
out = CommitLanguages()

if commit is None:
Expand Down
1 change: 0 additions & 1 deletion backend/src/subscriber/processing/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ async def check_user_starred_repo(

@alru_cache(ttl=timedelta(hours=1))
async def get_is_valid_user(user_id: str) -> str:
# sourcery skip: assign-if-exp, reintroduce-else, swap-if-expression
if user_id in USER_WHITELIST:
return (True, "Valid user") # type: ignore

Expand Down

0 comments on commit 7829a73

Please sign in to comment.