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

[MAINTENANCE] mypy typing for core/util.py #6617

Merged
merged 58 commits into from
Jan 3, 2023

Conversation

Shinnnyshinshin
Copy link
Contributor

@Shinnnyshinshin Shinnnyshinshin commented Dec 20, 2022

  • Typing for core/util.py
  • pyproject.toml has been updated

@netlify
Copy link

netlify bot commented Dec 20, 2022

Deploy Preview for niobium-lead-7998 ready!

Name Link
🔨 Latest commit 873f5ee
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/63b466d8635c860008718f47
😎 Deploy Preview https://deploy-preview-6617--niobium-lead-7998.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Shinnnyshinshin Shinnnyshinshin enabled auto-merge (squash) December 20, 2022 20:18
@ghost
Copy link

ghost commented Dec 20, 2022

👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@Kilo59 Kilo59 self-requested a review December 20, 2022 20:50
@Kilo59
Copy link
Contributor

Kilo59 commented Dec 20, 2022

We probably want to use a TypeVar and/or overload to help narrow the return types of the json conversion function.
When I have a chance I'll propose this change.

@Shinnnyshinshin
Copy link
Contributor Author

We probably want to use a TypeVar and/or overload to help narrow the return types of the json conversion function. When I have a chance I'll propose this change.

That would help a ton. Please let me know

@@ -162,7 +181,10 @@ def determine_progress_bar_method_by_environment() -> Callable:
return tqdm


def convert_to_json_serializable(data) -> dict: # noqa: C901 - complexity 28
JSONValues: TypeAlias = Union[dict, list, str, int, float, bool, None]
Copy link
Contributor

@Kilo59 Kilo59 Dec 20, 2022

Choose a reason for hiding this comment

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

We might want to consider something like this in a followup.
python/typing#182 (comment)

@Kilo59 Kilo59 requested a review from a team December 31, 2022 16:50
@Kilo59
Copy link
Contributor

Kilo59 commented Dec 31, 2022

This PR should fix the remaining issues

#6640

@Kilo59 Kilo59 requested a review from a team January 3, 2023 16:16
Copy link
Contributor

@Kilo59 Kilo59 left a comment

Choose a reason for hiding this comment

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

Bit of a self-review here 😄

@Shinnnyshinshin Shinnnyshinshin enabled auto-merge (squash) January 3, 2023 18:15
@Shinnnyshinshin
Copy link
Contributor Author

Thank you @Kilo59

@Shinnnyshinshin
Copy link
Contributor Author

Didn't realize automerge was left on 😓

@Shinnnyshinshin Shinnnyshinshin merged commit 813d175 into develop Jan 3, 2023
@Shinnnyshinshin Shinnnyshinshin deleted the m/great-1473/core-util-mypy branch January 3, 2023 18:25
Shinnnyshinshin pushed a commit that referenced this pull request Jan 3, 2023
* develop:
  [MAINTENANCE] Cleanup typing errors. (#6691)
  [FEATURE] Support to include ID/PK in validation result for each row - Spark (#6676)
  [MAINTENANCE] Get datetime tests working for trino/snowflake/spark in values_to_be_in_set (#6671)
  [MAINTENANCE] Update `get_context` return type (#6684)
  [MAINTENANCE] `mypy` typing for `core/util.py` (#6617)
  [MAINTENANCE] Misc updates to dev Azure pipeline (#6686)
  [MAINTENANCE] Clean up packaging & installation pipeline (#6687)
  [MAINTENANCE] Partial test linting (#6679)
  [MAINTENANCE] Clean up returns style and type hints in CardinalityChecker utility (#6677)
  [MAINTENANCE] Don't attempt any regex Expectation tests with snowflake (#6672)
jcampbell pushed a commit that referenced this pull request Jan 11, 2023
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Gabriel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants