-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: sql static method #36410
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
Closed
erfannariman
wants to merge
42
commits into
pandas-dev:master
from
erfannariman:cln-sql-static-method
Closed
CLN: sql static method #36410
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
5bbddce
DEPR - 18262 - deprecate lookup
erfannariman 02b50ac
DEPR - 18262 - changes black
erfannariman ca8bf05
Add test for deprecation lookup
erfannariman dea45b9
Added deprecation to whatsnew
erfannariman 5f116ad
Add test for deprecation lookup
erfannariman 0c04e90
FIX - 18262 - add warnings to other tests
erfannariman 758468d
Merge remote-tracking branch 'upstream/master' into 18262-depr-lookup
erfannariman 7ac3b32
DOC - 18262 - added example to lookup values
erfannariman 2ab80cf
DOC - 18262 - point to example in depr
erfannariman 94a6c0f
FIX - 18262 - deprecation warning before summary
erfannariman a339131
FIX - 18262 - whitespaces after comma
erfannariman 269e4cc
FIX - 18262 - removed double line break
erfannariman 0c40d69
Fix variable in ipython
erfannariman 1ca23bc
18262 - removed linebreak
erfannariman 9681a3d
18262 - Fix merge conflict
erfannariman 6342ad2
18262 - replaced depr message
erfannariman 3dfe19d
18262 - line break too long line
erfannariman 187d47b
18262 - set header size
erfannariman db63df7
[FIX] - 18262 - Merge conflict
erfannariman 227fad5
[FIX] - 18262 - removed extra dash header
erfannariman ce775ce
[FIX] - 18262 - reference to section in docs
erfannariman 2ee7d09
[FIX] - 18262 - grammar / typos in docstring
erfannariman 4c78311
Merge branch 'master' into 18262-depr-lookup
erfannariman f447185
Merge branch 'master' into 18262-depr-lookup
erfannariman dc2d367
moved depr version to 1.2
erfannariman 293bd7a
test with linking to user guide
erfannariman cbca163
Remove line break
erfannariman 90fa6a9
Merge branch 'master' into 18262-depr-lookup
erfannariman 3eefd8e
Merge branch 'master' into 18262-depr-lookup
erfannariman 4c3c163
Revert whatsnew v1.1.0
erfannariman b5a34e3
Added depr message in whatsnew v1.2.0
erfannariman ba4fb8a
replace query with loc
erfannariman 6b91db6
add melt and loc to depr msg
erfannariman ff7724f
add dot
erfannariman 104e3cb
added colon hyperlink
erfannariman 25e78dd
updates
erfannariman 32affb2
Merge branch 'master' into 18262-depr-lookup
erfannariman 4f4bf65
static method
erfannariman 45bdc91
more clean up in sql.py
erfannariman d5f13b7
revert removal
erfannariman 381e203
remove self
erfannariman 33a47d1
Merge branch 'master' into cln-sql-static-method
erfannariman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 on static methods generally; you can move to a free function if you really want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree we should generally be using staticmethods only sparingly, but IMO here that is fine. This method is only used once, just above, and keeping it here keeps it closer to where it is used.
The same for
_fetchall_as_list
. And theget_table
is actually overriding a parent class method, so shouldn't be moved to a free function.So I prefer to keep those functions where they are. Whether they are normal methods or staticmethods, I personally don't care. So if others don't want to use staticmethods, I would just leave this as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess with the -1 and with the leave as is, I will close this PR.