diff --git a/.flake8 b/.flake8 index df76fe7..a751228 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,6 @@ [flake8] ignore = E203, E266, E501, W503, F403, F401, E402, W291 -max-line-length = 120 +max-line-length = 80 max-complexity = 10 application-import-names = hypermodern_python,tests select = B,C,E,F,W,T4,B9 @@ -14,4 +14,5 @@ exclude = build, dist, examples, + notebooks, waldiez_out, diff --git a/.vscode/settings.json b/.vscode/settings.json index f11dfa3..addf329 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -151,6 +151,7 @@ "httputil", "Hugle", "Hypatia", + "hypermodern", "imagename", "Ioannidou", "ioloop", @@ -281,6 +282,7 @@ "Principia", "Proskuriakova", "pyautogen", + "pycache", "pydocstyle", "pylint", "pyproject", diff --git a/pyproject.toml b/pyproject.toml index 8c096bd..0812e05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,7 +119,7 @@ ignore = ["W002"] # black [tool.black] -line-length = 120 +line-length = 80 skip-string-normalization = true include = ''' \.pyi?$ @@ -139,6 +139,7 @@ exclude = ''' | dist | node_modules | examples + | notebooks )/ ''' @@ -162,6 +163,7 @@ exclude = [ 'build', 'dist', 'examples', + 'notebooks', 'node_modules', 'waldiez_out', ] @@ -176,13 +178,14 @@ skip = [ 'build', 'dist', 'examples', + 'notebooks', 'waldiez_out' ] # known_local_folder = ["..."] include_trailing_comma = true force_grid_wrap = 0 use_parentheses = true -line_length = 120 +line_length = 80 [tool.pydocstyle] match-dir = ''' @@ -192,6 +195,7 @@ match-dir = ''' [^!(dist)] [^!(node_modules)] [^!(examples)] + [^!(notebooks)] [^!(waldiez_out)] ''' @@ -271,10 +275,11 @@ skips = ['*_test.py', '*/test_*.py'] # ruff [tool.ruff] -line-length = 120 +line-length = 80 extend-exclude = [ "**/.venv", "**/examples", + "**/notebooks", "**/.local", "**/node_modules", "**/build", @@ -314,7 +319,9 @@ addopts = """ # consider_namespace_packages = true # pythonpath = [] -# filterwarnings = [] +filterwarnings = [ + "ignore::DeprecationWarning", +] python_files = ["test_*.py", "*_test.py"] # coverage diff --git a/scripts/dev/requirements.py b/scripts/dev/requirements.py index b33fb19..36eb484 100644 --- a/scripts/dev/requirements.py +++ b/scripts/dev/requirements.py @@ -24,9 +24,13 @@ def _write_all_dot_txt() -> None: def _ensure_uv() -> None: """Ensure that the `uv` tool is installed.""" if not shutil.which("uv"): - subprocess.run(["python", "-m", "pip", "install", "uv"], check=True) # nosemgrep # nosec + subprocess.run( # nosemgrep # nosec + ["python", "-m", "pip", "install", "uv"], check=True + ) try: - subprocess.run(["uv", "--version"], check=True, stdout=subprocess.DEVNULL) # nosemgrep # nosec + subprocess.run( # nosemgrep # nosec + ["uv", "--version"], check=True, stdout=subprocess.DEVNULL + ) except subprocess.CalledProcessError: print("Failed to run `uv`.") print("Please make sure that the `uv` tool is installed.") diff --git a/scripts/dev/run.py b/scripts/dev/run.py index 5417222..09b6977 100644 --- a/scripts/dev/run.py +++ b/scripts/dev/run.py @@ -62,7 +62,9 @@ def _start_jupyter() -> None: def _start_jlpm() -> None: try: # pylint: disable=subprocess-run-check, line-too-long - subprocess.run([JLPM_COMMAND, "run", "watch"], cwd=ROOT_DIR, check=True) # nosemgrep # nosec + subprocess.run( # nosemgrep # nosec + [JLPM_COMMAND, "run", "watch"], cwd=ROOT_DIR, check=True + ) except KeyboardInterrupt: _stop()