Skip to content

Lighting9999 patch 1 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jul 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/Python CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Python CI
on: [pull_request, push]
jobs:
lint_python:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install check dependencies
run: |
python -m pip install --upgrade pip wheel
pip install bandit ruff mypy safety codespell

- name: Run Codespell
run: codespell --config pyproject.toml || true

- name: Run Bandit
run: bandit --recursive --skip B101 . || true

- name: Run Ruff (linting)
run: ruff check . --config pyproject.toml

- name: Run Ruff (formatting check)
run: ruff format --check . --config pyproject.toml || true



- name: Setup Mypy cache
run: mkdir -p .mypy_cache

- name: Install type stubs
run: mypy --config-file pyproject.toml --install-types --non-interactive

- name: Run Mypy
run: mypy --config-file pyproject.toml
24 changes: 0 additions & 24 deletions .github/workflows/lint_python.yml

This file was deleted.

6 changes: 6 additions & 0 deletions News_App/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
solara == 1.50.1
Flask
gunicorn ==23.0.0
simple-websocket
flask-sock
yfinance
58 changes: 29 additions & 29 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,38 +113,38 @@ dependencies = [
"xor-cipher",
"yfinance",
]

[build-system]
requires = ["setuptools>=65", "wheel"]
build-backend = "setuptools.build_meta"

[tool.codespell]
ignore-words-list = "3rt,abd,aer,ans,bitap,crate,damon,fo,followings,hist,iff,kwanza,manuel,mater,secant,som,sur,tim,toi,zar"
skip = "*.css,*.js,*.lock"

[tool.ruff]
line-length = 88
target-version = "py313"
select = [
"E", "W", "F", "I", "B", "C4", "UP", "YTT",
"EM", "EXE", "G", "ISC", "PLC", "PLW", "PT", "S", "SIM", "SLF"
]

select = ["E", "F", "I", "UP", "YTT", "PLC", "PT", "SIM"]
ignore = [
"B101",
"B904", # Within an `except` clause, raise exceptions with `raise ... from err`
"B905", # `zip()` without an explicit `strict=` parameter
"EM101", # Exception must not use a string literal
"EXE001", # Shebang is present but file is not executable
"G004", # Logging statement uses f-string
"ISC001", # Conflicts with ruff format
"PLC0415",# import-outside-top-level
"PLC1901",# `{}` can be simplified to `{}` as an empty string is falsey
"PLW060", # Using global without assignment
"PLW1641",# eq-without-hash
"PLW2901",# Redefined loop variable
"PT011", # pytest.raises(Exception) is too broad
"PT018", # Assertion should be broken down
"PT028", # pytest-parameter-with-default-argument
"S101", # Use of `assert` detected
"S311", # Standard pseudo-random generators
"SIM905", # Consider using a list literal instead of `str.split`
"SLF001", # Private member accessed
"UP038", # Use `X | Y` in `{}` call
"B904", "B905", "PLC0415",
"PLW2901", "PT011", "PT018", "PT028",
"S101", "SIM905", "UP038"
]

max-args = 10
max-branches = 20
max-returns = 8
max-statements = 88
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/**" = ["S101", "PT011", "PT018"]
".*_test\\.py" = ["S101", "PT011", "PT018"]

[tool.mypy]
python_version = "3.13"
ignore_missing_imports = true
exclude = ".*venv.*|.*__pycache__.*|.*migrations.*"

[[tool.mypy.overrides]]
module = [
"django.*", "tensorflow.*", "keras.*",
"matplotlib.*", "pymongo.*"
]
ignore_missing_imports = true
Loading