Skip to content

Conversation

@FlorianPfaff
Copy link
Owner

No description provided.

@github-actions
Copy link

github-actions bot commented Sep 17, 2023

MegaLinter analysis: Error

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.14s
✅ COPYPASTE jscpd yes no no 6.26s
✅ JSON prettier 2 0 0 0 0.49s
✅ JSON v8r 2 0 0 2.42s
✅ MARKDOWN markdownlint 1 0 0 0 0.64s
✅ MARKDOWN markdown-table-formatter 1 0 0 0 0.25s
✅ PYTHON bandit 245 0 0 3.04s
✅ PYTHON black 245 2 0 0 5.73s
❌ PYTHON flake8 245 2 0 1.5s
✅ PYTHON isort 245 2 0 0 0.49s
✅ PYTHON mypy 245 0 0 3.7s
❌ PYTHON pylint 245 12 0 58.9s
❌ PYTHON ruff 245 2 2 0 0.06s
✅ REPOSITORY gitleaks yes no no 3.32s
✅ REPOSITORY git_diff yes no no 0.01s
✅ REPOSITORY secretlint yes no no 4.61s
✅ REPOSITORY syft yes no no 1.59s
✅ REPOSITORY trivy-sbom yes no no 1.06s
✅ REPOSITORY trufflehog yes no no 11.34s
✅ YAML prettier 9 1 0 0 0.69s
✅ YAML v8r 9 0 0 6.2s
✅ YAML yamllint 9 0 0 0.43s

Detailed Issues

❌ PYTHON / flake8 - 2 errors
pyrecest/filters/piecewise_constant_filter.py:107:17: E731 do not assign a lambda expression, use a def
pyrecest/filters/piecewise_constant_filter.py:147:17: E731 do not assign a lambda expression, use a def
❌ PYTHON / pylint - 12 errors
************* Module pyrecest.filters.piecewise_constant_filter
pyrecest/filters/piecewise_constant_filter.py:2:0: E0401: Unable to import 'pyrecest.distributions.circle.piecewise_constant_distribution' (import-error)
pyrecest/filters/piecewise_constant_filter.py:2:0: E0611: No name 'piecewise_constant_distribution' in module 'pyrecest.distributions.circle' (no-name-in-module)
pyrecest/filters/piecewise_constant_filter.py:9:4: W0231: __init__ method from base class 'AbstractCircularFilter' is not called (super-init-not-called)
pyrecest/filters/piecewise_constant_filter.py:99:48: W0640: Cell variable l2 defined in loop (cell-var-from-loop)
pyrecest/filters/piecewise_constant_filter.py:99:63: W0640: Cell variable r2 defined in loop (cell-var-from-loop)
pyrecest/filters/piecewise_constant_filter.py:102:54: W0640: Cell variable indicator defined in loop (cell-var-from-loop)
pyrecest/filters/piecewise_constant_filter.py:138:48: W0640: Cell variable l1 defined in loop (cell-var-from-loop)
pyrecest/filters/piecewise_constant_filter.py:138:63: W0640: Cell variable r1 defined in loop (cell-var-from-loop)
pyrecest/filters/piecewise_constant_filter.py:141:54: W0640: Cell variable indicator defined in loop (cell-var-from-loop)
pyrecest/filters/piecewise_constant_filter.py:32:8: W0201: Attribute 'pwc' defined outside __init__ (attribute-defined-outside-init)
pyrecest/filters/piecewise_constant_filter.py:48:8: W0201: Attribute 'pwc' defined outside __init__ (attribute-defined-outside-init)
pyrecest/filters/piecewise_constant_filter.py:66:8: W0201: Attribute 'pwc' defined outside __init__ (attribute-defined-outside-init)

-----------------------------------
Your code has been rated at 9.98/10
❌ PYTHON / ruff - 2 errors
E731 Do not assign a `lambda` expression, use a `def`
   --> pyrecest/filters/piecewise_constant_filter.py:108:17
    |
106 |                 l2 = PieceWiseConstantDistribution.leftBorder(j, L)
107 |                 r2 = PieceWiseConstantDistribution.rightBorder(j, L)
108 |                 indicator = lambda x: np.where((l2 < x) & (x < r2), 1, 0)
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109 |
110 |                 def integrand(x, w):
    |
help: Rewrite `indicator` as a `def`

E731 Do not assign a `lambda` expression, use a `def`
   --> pyrecest/filters/piecewise_constant_filter.py:148:17
    |
146 |                 l2 = PieceWiseConstantDistribution.leftBorder(j, L)
147 |                 r2 = PieceWiseConstantDistribution.rightBorder(j, L)
148 |                 indicator = lambda x: np.where((l1 < x) & (x < r1), 1, 0)
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149 |
150 |                 def integrand(x, v):
    |
help: Rewrite `indicator` as a `def`

Found 2 errors.
No fixes available (2 hidden fixes can be enabled with the `--unsafe-fixes` option).

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.1.0 --custom-flavor-setup --custom-flavor-linters PYTHON_PYLINT,PYTHON_BLACK,PYTHON_FLAKE8,PYTHON_ISORT,PYTHON_BANDIT,PYTHON_MYPY,PYTHON_RUFF,ACTION_ACTIONLINT,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security

@github-actions
Copy link

github-actions bot commented Sep 17, 2023

Test Results

    9 files      9 suites   1h 52m 41s ⏱️
  449 tests   449 ✅   0 💤 0 ❌
4 200 runs  3 519 ✅ 681 💤 0 ❌

Results for commit f86d4de.

♻️ This comment has been updated with latest results.

@FlorianPfaff FlorianPfaff force-pushed the main branch 3 times, most recently from 9b9c4f0 to a089dfc Compare September 29, 2023 12:45
@FlorianPfaff FlorianPfaff force-pushed the feature/PiecewiseConstantFilter branch from 1d87721 to 716b912 Compare January 19, 2024 21:13
@FlorianPfaff FlorianPfaff force-pushed the main branch 5 times, most recently from 022c55e to bb9ada8 Compare June 14, 2024 20:52
@FlorianPfaff FlorianPfaff force-pushed the feature/PiecewiseConstantFilter branch from 716b912 to f86d4de Compare November 14, 2025 17:34
@FlorianPfaff FlorianPfaff force-pushed the main branch 3 times, most recently from cbbee9b to 22baafb Compare December 1, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants