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

admin/adopy-mypy-type-checking #21

Merged
merged 3 commits into from
Nov 28, 2020
Merged

Conversation

evamaxfield
Copy link
Member

Pull request recommendations:

  • Name your pull request your-development-type/short-description. Ex: feature/read-tiff-files
  • Link to any relevant issue in the PR description. Ex: Resolves [Add builds for all platforms #12], adds tiff file format support

Resolves #18

  • Provide context of changes.

Adopts MyPy for type checking. While sometimes annoying, in the long run a good move to maintain the repo across multiple devs + PRs and such.

Note:
There are some changes in here that relate to mypy type checking, notably, the one that threw me off was mypy will try to use the same typing over the same variable at it's first initialization. Example:

def use_some_string(s: str) -> Any:
    ...

some_string = ["jack", "son"]
some_string = "".join(some_string)
use_some_string(some_string)

mypy will complain because I initialized some_string as List[str] but then later used it as a str. This should basically just teach me to use better naming conventions.

  • Provide relevant tests for your feature or bug fix.
  • Provide or update documentation for any feature added by your pull request.

Thanks for contributing!

@evamaxfield evamaxfield added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 28, 2020
@evamaxfield evamaxfield self-assigned this Nov 28, 2020
@codecov
Copy link

codecov bot commented Nov 28, 2020

Codecov Report

Merging #21 (f891ace) into main (5179e3b) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   98.67%   98.68%   +0.01%     
==========================================
  Files          17       17              
  Lines         454      458       +4     
==========================================
+ Hits          448      452       +4     
  Misses          6        6              
Impacted Files Coverage Δ
cdp_backend/database/exceptions.py 100.00% <100.00%> (ø)
cdp_backend/database/models.py 100.00% <100.00%> (ø)
cdp_backend/database/types.py 100.00% <100.00%> (ø)
cdp_backend/database/validators.py 100.00% <100.00%> (ø)
cdp_backend/infrastructure/cdp_stack.py 100.00% <100.00%> (ø)
cdp_backend/tests/database/test_models.py 96.77% <100.00%> (ø)
cdp_backend/tests/database/test_validators.py 100.00% <100.00%> (ø)
cdp_backend/tests/infrastructure/test_cdp_stack.py 96.15% <100.00%> (+0.15%) ⬆️
cdp_backend/tests/test_utils.py 75.00% <100.00%> (ø)
cdp_backend/tests/utils/test_file_utils.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5179e3b...f891ace. Read the comment docs.

Copy link

@pulumi pulumi bot left a comment

Choose a reason for hiding this comment

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

🍹 The Update (preview) for stack CouncilDataProjectServiceAccount/cdp-infrastructure/cdp-example was successful.

Resource Changes

    Name                                                                     Type                                   Operation
+   cdp-example-firestore-app                                                gcp:appengine/application:Application  create
+   matter_file-matter_ref_ASCENDING_name_ASCENDING                          gcp:firestore/index:Index              create
+   matter_status-matter_ref_ASCENDING_update_datetime_ASCENDING             gcp:firestore/index:Index              create
+   cdp-example-firestore-service                                            gcp:projects/service:Service           create
+   cdp-example-compute-service                                              gcp:projects/service:Service           create
+   transcript-session_ref_ASCENDING_created_DESCENDING                      gcp:firestore/index:Index              create
+   event-body_ref_ASCENDING_event_datetime_ASCENDING                        gcp:firestore/index:Index              create
+   event-body_ref_ASCENDING_event_datetime_DESCENDING                       gcp:firestore/index:Index              create
+   matter_status-matter_ref_ASCENDING_update_datetime_DESCENDING            gcp:firestore/index:Index              create
+   event_minutes_item-event_ref_ASCENDING_index_ASCENDING                   gcp:firestore/index:Index              create
+   event_minutes_item_file-event_minutes_item_ref_ASCENDING_name_ASCENDING  gcp:firestore/index:Index              create
+   transcript-session_ref_ASCENDING_confidence_DESCENDING                   gcp:firestore/index:Index              create
+   cdp-infrastructure-cdp-example                                           pulumi:pulumi:Stack                    create
+   cdp-example                                                              CDPStack                               create
+   cdp-example-speech-service                                               gcp:projects/service:Service           create
+   event_minutes_item-event_ref_ASCENDING_index_DESCENDING                  gcp:firestore/index:Index              create

@evamaxfield evamaxfield merged commit 5fc7dfb into main Nov 28, 2020
@evamaxfield evamaxfield deleted the admin/adopt-mypy-type-checking branch November 28, 2020 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt MyPy for type checking
1 participant