fast-dev-cli 0.9.2__tar.gz → 0.9.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/PKG-INFO +1 -1
- fast_dev_cli-0.9.3/fast_dev_cli/__init__.py +1 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/fast_dev_cli/cli.py +8 -2
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/pyproject.toml +1 -1
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/test_lint.py +32 -0
- fast_dev_cli-0.9.2/fast_dev_cli/__init__.py +0 -1
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/LICENSE +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/README.md +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/fast_dev_cli/__main__.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/fast_dev_cli/py.typed +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/pdm_build.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/scripts/check.sh +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/scripts/format.sh +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/scripts/test.sh +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/__init__.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/conftest.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/test_bump.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/test_fast_test.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/test_functions.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/test_runserver.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/test_sync.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/test_tag.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/test_upgrade.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/test_upload.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/test_version.py +0 -0
- {fast_dev_cli-0.9.2 → fast_dev_cli-0.9.3}/tests/utils.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.9.3"
|
|
@@ -160,9 +160,13 @@ class BumpUp(DryRun):
|
|
|
160
160
|
continue
|
|
161
161
|
return line.split('path = "', 1)[-1].split('"')[0]
|
|
162
162
|
context = tomllib.loads(toml_text)
|
|
163
|
-
|
|
163
|
+
try:
|
|
164
|
+
version_value = context["tool"]["poetry"]["version"]
|
|
165
|
+
except KeyError:
|
|
166
|
+
return TOML_FILE
|
|
167
|
+
if version_value == "0":
|
|
164
168
|
try:
|
|
165
|
-
package_item =
|
|
169
|
+
package_item = context["tool"]["poetry"]["packages"]
|
|
166
170
|
except KeyError:
|
|
167
171
|
packages = []
|
|
168
172
|
else:
|
|
@@ -557,6 +561,8 @@ class LintCode(DryRun):
|
|
|
557
561
|
if load_bool("SKIP_MYPY"):
|
|
558
562
|
# Sometimes mypy is too slow
|
|
559
563
|
tools = tools[:-1]
|
|
564
|
+
elif load_bool("IGNORE_MISSING_IMPORTS"):
|
|
565
|
+
tools[-1] += " --ignore-missing-imports"
|
|
560
566
|
lint_them = " && ".join("{0}{%d} {1}" % i for i in range(2, len(tools) + 2))
|
|
561
567
|
prefix = ""
|
|
562
568
|
should_run_by_tool = False
|
|
@@ -25,6 +25,21 @@ def mock_skip_mypy(monkeypatch):
|
|
|
25
25
|
monkeypatch.setenv("SKIP_MYPY", "1")
|
|
26
26
|
|
|
27
27
|
|
|
28
|
+
@pytest.fixture
|
|
29
|
+
def mock_skip_mypy_0(monkeypatch):
|
|
30
|
+
monkeypatch.setenv("SKIP_MYPY", "0")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@pytest.fixture
|
|
34
|
+
def mock_ignore_missing_imports(monkeypatch):
|
|
35
|
+
monkeypatch.setenv("IGNORE_MISSING_IMPORTS", "1")
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
@pytest.fixture
|
|
39
|
+
def mock_ignore_missing_imports_0(monkeypatch):
|
|
40
|
+
monkeypatch.setenv("IGNORE_MISSING_IMPORTS", "0")
|
|
41
|
+
|
|
42
|
+
|
|
28
43
|
SEP = " && "
|
|
29
44
|
LINT_CMD = "ruff format . && ruff check --extend-select=I --fix . && mypy ."
|
|
30
45
|
CHECK_CMD = "ruff format --check . && ruff check --extend-select=I . && mypy ."
|
|
@@ -112,6 +127,23 @@ def test_skip_mypy(mock_skip_mypy, mocker):
|
|
|
112
127
|
assert LintCode(".").gen() == SEP.join(i for i in cmds if not i.startswith("mypy"))
|
|
113
128
|
|
|
114
129
|
|
|
130
|
+
def test_skip_mypy_0(mock_skip_mypy_0, mocker):
|
|
131
|
+
mocker.patch("fast_dev_cli.cli.is_venv", return_value=True)
|
|
132
|
+
assert LintCode(".").gen() == LINT_CMD
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def test_ignore_missing_imports(mock_ignore_missing_imports, mocker):
|
|
136
|
+
mocker.patch("fast_dev_cli.cli.is_venv", return_value=True)
|
|
137
|
+
assert LintCode(".").gen() == LINT_CMD.replace(
|
|
138
|
+
"mypy ", "mypy --ignore-missing-imports "
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def test_ignore_missing_imports_0(mock_ignore_missing_imports_0, mocker):
|
|
143
|
+
mocker.patch("fast_dev_cli.cli.is_venv", return_value=True)
|
|
144
|
+
assert LintCode(".").gen() == LINT_CMD
|
|
145
|
+
|
|
146
|
+
|
|
115
147
|
def test_not_in_root(mocker):
|
|
116
148
|
mocker.patch("fast_dev_cli.cli.is_venv", return_value=True)
|
|
117
149
|
root = Path(__file__).parent.parent
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.9.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|