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 config update #6589

Merged
merged 22 commits into from Dec 15, 2022
Merged

[MAINTENANCE] mypy config update #6589

merged 22 commits into from Dec 15, 2022

Conversation

Kilo59
Copy link
Member

@Kilo59 Kilo59 commented Dec 15, 2022

Changes proposed in this pull request:

Before

image

After

image

@netlify
Copy link

netlify bot commented Dec 15, 2022

Deploy Preview for niobium-lead-7998 ready!

Name Link
🔨 Latest commit d028e24
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/639b40452de01000093a4ab1
😎 Deploy Preview https://deploy-preview-6589--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.

@ghost
Copy link

ghost commented Dec 15, 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 requested review from cdkini and a team December 15, 2022 15:47
@Kilo59 Kilo59 marked this pull request as ready for review December 15, 2022 15:48
@@ -155,7 +168,6 @@ exclude = [
'rule_based_profiler/parameter_builder/value_set_multi_batch_parameter_builder\.py', # 2
'rule_based_profiler/parameter_container\.py', # 7
'rule_based_profiler/rule_based_profiler\.py', # 40
'tasks\.py', # Excluded from type checking the rest of the library, may be added in a separate step.
Copy link
Member Author

@Kilo59 Kilo59 Dec 15, 2022

Choose a reason for hiding this comment

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

@anthonyburdi why were we ignoring this file?
I'm not getting any errors in the CI.

We should opt to suppress the specific errors if they are unresolvable rather than ignore the whole file.

@@ -70,7 +84,6 @@ exclude = [
'core/usage_statistics/usage_statistics\.py', # 19
'core/usage_statistics/util\.py', # 2
'core/util\.py', # 18
'docs/', # Docs should not be type checked with the rest of the library.
Copy link
Member Author

Choose a reason for hiding this comment

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

@anthonyburdi
I moved this to the ALWAYS exclude section and tried to make be visible.

@Kilo59 Kilo59 enabled auto-merge (squash) December 15, 2022 15:54
Comment on lines +32 to +37
disable_error_code = [
# annotation-unchecked are 'warning notes', not errors and won't cause mypy to fail
# but it does create a lot of noise in the CI mypy step.
# https://mypy-lang.blogspot.com/2022/11/mypy-0990-released.html
'annotation-unchecked'
]
Copy link
Member Author

@Kilo59 Kilo59 Dec 15, 2022

Choose a reason for hiding this comment

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

Just want to call out that I am globally disabling this "error" code, which we should generally never do.

But in this case, this "error" code doesn't actually result in an error anyways, so it wouldn't actually prevent any bugs without an additional configuration setting like check-untyped-defs
See the recent mypy release post section titled Warn about Variable Annotations in Unchecked Functions for these details.

If anyone has an issue with this let's discuss it.

Also, I initially turned on check-untyped-defs with the idea that if the number of errors was low, I would just fix them but... I ended up getting about 200 new errors 😬 .
I do think we should revisit this once we have better coverage of our existing "typed defs".

@Kilo59 Kilo59 requested a review from dctalbot December 15, 2022 16:28
Copy link
Contributor

@billdirks billdirks left a comment

Choose a reason for hiding this comment

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

LGTM!

@Kilo59 Kilo59 merged commit 86cb443 into develop Dec 15, 2022
@Kilo59 Kilo59 deleted the m/none/mypy-config-update branch December 15, 2022 17:00
Shinnnyshinshin pushed a commit that referenced this pull request Dec 16, 2022
* develop:
  [FEATURE] Ensure `result_format` accessed is through Checkpoint, and warns users if `Expectation` or `Validator`-level (#6562)
  [BUGFIX] Remove rendered header from Cloud-rendering tests (#6597)
  [MAINTENANCE] Refactor `BaseDataContext` and `DataContext` into factory functions (#6531)
  [MAINTENANCE] Utilize a `StrEnum` for `ConfigPeer` modes (#6596)
  [BUGFIX] Use v3.3.6 or higher of google-cloud-bigquery (with shapely bugfix) (#6590)
  [MAINTENANCE] Add docs snippet checker to `dev` CI (#6594)
  [MAINTENANCE] Leverage `RendererConfiguration` in existing prescriptive templates (3 of 3) (#6530)
  [BUGFIX] Support non-string `datetime` evaluation parameters (#6571)
  [RELEASE] 0.15.41 (#6593)
  [FEATURE] ZEP - PG `BatchSorter` loading + dumping (#6580)
  [MAINTENANCE] Leverage `RendererConfiguration` in existing prescriptive templates (2 of 3) (#6488)
  [MAINTENANCE] Remove `ExplorerDataContext` (#6592)
  [MAINTENANCE] Small refactor of ExecutionEngine.resolve_metrics() for better code readability (and miscellaneous additional clean up) (#6587)
  [MAINTENANCE] `mypy` config update (#6589)
  [BUGFIX] convert_to_json_serializable does not accept numpy datetime (#6553)
  [BUGFIX] Return unique list of batch_definitions (#6579)
  [MAINTENANCE] typo in method name (#6585)
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.

None yet

2 participants