Skip to content

Commit

Permalink
.github/workflows/ci-backend.yml: fix flake8 config (#8676)
Browse files Browse the repository at this point in the history
  • Loading branch information
guidoiaquinti authored Feb 18, 2022
1 parent 8ffcce1 commit 61e8ffb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,11 @@ jobs:
black --check .
isort --check-only .
- name: Lint with flake8
- name: Check for errors and code style violations
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics
flake8 .
- name: Typecheck
- name: Check static typing
run: |
mypy .
Expand Down
4 changes: 2 additions & 2 deletions posthog/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def queryset_to_named_query(qs: QuerySet, prepend: str = "") -> Tuple[str, dict]
def get_instance_realm() -> str:
"""
Returns the realm for the current instance. `cloud` or 'demo' or `hosted-clickhouse`.
Historically this would also have returned `hosted` for hosted postgresql based installations
"""
if settings.MULTI_TENANCY:
Expand Down Expand Up @@ -810,7 +810,7 @@ def should_refresh(request: Request) -> bool:
key = "refresh"
return (request.query_params.get(key, "") or request.GET.get(key, "")).lower() == "true" or request.data.get(
key, False
) == True
) is True


def str_to_bool(value: Any) -> bool:
Expand Down

0 comments on commit 61e8ffb

Please sign in to comment.