-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Move scripts to Synapse package and expose as entry_point
s; add suffices to scripts-dev
#12107
Comments
Aha! This is done in |
I am not enthusiastic about naming commands according to the language they happen to be written in. It feels a bit like Hungarian notation. Linux prefers However, Setuptools allows an entry point to be defined in a file named It looks like poetry's scripts do much the same thing. |
An alternative would be to keep passing around the list of explicit targets to lint, both in CI and in lint.sh. That's fine and is probably easier---but it would mean maintaining duplicate lists, which is the kind of thing I'm trying to move us away from with poetry. On entry_points and scripts: I'm glad you brought that up. When I looked at synapse/scripts/register_new_matrix_user Lines 16 to 19 in 4b965c8
I think this script was moved to within Synapse (#4085) in order to be tested here:
How would you feel about migrating the scripts' source code to Line 169 in e6acd3c
|
sgtm |
.py
entry_point
s.
In addition to #12118 I need to do this for I'd also like to add the
|
yeah I'm less fussed about scripts-dev. It's a hodgepodge of "expert" stuff anyway. |
entry_point
s.entry_point
s; add suffices to scripts-dev
@DMRobertson can we call this done? |
Yes. I think it just didn't get closed because the PR was targetted at a release branch. |
After #12107 it's much easier for black, isort and flake8 to find the scripts we want them to lint.
After #12107 it's much easier for black, isort and flake8 to find the scripts we want them to lint.
After #12107 it's much easier for black, isort and flake8 to find the scripts we want them to lint.
- We don't recommend tox in `code_style.md` - After #12107 it's much easier for black, isort and flake8 to find the scripts we want them to lint; we don't need to maintain `lint_targets` in the tox config.
black
andflake8
will ignore such files by default. flake8 has afilename
config option, but I haven't been able to use this to have flake8 run over the scripts it would otherwise script.mypy
does not have this problem: one can specify an explicit list of files to example or ignore.isort
doesn't have such configuration, but does look for shebang lines to detect python scripts without a .py suffix.Given a magic wand, I would like to:
Bullet three here is the hard one.
This would allow me to run
black .
andflake8 .
both locally and in CI without thinking.The text was updated successfully, but these errors were encountered: