diff options
author | James Addison <james@reciperadar.com> | 2023-04-10 15:40:38 -0400 |
---|---|---|
committer | Federico Caselli <cfederico87@gmail.com> | 2023-04-12 22:36:39 +0200 |
commit | d3f869bb3159d18669fb6f00cbe514307118eea7 (patch) | |
tree | 32b83d276b3eaf779dcea37aa1c59e0b0da5e596 /setup.cfg | |
parent | 33a9947686a7c8bb3becd6169ec7abe84cf2c7e6 (diff) | |
download | alembic-d3f869bb3159d18669fb6f00cbe514307118eea7.tar.gz |
tooling: write_pyi.py: filter usage of raw-strings (rstrings)
### Description
While reading the diff between [`rel_1_10_2...rel_1_10_3`](https://github.com/sqlalchemy/alembic/compare/rel_1_10_2...rel_1_10_3), the introduction of r-strings drew my attention, and that resulted in some [discussion on the relevant commit](https://github.com/sqlalchemy/alembic/commit/bc0c305b7c2cc0401e250fcd6a725aacecdd6e33).
This changeset filters the production of r-strings during stub-generation to cases where docstrings contain escape (backslash, `\`) characters.
I'll admit that I didn't realize until today that these stubs are primarily for typechecking. Since that's the case, I have doubts about whether the change is worthwhile (consistency and simplicity -- using r-strings for all docstrings in the stubs -- even if it's redundant, seems fine to me).
### Checklist
This pull request is:
- [x] A documentation / typographical error fix
- [x] A short code fix
- Relates to discussion at https://github.com/sqlalchemy/alembic/commit/bc0c305b7c2cc0401e250fcd6a725aacecdd6e33
Closes: #1218
Pull-request: https://github.com/sqlalchemy/alembic/pull/1218
Pull-request-sha: 352ab8829525435f78838687e12156a3fa3a3d86
Closes: #1219
Pull-request: https://github.com/sqlalchemy/alembic/pull/1219
Change-Id: I2808a592681dabc093d538f589e673fcc5e05822
Diffstat (limited to 'setup.cfg')
-rw-r--r-- | setup.cfg | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -89,10 +89,12 @@ ignore = RST304,RST303,RST299,RST399, W503,W504 exclude = .venv,.git,.tox,dist,doc,*egg,build +filename = *.py,*.pyi import-order-style = google application-import-names = alembic,tests per-file-ignores = **/__init__.py:F401 + **/*.pyi:E302,E704,E266 max-line-length = 79 [sqla_testing] |