File tree Expand file tree Collapse file tree 4 files changed +13
-18
lines changed
Expand file tree Collapse file tree 4 files changed +13
-18
lines changed Original file line number Diff line number Diff line change 55 @fgrep -h " ##" $(MAKEFILE_LIST ) | fgrep -v fgrep | sort | awk ' BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
66
77clean : # # Removing cached python compiled files
8- find . -name \* pyc | xargs rm -fv
9- find . -name \* pyo | xargs rm -fv
10- find . -name \* ~ | xargs rm -fv
8+ find . -name " *. pyc" -type f -delete
9+ find . -name " *. pyo" -type f -delete
10+ find . -name " *~ " -type f -delete
1111 find . -name __pycache__ | xargs rm -rfv
1212 find . -name .pytest_cache | xargs rm -rfv
1313 find . -name .ruff_cache | xargs rm -rfv
Original file line number Diff line number Diff line change 1919
2020
2121class EllarSQLOptions (SQLAlchemyOptions ):
22+ # Type hints for SQLAlchemy-specific attributes
23+ sqlalchemy_get_or_create : t .Tuple [str , ...]
24+ sqlalchemy_session_persistence : str
25+
2226 @staticmethod
2327 def _check_has_sqlalchemy_session_set (meta , value ):
2428 if value and hasattr (meta , "sqlalchemy_session" ):
@@ -31,6 +35,7 @@ class EllarSQLFactory(SQLAlchemyModelFactory):
3135 """Factory for EllarSQL models."""
3236
3337 _options_class = EllarSQLOptions
38+ _meta : EllarSQLOptions
3439
3540 class Meta :
3641 abstract = True
Original file line number Diff line number Diff line change 55def test_migrate_upgrade ():
66 result = run_command ("default.py db init" )
77 assert result .returncode == 0
8- assert (
9- b"tests/dumbs/default/migrations/alembic.ini' before proceeding."
10- in result .stdout
11- )
8+ assert b"default/migrations/alembic.ini before proceeding." in result .stdout
129
1310 result = run_command ("default.py db check" )
1411 assert result .returncode == 1
@@ -36,7 +33,7 @@ def test_migrate_upgrade_custom_directory():
3633 result = run_command ("custom_directory.py db init" )
3734 assert result .returncode == 0
3835 assert (
39- b"tests/dumbs/ custom_directory/temp_migrations/alembic.ini' before proceeding."
36+ b"custom_directory/temp_migrations/alembic.ini before proceeding."
4037 in result .stdout
4138 )
4239
@@ -138,10 +135,7 @@ def test_other_alembic_commands():
138135def test_migrate_upgrade_async ():
139136 result = run_command ("default_async.py db init" )
140137 assert result .returncode == 0
141- assert (
142- b"tests/dumbs/default_async/migrations/alembic.ini' before proceeding."
143- in result .stdout
144- )
138+ assert b"default_async/migrations/alembic.ini before proceeding." in result .stdout
145139
146140 result = run_command ("default_async.py db check" )
147141 assert result .returncode == 1
Original file line number Diff line number Diff line change @@ -6,10 +6,7 @@ def test_migrate_upgrade_for_multiple_database():
66 with set_env_variable ("multiple_db" , "true" ):
77 result = run_command ("multiple_database.py db init -m" )
88 assert result .returncode == 0
9- assert (
10- b"tests/dumbs/multiple/migrations/alembic.ini' before proceeding."
11- in result .stdout
12- )
9+ assert b"multiple/migrations/alembic.ini before proceeding." in result .stdout
1310
1411 result = run_command ("multiple_database.py db check" )
1512 assert result .returncode == 1
@@ -62,8 +59,7 @@ def test_migrate_upgrade_for_multiple_database_async():
6259 result = run_command ("multiple_database_async.py db init -m" )
6360 assert result .returncode == 0
6461 assert (
65- b"tests/dumbs/multiple_async/migrations/alembic.ini' before proceeding."
66- in result .stdout
62+ b"multiple_async/migrations/alembic.ini before proceeding." in result .stdout
6763 )
6864
6965 result = run_command ("multiple_database_async.py db check" )
You can’t perform that action at this time.
0 commit comments