-
Notifications
You must be signed in to change notification settings - Fork 87
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
LINT: disabled pylint
flags should be re-enabled where possible, or disabled locally
#196
Comments
pylint
raising apparently false-positive abstract-class-instantiated
when calling cartopy methods in climate.CartopyPlots
pylint
flags should be re-enabled where possible, or disabled locally
- locally disable apparently false positive `E0110: abstract-class-instantiated` flag on calling `cartopy.crs.PlateCarree()`, which inhibited Travis CI builds to pass - related issue: #196
I think that locally disabling this warning is the correct permanent strategy here, following Pylint's general advice as well as general practice. In particular, the underlying technical problem is arbitrarily complex (the task of statically predicting the dynamic presence or absence of methods, in a programming language with dynamically typed reflection, is in general equivalent to the halting problem). In this sense, Pylint should be understood as a collection of heuristics, and while improving the heuristics would be valuable, both the currently implemented heuristic and the only alternative heuristic suggested so far (in the 4 years since the issue you linked was opened) appear to be inadequate (yielding false positive) in our scenario for some interpreter versions. Regarding other Pylint warnings that appear only in very few places, locating them would probably be beneficial as well, since it is trivial to find
This should be discussed with @jdonges and @zugnachpankow. |
Sounds totally reasonable now that you put it that way, thank you for the illustration.
Also agreed, will put that forth on the next occasion .. |
I am available to look into this with you. Basic features should be covered though. |
thanks for your availability @zugnachpankow, I will look into it myself and get back to you! |
Working on this cleanup on the linked branch. Some more severe issues found that I will address later:
|
CI build previously failed due to
pylint
complaining aboutE0110: Abstract class 'PlateCarree' with abstract methods instantiated (abstract-class-instantiated)
at two instances within
climate.CartopyPlots.init()
(see Travis CI log).The flag was raised in the
python=3.8
-build only, later python version were fine.pyunicorn
's handling ofcartopy
is perfectly in line with cartopy docs. Also — to my understanding —PlateCarree
as not actually an abstract class itself, although some parent classes are (seecartopy
source). What's more, there is a similar false-positive issue open at pylint.Therefore, I will locally disable this flag for now. I am filing this issue, because this can only be a temporary solution and should be kept track of. Also, other currently disabled
pylint
-flags should be looked into, or disabled only locally where it makes sense.On another side note: Deprecation/dropping of
climate.MapPlots
might be looked into as well. Is its functionality fully covered byclimate.CartopyPlots
andcartopy
/matplotlib
?The text was updated successfully, but these errors were encountered: