Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore .pyc files #58

Open
twm opened this issue Sep 27, 2020 · 2 comments
Open

Ignore .pyc files #58

twm opened this issue Sep 27, 2020 · 2 comments

Comments

@twm
Copy link
Contributor

twm commented Sep 27, 2020

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

@wiml
Copy link

wiml commented Apr 2, 2021

+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

@twm
Copy link
Contributor Author

twm commented May 6, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants