Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lazToum committed Dec 8, 2024
1 parent 8835d2f commit 76e1f53
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -14,4 +14,5 @@ exclude =
build,
dist,
examples,
notebooks,
waldiez_out,
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
"httputil",
"Hugle",
"Hypatia",
"hypermodern",
"imagename",
"Ioannidou",
"ioloop",
Expand Down Expand Up @@ -281,6 +282,7 @@
"Principia",
"Proskuriakova",
"pyautogen",
"pycache",
"pydocstyle",
"pylint",
"pyproject",
Expand Down
15 changes: 11 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ ignore = ["W002"]

# black
[tool.black]
line-length = 120
line-length = 80
skip-string-normalization = true
include = '''
\.pyi?$
Expand All @@ -139,6 +139,7 @@ exclude = '''
| dist
| node_modules
| examples
| notebooks
)/
'''

Expand All @@ -162,6 +163,7 @@ exclude = [
'build',
'dist',
'examples',
'notebooks',
'node_modules',
'waldiez_out',
]
Expand All @@ -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 = '''
Expand All @@ -192,6 +195,7 @@ match-dir = '''
[^!(dist)]
[^!(node_modules)]
[^!(examples)]
[^!(notebooks)]
[^!(waldiez_out)]
'''

Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -314,7 +319,9 @@ addopts = """

# consider_namespace_packages = true
# pythonpath = []
# filterwarnings = []
filterwarnings = [
"ignore::DeprecationWarning",
]
python_files = ["test_*.py", "*_test.py"]

# coverage
Expand Down
8 changes: 6 additions & 2 deletions scripts/dev/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
4 changes: 3 additions & 1 deletion scripts/dev/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 76e1f53

Please sign in to comment.