jayvdb added a comment.

So alternatives on https://gerrit.wikimedia.org/r/#/c/260909/ were two incomplete/unusable solutions:

  • pyflakes . (PS1..) : included .tox
  • pyflakes [a-z]* (PS5) - depends on shell globbing, which tox and pyflakes does not do.

And two usable solutions:

  • find . -name '*.py' -and -not -name '.*' | xargs pyflakes (PS6)
  • ffind .. (PS7)

Using find and xargs invokes non-Windows GNU tools, but there should be python equivalents, and that is how I found ffind which worked efficiently after a bit of improvement.

fwiw, the find command should be find . -name '*.py' -a '!' -path '*/.*' -a '!' -name 'user-config.py'

Other solutions on the xargs area would be

https://github.com/drmikehenry/findx is a very nice wrapper of find and xargs , and doesnt require {} , which currently tox mishandles (but will be fixed in the next version). findx is very likely to be Unix and even GNU specific though. But it works (see PS17 of https://gerrit.wikimedia.org/r/#/c/294907 ), with a little modification, and gives us a quick fix for this bug.


TASK DETAIL
https://phabricator.wikimedia.org/T137628

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: jayvdb
Cc: Urbanecm, TerraCodes, Luke081515, valhallasw, Aklapper, jayvdb, Zppix, Xqt, pywikibot-bugs-list, Mdupont, Jay8g, hashar, greg
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to