Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Conversation

Samyak2
Copy link
Contributor

@Samyak2 Samyak2 commented Apr 18, 2022

  • formatted kpi_view.py using black and isort
  • fixed some type errors
    • check the return value of request.get_json() is None before using it
    • variable may be unbound - moved initialization to the top. see ret = [].
  • fixed flake8 errors
    • ignored in cases where it cannot be prevented
  • fixed flake8 warnings:
    • some variables were unused - removed their assignment in case of functions with side effects and removed the entire line in case of functions without side effects (DataSource.get_by_id for example)
  • isort
    • many unused imports
    • imports position was wrong
    • flask imports require it to be imported from a specific submodule
  • added docstrings
  • replaced prints with logger

- formatted `kpi_view.py` using black and isort
- fixed some type errors
    - check the return value of `request.get_json()` is None before
      using it
    - variable may be unbound - moved initialization to the top. see
      `ret = []`.
- fixed flake8 errors
    - ignored in cases where it cannot be prevented
- fixed flake8 warnings:
    - some variables were unused - removed their assignment in case of
      functions with side effects and removed the entire line in case of
      functions without side effects (`DataSource.get_by_id` for example)
- isort
    - many unused imports
    - imports position was wrong
    - flask imports require it to be imported from a specific submodule
- added docstrings
- replaced prints with logger
@Samyak2 Samyak2 requested a review from manassolanki April 18, 2022 08:13
@netlify
Copy link

netlify bot commented Apr 18, 2022

Deploy Preview for frontend-sb canceled.

Name Link
🔨 Latest commit 6426ec2
🔍 Latest deploy log https://app.netlify.com/sites/frontend-sb/deploys/626b7222ab870f00094ddff6

When the error is on the client, the status code should be 400
@Samyak2 Samyak2 added this to the v0.7.0 milestone Apr 27, 2022
@Samyak2 Samyak2 mentioned this pull request Apr 27, 2022
@gitpod-io
Copy link

gitpod-io bot commented Apr 29, 2022

@Samyak2 Samyak2 requested a review from varunp2k April 29, 2022 05:05
Copy link
Member

@varunp2k varunp2k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@varunp2k varunp2k merged commit b6e8813 into develop May 3, 2022
@Samyak2 Samyak2 deleted the fix/kpi-view-fix-lints branch May 3, 2022 11:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants