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

Pylint raises no-member #242

Closed
Horstage opened this issue Feb 22, 2021 · 5 comments
Closed

Pylint raises no-member #242

Horstage opened this issue Feb 22, 2021 · 5 comments

Comments

@Horstage
Copy link

This code fails pylint review with pylint 2.7.0 (on Python 3.9).

playlist = m3u8.load(playlist_path)
playlist.is_endlist

raises
E1101: Instance of 'M3U8' has no 'is_endlist' member (no-member)

I suppose it would happen with all simple_attributes.

@leandromoreira
Copy link
Contributor

yes, given the dynamic nature of it

@Horstage
Copy link
Author

Opened PR #243 as suggestion.

@leandromoreira
Copy link
Contributor

leandromoreira commented Feb 23, 2021

Thanks @Horstage , I really appreciate your PR but I think it adds an implicit work, now everytime we want to add a new member, we need to do the usual mapping plus this proposed initialization (btw, it's NOT A big deal but it is more code).

Can't we just configure the pylintrc to assume that m3u8 has generated-members?

generated-members:

  | List of members which are set dynamically and missed by pylint inference system, and so shouldn’t trigger E1101 when accessed. Python regular expressions are accepted.

generated-members=m3u8.*

I'm always trying to avoid adding code but I'd like to know @mauricioabreu @flavioribeiro @igorsobreira think about it as well.

@Horstage
Copy link
Author

Yet another pylint config, I didn't know existed. Thanks!
I'm fine with this solution and do see why you would handle it this way.
For me, this issue is now resolved.

@mauricioabreu
Copy link
Member

Sorry for taking so long. Well, yes, since this project does not have a pylintrc, you can edit your pylint configuration with @leandromoreira suggestion.

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

No branches or pull requests

3 participants