matplotlib.use required before other imports clashes with pep8. Ignore or fix?
Question: I have a pythonscript that starts like this:

    
    
    #!/usr/bin/env python
    import matplotlib
    matplotlib.use("Agg")
    
    from matplotlib.dates import strpdate2num
    import numpy as np
    import pylab as pl
    from cmath import rect, phase
    

It works like a charm, but my editor complains: `E402 module level import not
at top of file [pep8]`.

If I move the `matplotlib.use("Agg")` down, the script will not work.

Should I just ignore the error? Or is there a way to fix this?

**EDIT :** I'm aware that PEP8 says that this is only a suggestion and it may
be ignored, but I'm hoping that there exists a nice way to initialise modules
without breaking PEP8 guidelines, as I don't think I can make my editor ignore
this rule on a per-file-basis.

**EDIT2 :** I'm using Atom with linter-pylama


Answer: The solution depends on the `linter` that is being used.

In my case I am using `pylama`

The manual for this `linter` suggests adding `# noqa` to the end of a line
containing an error you wish to suppress.

Other linters will have different mechanisms.

