【发布时间】:2014-09-30 18:55:03
【问题描述】:
我收到关于我的常量的 Pylint 错误:MIN_SOIL_PARTICLE_DENS(无效名称)。
任何想法为什么这个常数是错误的?这是我的全部功能:
def bulk_density(clay, sand, organic_matter):
MIN_SOIL_PARTICLE_DENS = 2.65
x1 = (0.078 + 0.278 * sand + 0.034 * clay + 0.022 * organic_matter - 0.018
* sand * organic_matter - 0.027 * clay * organic_matter - 0.584 * sand
* clay)
x2 = -0.107 + 1.636 * x1
field_capacity = vol_water_content_33_j_kg(clay, sand, organic_matter)#m3/m3
sat_water_content = 0.043 + field_capacity + x2 - 0.097 * sand
return (1 - sat_water_content) * MIN_SOIL_PARTICLE_DENS
【问题讨论】:
标签: python coding-style pylint