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] Enable SIM101 + SIM114 #9758

Merged
merged 17 commits into from Apr 15, 2024
Merged

[MAINTENANCE] Enable SIM101 + SIM114 #9758

merged 17 commits into from Apr 15, 2024

Conversation

Kilo59
Copy link
Member

@Kilo59 Kilo59 commented Apr 15, 2024

Copy link

netlify bot commented Apr 15, 2024

Deploy Preview for niobium-lead-7998 canceled.

Name Link
🔨 Latest commit 4999769
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/661d7cac1ce7b50008b269d7

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 82.70%. Comparing base (f293aa2) to head (4999769).

Files Patch % Lines
...ctations/data_context/store/tuple_store_backend.py 77.77% 2 Missing ⚠️
great_expectations/dataset/util.py 0.00% 1 Missing ⚠️
great_expectations/execution_engine/util.py 0.00% 1 Missing ⚠️
great_expectations/expectations/metrics/util.py 0.00% 1 Missing ⚠️
great_expectations/self_check/util.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9758      +/-   ##
===========================================
+ Coverage    82.69%   82.70%   +0.01%     
===========================================
  Files          512      512              
  Lines        46901    46885      -16     
===========================================
- Hits         38783    38778       -5     
+ Misses        8118     8107      -11     
Flag Coverage Δ
3.10 65.05% <70.37%> (+0.01%) ⬆️
3.11 65.05% <70.37%> (+0.01%) ⬆️
3.11 athena or clickhouse or openpyxl or pyarrow or project or sqlite or aws_creds 53.75% <59.25%> (+0.01%) ⬆️
3.11 aws_deps 48.85% <44.44%> (+0.01%) ⬆️
3.11 big 63.95% <48.14%> (+0.02%) ⬆️
3.11 databricks 48.05% <40.74%> (+0.02%) ⬆️
3.11 filesystem 63.74% <62.96%> (+0.02%) ⬆️
3.11 mssql 47.26% <14.81%> (+0.01%) ⬆️
3.11 mysql 47.31% <14.81%> (+0.01%) ⬆️
3.11 postgresql 54.04% <44.44%> (+0.02%) ⬆️
3.11 snowflake 48.57% <51.85%> (+0.01%) ⬆️
3.11 spark 60.44% <44.44%> (+0.02%) ⬆️
3.11 trino 53.67% <40.74%> (+0.02%) ⬆️
3.8 65.06% <70.37%> (+0.01%) ⬆️
3.8 athena or clickhouse or openpyxl or pyarrow or project or sqlite or aws_creds 53.76% <59.25%> (+0.01%) ⬆️
3.8 aws_deps 48.87% <44.44%> (+0.01%) ⬆️
3.8 big 63.96% <48.14%> (+0.02%) ⬆️
3.8 databricks 48.06% <40.74%> (+0.02%) ⬆️
3.8 filesystem 63.74% <62.96%> (+0.02%) ⬆️
3.8 mssql 47.24% <14.81%> (+0.01%) ⬆️
3.8 mysql 47.29% <14.81%> (+0.01%) ⬆️
3.8 postgresql 54.03% <44.44%> (+0.02%) ⬆️
3.8 snowflake 48.59% <51.85%> (+0.01%) ⬆️
3.8 spark 60.40% <44.44%> (+0.02%) ⬆️
3.8 trino 53.66% <40.74%> (+0.02%) ⬆️
3.9 65.06% <70.37%> (+0.01%) ⬆️
cloud 0.00% <0.00%> (ø)
docs-basic 54.31% <51.85%> (+0.01%) ⬆️
docs-creds-needed 54.88% <51.85%> (+0.01%) ⬆️
docs-spark 54.41% <51.85%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pyproject.toml Outdated
Comment on lines 333 to 349
# TODO: enable these a few at a time (ordered by number of violations)
"SIM103", # needless-bool
"SIM118", # in-dict-keys
"SIM108", # if-else-block-instead-of-if-exp
"SIM211", # if-expr-with-false-true
"SIM102", # collapsible-if
"SIM300", # yoda-conditions
"SIM105", # suppressible-exception
"SIM117", # multiple-with-statements
"SIM201", # negate-equal-op
"SIM110", # reimplemented-builtin
"SIM910", # dict-get-with-none-default
"SIM401", # if-else-block-instead-of-dict-get
"SIM115", # open-file-with-context-handler
"SIM202", # negate-not-equal-op
"SIM210", # if-expr-with-true-false
"SIM112", # uncapitalized-environment-variables
Copy link
Member Author

Choose a reason for hiding this comment

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

This ones still need to be enabled in followup PRs

@Kilo59 Kilo59 changed the title [MAINTENANCE] Enable flake8-simplify part 1 [MAINTENANCE] Enable SIM101 + SIM114 Apr 15, 2024
@Kilo59 Kilo59 marked this pull request as ready for review April 15, 2024 18:55
Copy link
Member

@anthonyburdi anthonyburdi left a comment

Choose a reason for hiding this comment

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

LGTM!
I think tests/test_definitions/test_expectations_v3_api.py could use some refactoring but I'm OK if that is not included here.

@@ -76,6 +76,14 @@ def __init__( # noqa: PLR0913
self.verify_that_key_to_filepath_operation_is_reversible()
self._fixed_length_key = True

@staticmethod
Copy link
Member

Choose a reason for hiding this comment

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

I'm ok if we remove the @staticmethod decorator or leave it. I don't have a strong argument either way.

Copy link
Member Author

@Kilo59 Kilo59 Apr 15, 2024

Choose a reason for hiding this comment

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

If it isn't relying on instance or class attributes I think it's better as a static method.

connection_string.account and connection_string.user and connection_string.password
):
)
if is_connection_string or has_min_connection_detail_values:
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@Kilo59 Kilo59 enabled auto-merge April 15, 2024 19:19
@Kilo59 Kilo59 added this pull request to the merge queue Apr 15, 2024
Merged via the queue into develop with commit ecf7a53 Apr 15, 2024
69 of 70 checks passed
@Kilo59 Kilo59 deleted the m/_/mob_sim_rules branch April 15, 2024 19:51
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