Procházet zdrojové kódy

chore: ignore all files with .db extensions in .gitignore (#1568)

* chore: ignore all files with .db extensions in .gitignore

* Fix unit tests for .gitignore
mat-mil před 1 rokem
rodič
revize
fa1642fd6b
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      reflex/constants.py
  2. 1 1
      tests/test_utils.py

+ 1 - 1
reflex/constants.py

@@ -214,7 +214,7 @@ DEFAULT_META_LIST = []
 # The gitignore file.
 GITIGNORE_FILE = ".gitignore"
 # Files to gitignore.
-DEFAULT_GITIGNORE = {WEB_DIR, DB_NAME, "__pycache__/", "*.py[cod]"}
+DEFAULT_GITIGNORE = {WEB_DIR, "*.db", "__pycache__/", "*.py[cod]"}
 # The name of the reflex config module.
 CONFIG_MODULE = "rxconfig"
 # The python config file.

+ 1 - 1
tests/test_utils.py

@@ -481,7 +481,7 @@ def test_initialize_non_existent_gitignore(tmp_path, mocker, gitignore_exists):
     if gitignore_exists:
         gitignore_file.touch()
         gitignore_file.write_text(
-            """reflex.db
+            """*.db
         __pycache__/
         """
         )