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

"deprecated" and "temporary" annotations needed #252

Open
jace opened this issue Mar 17, 2020 · 0 comments
Open

"deprecated" and "temporary" annotations needed #252

jace opened this issue Mar 17, 2020 · 0 comments

Comments

@jace
Copy link
Member

jace commented Mar 17, 2020

The current "immutable" and "cached" annotations are used to indicate database columns that are read-only and holding disposable values, respectively.

We need one or two more annotations:

  1. "temporary": indicating that this column was added as a quick hack. Any further use of the column should be based on a refactoring for permanent status.

  2. "deprecated": indicating that this column is marked for removal and so should not be used in new code. However, the utility of this annotation is unclear as there is no indication of what replaces it.

Further, these annotations (except "immutable") have no practical value over regular Python comments placed alongside the column. This is an open problem. Possibilities:

  1. The annotation inserts itself into the docstring so that it is visible in code intelligence in an editor. However, docstrings are typically on classes, but columns are instances.

  2. The annotation causes a Python warning to be raised whenever it is applied on a column, causing a list of such warnings to be displayed every time the app is run in developer mode. However, this will get pretty annoying as "temporary" annotations are temporary on the basis of attention to a feature, not time in use.

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

1 participant