Skip to content

Add Literal type hinting for if_row_exists arg - #85

Open
DeflateAwning wants to merge 1 commit into
ThibTrip:masterfrom
DeflateAwning:if_row_exists_literal_type
Open

Add Literal type hinting for if_row_exists arg#85
DeflateAwning wants to merge 1 commit into
ThibTrip:masterfrom
DeflateAwning:if_row_exists_literal_type

Conversation

@DeflateAwning

Copy link
Copy Markdown
Contributor

This change improves the type hinting within the library, and also in external uses.

Main change:

  • Find: if_row_exists: str
  • Replace with: if_row_exists: Literal['ignore', 'update']

Also added the appropriate from typing import ..., Literal

Main benefit: This change allows users to Ctrl+Space in their IDE to see options for that arg.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b91681f) 99.32% compared to head (fe22504) 99.32%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #85   +/-   ##
=======================================
  Coverage   99.32%   99.32%           
=======================================
  Files          26       26           
  Lines        1923     1923           
=======================================
  Hits         1910     1910           
  Misses         13       13           

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

@DeflateAwning

Copy link
Copy Markdown
Contributor Author

Can you please merge this? It's a very tiny change that would be much-appreciated in modern typed Python.

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.

2 participants