purple-spring-90217
11/23/2021, 8:04 AMgenre = Parameter(
"genre",
help="Filter movies for a particular genre.",
default="Sci-Fi"
)
And then later:
if self.genre.lower() not in genres.lower()
Pylance quite reasonably complains about this:
Cannot access member "lower" for type "Parameter"
Member "lower" is unknown Pylance(reportGeneralTypeIssues)
And yet the code runs just fine. I’ve hunted around and I’m unable to find the magic that allows calling lower()
(a string
method) on genre
(a Parameter
of type string). Can anyone help me to understand what’s going on here?dry-beach-38304
11/23/2021, 9:33 AM