> A couple other things come to mind.  That's a regular expression, so does
> pylint automatically attach a trailing '$' anchor?  If not, any variables
> prefixed with that regular expression would be treated as a dummy
> variable, e.g., "icicle" as well as "i".

I looked in the 0.15.2 source code (the latest I had conveniently laying
about) and confirmed that pylint just calls match() with the value of
dummy-variables-rgx:

        authorized_rgx = self.config.dummy_variables_rgx
        for name, stmts in not_consumed.items():
            # ignore some special names specified by user configuration
            if authorized_rgx.match(name):
                continue
            ...

That means that Derek's setting is probably a bit looser than he thought.
Better to be explicit if you truly want unused variables named i, j, k, or
dummy to be allowed:

    dummy-variables-rqx=_|([ijk]|dummy)$

Skip
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to