paulober / Pico-W-Stub

MicroPython stubs for the Raspberry Pi Pico W
Apache License 2.0
10 stars 3 forks source link

Problem while declaring parameter `pull` of a Pin class #9

Closed joaocarlos closed 1 year ago

joaocarlos commented 1 year ago

Hello.

When I declare a Pin with the arguments, defining the mode and pull like in

pinData = Pin(self.Data_pin, Pin.OUT, None)

Pylance returns:

Argument of type "None" cannot be assigned to parameter "pull" of type "int" in function "__init__"
  Type "None" cannot be assigned to type "int"Pylance[reportGeneralTypeIssues](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportGeneralTypeIssues)

Changing to Pin.PULL_DOWN and Pin.PULL_UP works just fine.