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

Fix various pycharm warnings. #59

Merged
merged 1 commit into from
Mar 3, 2024
Merged

Fix various pycharm warnings. #59

merged 1 commit into from
Mar 3, 2024

Conversation

caarmen
Copy link
Owner

@caarmen caarmen commented Feb 15, 2024

  • Fix some type hints
  • Suppress warning about acessing _asdict() in sqlalchemy. It's documented.
  • Avoid using input as a variable/argument name, as it's a built-in symbol.
  • Define a method as @staticmethod if it doesn't need to access any class or instance fields.
  • Add missing await before a call of an async function. Fixed in Add tests for oauth flows during fitbit polling (and fix bug about missing await). #61
  • Convert str explicitly to ActivityZone enum instances, where enum instances are expected.

@caarmen caarmen force-pushed the top-activities branch 2 times, most recently from 242b64c to b2949c0 Compare February 25, 2024 23:10
Base automatically changed from top-activities to main March 2, 2024 21:12
@caarmen caarmen force-pushed the fix-pycharm-warnings branch from 1875171 to b57962e Compare March 2, 2024 21:39
from slackhealthbot.data.repositories import fitbitrepository


def repository_oauth_to_core_oauth(
Copy link
Owner Author

Choose a reason for hiding this comment

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

Will maybe refactor the archi (again 😅 🙄 ), and use domain models from use cases and repositories. That should hopefully mean fewer mapper classes to maintain.

@caarmen caarmen force-pushed the fix-pycharm-warnings branch 4 times, most recently from 297ff2f to 546e091 Compare March 2, 2024 23:36
* Fix some type hints
* Suppress warning about acessing `_asdict()` in sqlalchemy. It's [documented](https://docs.sqlalchemy.org/en/20/core/connections.html#sqlalchemy.engine.Row._asdict).
* Avoid using `input` as a variable/argument name, as it's a built-in symbol.
* Define a method as `@staticmethod` if it doesn't need to access any class or instance fields.
* Convert str explicitly to `ActivityZone` enum instances, where enum instances are expected.
@caarmen caarmen force-pushed the fix-pycharm-warnings branch from 546e091 to 374c552 Compare March 3, 2024 21:18
@caarmen caarmen marked this pull request as ready for review March 3, 2024 21:29
@caarmen caarmen changed the title WIP 🚧 : Fix various pycharm warnings. Fix various pycharm warnings. Mar 3, 2024
@caarmen caarmen merged commit fe2e079 into main Mar 3, 2024
2 checks passed
@caarmen caarmen deleted the fix-pycharm-warnings branch March 3, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant