incremental icon indicating copy to clipboard operation
incremental copied to clipboard

Ignore .pyc files

Open twm opened this issue 5 years ago • 2 comments

It doesn't seem like incremental should mangle bytecode files:

❯ .tox/twine/bin/python -m incremental.update --rc treq
Updating codebase to 20.9.0rc1
Updating /home/twm/dev/treq/src/treq/__pycache__/api.cpython-37.pyc
Updating /home/twm/dev/treq/src/treq/__pycache__/api.cpython-36.pyc

Observed with incremental 17.5.0

twm avatar Sep 27 '20 19:09 twm

+1. In fact it should probably have several exclusions, off the top of my head these seem reasonable:

  • don't mess with .pyc files
  • possibly don't do the Version(..., NEXT, ...) substitution if it isn't in a .py file?
  • don't recurse into __pycache__ at all
  • don't touch *~ or other backup-like files
  • possibly don't even recurse into subdirectories that don't have an __init__.py ?

Perhaps we should implement the most-obvious of these and then allow exclusion patterns to be added in a setup.cfg section if it turns out some projects have more complicated needs

wiml avatar Apr 02 '21 14:04 wiml

The ability to exclude specific files would be useful, for example so that the Twisted compatibility policy can include examples of the NEXT substitution syntaxes.

twm avatar May 06 '24 04:05 twm