dodona-edu/papyros

False positive linting message

Closed this issue · 1 comments

Check if this false positive linting message (failing nested module introspection) is an issue of pylint or of the way pylint is used in Papyros:

image

Code snippet:

import numpy as np
import matplotlib.pyplot as plt

def michaelis_menten(E, S, kcat, Km):
    # S should be numpy array, others constant
    return kcat * E * S / (Km + S)

# molar
E = 1e-6
S = np.linspace(0, 2e-3, 1001)
kcat = [1000 * i for i in range(1, 5)]
Km = 200e-6

cmap = plt.cm.PuBuGn
line_colors = cmap(np.linspace(0.4, 0.9, len(kcat)))
plt.figure()
for i, k in enumerate(kcat):
    plt.plot(
        1000 * S, 
        1000 * michaelis_menten(E, S, k, Km),
        color=line_colors[i],
        linewidth=2,
        label=f'kcat {k} /s'
    )
    
plt.xlabel('Substrate concentration (mM)')
plt.ylabel(r'$\dfrac{dP}{dt}$ (mM/s)')
plt.grid(True)
plt.legend()
plt.title('Michaelis-Menten dependence on kcat')
plt.show()

I'll close this issue, as it no longer occurs. Guess this got resolved due to some pyodide update or some other changes under the hood.

image