how to tell pylint to ignore certain imports?

Just run into this as well with the following code:

 8: if os.name == 'nt':
 9:    import msvcrt
10: else:
11:    import fcntl

pylint failed the build with this error:

E:  9, 4: Unable to import 'msvcrt' (import-error)

The solution is available since pylint 0.10:

 9:    import msvcrt  # pylint: disable=import-error

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)