openzim / _python-bootstrap

Sample openZIM Python project bootstrap
1 stars 1 forks source link

Rethink the default `Ruff` Rules. #14

Closed FledgeXu closed 11 months ago

FledgeXu commented 11 months ago

For now, the default Ruff rules are not suitable for every Python project we work on. For example, in the FastAPI project, we should exclude the A003(Reason) and the B008(Reason). However, for the Python projects that don't use the FastAPI, we can still keep these two rules. We should rethink which rules are appropriate for each Python project.

rgaudin commented 11 months ago

Well I think each rule (or set of rule) should be discussed individually, in the repo a change is needed and/or here in the bootstrap.

Workflow being:

rgaudin commented 11 months ago

Closing in favor of #15 and #16

benoit74 commented 11 months ago

I consider that adding few # noqa: XXX comments to suppress some errors is perfectly normal.

From my opinion, the goal is not to have 100% compliant code, but to detect everything which is weird and might need to be fixed, in order to help developers and maintainers identify subtle (or not so subtle) issues.

Clearly documenting with this noqa comment that there is a kind of "anomaly" but that has been judged "acceptable" by the developers is perfectly normal from my experience.

WDYT?

(I still agree on #16)